agentleFS
GoogleKnown publishergoogle/adk-python/.agents/skills/adk-sample-creator/SKILL.md

adk-sample-creator

Skill22k starsChanged 4 months agoApache-2.0View on GitHub

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`).

2 other projects use a version of this, 1 of them edited.

Trending

Less talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 1 mentionFeb 2026: 1 mentionMar 2026: 2 mentionsApr 2026: 12 mentionsMay 2026: 8 mentionsJun 2026: 3 mentionsJul 2026: 2 mentionsAug 2026: 2 mentionsSep 2026: 1 mentionOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the google/adk-python repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about google/adk-python

The biggest 5 of 63 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 63

Talked about on GitHub, Bluesky and Hacker News (63 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 11

6 more on Bluesky

On Hacker News · 2

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

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

    line 21
  2. Very specific:

    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.

    line 43
  3. Distinctive:

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

    line 58
  4. Very specific:

    Do not set model= on Agent instances.

    line 60
  5. Distinctive:

    Use when the sample needs multiple nodes, routing, or parallel execution.

    line 69
  6. Very specific:

    Import Workflow from google.adk, not from a private google.adk.workflow._* module.

    line 80
  7. Distinctive:

    Use when there is no graph and the agent drives its own loop.

    line 104
  8. Very specific:

    Follow readme-template.md — section order, prompt formatting, the Mermaid topology rules, and the relative link depth for docs/guides/.

    line 120
  9. Distinctive:

    Read these two before writing a new Pattern A sample — one dynamic graph, one static one.

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

FileRequiredPurpose
agent.pyyesThe agent or workflow. Must expose root_agent.
README.mdyesSee readme-template.md.
__init__.pysometimesPresent when the sample is imported as a package.
tests/*.jsonnoRecorded 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 a while loop with ctx.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 from START, collected by a JoinNode, 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,
        )],
    )

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.