
adk-sample-creator
Creates a new sample agent in the ADK Python repository — the sample directory, its agent.py, and its README.md — following the conventions the existing samples already use. Use when the user wants to add a sample or example demonstrating a feature or agent pattern (dynamic nodes, fan-out/fan-in, a standalone tool-using agent), asks where a new sample belongs under contributing/samples/, or wants an existing sample's README brought up to the standard structure. Don't use for building a real working agent for the user's own project (use adk-agent-builder), or for checking whether the Python blocks in a Markdown file run (use adk-verify-snippets).
- Installs
- 91
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/google/adk-python --skill adk-sample-creator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads adk-sample-creator automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
Then pick one of the two shapes.
Pattern A — Workflow, for multi-step graphs
Use when the sample needs multiple nodes, routing, or parallel execution.
from google.adk import Agent
from google.adk import Context
from google.adk import Event
from google.adk import Workflow
from google.adk.workflow import JoinNode
from google.adk.workflow import node
Import Workflow from google.adk, not from a private
google.adk.workflow._* module.
my_agent = Agent(name="my_agent", instruction="...")
@node()
async def my_node(node_input: str) -> str:
return "result"
root_agent = Workflow(
name="root_agent",
edges=[("START", my_node)],
)
A plain function can be used as a node directly in edges; reach for the
@node(...) decorator when you need one of its options, such as
rerun_on_resume=True for a node that calls ctx.run_node.
Pattern B — Standalone agent, for single-agent or simple tool use
Use when there is no graph and the agent drives its own loop.
from google.adk import Agent
from google.adk.tools import google_search
root_agent = Agent(
name="standalone_assistant",
instruction="You are a helpful assistant.",
description="An assistant that can help with queries.",
tools=[google_search],
)
3. Write README.md
Follow readme-template.md — section order,
prompt formatting, the Mermaid topology rules, and the relative link depth for
docs/guides/.
Worked examples
Read these two before writing a new Pattern A sample — one dynamic graph, one static one.
-
contributing/samples/workflows/dynamic_nodes/agent.py— a Python node driving awhileloop withctx.run_node, so the number of agent calls is decided at runtime rather than by the edges.@node(rerun_on_resume=True) async def orchestrate(ctx: Context, node_input: str) -> str: yield Event(state={"topic": node_input}) while True: headline = await ctx.run_node(generate_headline) # ... -
contributing/samples/workflows/fan_out_fan_in/agent.py— three functions run in parallel fromSTART, collected by aJoinNode, then aggregated.join_node = JoinNode(name="join_for_results") root_agent = Workflow( name="root_agent", edges=[( "START", (make_uppercase, count_characters, reverse_string), join_node, aggregate, )], )
FAQ
What does the adk-sample-creator skill do?
Creates a new sample agent in the ADK Python repository — the sample directory, its agent.py, and its README.md — following the conventions the existing samples already use. Use when the user wants to add a sample or example demonstrating a feature or agent pattern (dynamic nodes, fan-out/fan-in, a standalone tool-using agent), asks where a new sample belongs under contributing/samples/, or wants an existing sample's README brought up to the standard structure. Don't use for building a real working agent for the user's own project (use adk-agent-builder), or for checking whether the Python blocks in a Markdown file run (use adk-verify-snippets).
How do I install adk-sample-creator?
Run npx skills add https://github.com/google/adk-python --skill adk-sample-creator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/adk-sample-creator/ (personal) or .claude/skills/adk-sample-creator/ (project).
Which AI agents can use adk-sample-creator?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is adk-sample-creator safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains adk-sample-creator?
It is published by google in google/adk-python. It has 91 recorded installs.
More from google/adk-python
adk-architecture
google/adk-python
Open the skill to read its SKILL.md instructions.
adk-debug
google/adk-python
Diagnoses misbehaving ADK agents by inspecting sessions, events, tool calls, and the exact request that reached the model. Covers the adk run CLI and the adk web dev server with its session, trace, and debug HTTP endpoints. Use when an agent returns the wrong answer, ignores a tool or swallows a tool error, hangs, loops, emits raw JSON instead of calling tools, is not discovered by adk web, when a sub-agent cannot see the parent conversation, or when you need the LLM request/response, token counts, or logs for a run. Don't use for how ADK is designed internally (use adk-architecture), for building a new agent or workflow (use adk-agent-builder), for environment or dependency setup failures (use adk-setup), or for lint and style nits (use adk-style).
adk-setup
google/adk-python
Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test run. Runs only when explicitly requested, never on its own. Use when asked to set up, bootstrap, or repair a development checkout, install project dependencies, fix a missing or broken .venv, or prepare a machine for contributing a pull request. Don't use for debugging a running agent (use adk-debug), for commit and pull-request mechanics (use adk-git), or for re-running formatters on a checkout that is already set up (pre-commit run --all-files).
adk-git
google/adk-python
Writes commit messages and pull request descriptions for the adk-python repository: Conventional Commits types and scopes, subject lines that say why a change was made, and the linked-issue and testing-plan sections the PR template requires. Use when writing or rewording a commit message, squashing commits before a pull request, drafting a PR description, or checking that a change is shaped to land. Don't use for generic git mechanics such as rebasing, resolving conflicts, cherry-picking, or branch surgery; those need no skill. Don't use to judge the content of a change (use adk-review) or for code style and naming (use adk-style).
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.