adk-sample-creator

A guide for creating a small example agent in the ADK Python repository, including its source file, README, directory, and category placement.

In plain words
What is it for?
Use it when adding a sample that demonstrates an ADK feature or agent pattern.
Why use it?
It keeps new examples consistent with the repository's existing structure and naming conventions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/google/adk-python/adk-sample-creator
Any agent
npx skills add google/adk-python --skill adk-sample-creator
Clone the repo
git clone --depth 1 https://github.com/google/adk-python

Made for: Claude Code, Codex.

Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00150 $0.01264
Opus 5 $0.00075 $0.00632
Sonnet 5 $0.00030 $0.00253
Haiku 4.5 $0.00015 $0.00126

Measured yesterday against content hash 19bce171b731, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adk-sample-creator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/adk-sample-creator/SKILL.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ADK Sample Creator

Creates samples under contributing/samples/. These are deliberately minimal agents that each exercise one or two features — distinct from the adk-samples repository, which hosts full end-to-end applications.

Read the adk-style skill first for ADK 2.0 conventions if you have not already.

1. Pick the category directory

Almost every sample lives at contributing/samples/{category}/{sample_name}/. List the categories and confirm with the user which one the sample belongs in before creating anything — a workflow sample landing outside workflows/ is the usual mistake.

ls contributing/samples/

Categories include workflows, patterns, core, multi_agent, tools, models, live, mcp, a2a, evaluation, and plugins. A handful of samples nest one level further when a single feature needs several variants, as plugins/plugin_reflect_tool_retry/basic/ does.

Name the sample directory in snake_case after the feature it demonstrates: dynamic_nodes, fan_out_fan_in, streaming_tool_events.

Do not add an _agent suffix, and do not repeat the category as a prefix — every sample is an agent, and the category is already in the path. Many existing directories still carry both; do not copy them.

2. Write agent.py

Contents of a sample directory:

File Required Purpose
agent.py yes The agent or workflow. Must expose root_agent.
README.md yes See readme-template.md.
__init__.py sometimes Present when the sample is imported as a package.
tests/*.json no Recorded sessions used as eval sets.

Use absolute imports so the file can be run and imported directly.

Do not set model= on Agent instances. Samples inherit the system-configured model, which keeps them working when the default model changes; hardcoding model="gemini-2.5-flash" pins the sample to a model that will be retired. Set it only when the user explicitly asks for a specific model.

Read the full file on GitHub · 159 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 159 lines · 150 tokens per session scan A 19bce171b731

Subscribe to this mod's changes

adk-sample-creator is a skill published in the GitHub repository google/adk-python (21,331 stars, last pushed 2d ago), licensed Apache-2.0. It adds 150 tokens to every session and 1,264 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.