Author new samples for the ADK Python repository. Use this skill when the user wants to create a new sample demonstrating a feature or agent pattern (e.g., dynamic nodes, standalone agents, fan-out/fan-in) or when adding examples to subdirectories under `contributing/`.
npx skills add https://github.com/google/adk-python --skill adk-sample-creator
This skill helps you create new samples for the ADK Python repository. You should search for subdirectories under contributing (such as new_workflow_samples, workflow_samples, etc.) and confirm with the user which folder they want to use before creating the sample.
> [!TIP]
> Before creating samples, you can use the adk-style skill to learn about ADK 2.0 architecture knowledge and best practices.
A sample consists of:
agent.py file defining the agent or workflow logic.README.md file explaining the sample.Use snake_case for the folder name (e.g., dynamic_nodes, fan_out_fan_in).
agent.py ContentThe agent.py should focus on demonstrating a specific feature or agent pattern. Use absolute imports for testing convenience.
> [!IMPORTANT]
> Model Selection: Do not set the model parameter explicitly (e.g., model="gemini-2.5-flash") on Agent instances in sample agents. Instead, let them default to the system-configured model, unless a specific model is explicitly requested by the user.
Choose one of the following patterns:
Use this when you need multiple nodes, routing, or parallel execution.
Imports:
from google.adk import Agent
from google.adk import Context
from google.adk.workflow import node
from google.adk.workflow import JoinNode
from google.adk.workflow._workflow_class import Workflow
Anatomy:
my_agent = Agent(name="my_agent", ...)
@node()
async def my_node(node_input: str):
return "result"
root_agent = Workflow(
name="root_wf",
edges=[("START", my_node)],
)
Use this when you don't need a graph and the agent handles the loop.
Imports:
from google.adk import Agent
from google.adk.tools import google_search # example
Anatomy:
root_agent = Agent(
name="standalone_assistant",
instruction="You are a helpful assistant.",
description="An assistant that can help with queries.",
tools=[google_search],
)
README.md ContentEach sample should have a README.md with the following structure:
LlmAgent, ManagedAgent), visualize the topology of the agent and its tools/sub-agents instead of internal workflow nodes. Keep it a simple topology diagram (a few nodes and edges). Do not draw a request/response data-flow sequence (e.g., user -> agent -> API -> tool -> ... -> user); those are noisy and add little value over the topology.ctx.run_node).docs/guides/ that explain the concepts or classes used.# ADK Sample Name
## Overview
Brief description.
## Sample Inputs
- `Prompt example 1`
- `Prompt example 2`
*Explanation or expected behavior*
## Graph
For Workflow root agents:
graph TD
START --> MyNode
For agents that orchestrate tools or sub-agents (`LlmAgent`, `ManagedAgent`, ...):
graph TD
MyAgent[my_agent] -->|calls| MyTool(my_tool)
## How To
Explain the details.
## Related Guides
- [Guide Title](../../docs/guides/path/to/guide.md) - Brief description of what the guide covers.
Snippet from dynamic_nodes/agent.py:
@node(rerun_on_resume=True)
async def orchestrate(ctx: Context, node_input: str) -> str:
while True:
headline = await ctx.run_node(generate_headline)
# ...
Snippet from fan_out_fan_in/agent.py:
root_agent = Workflow(
name="root_agent",
edges=[("START", (node_a, node_b), join_node, aggregate)],
)
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
Coding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.
Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.
Makepad UI development skills for Rust apps: setup, patterns, shaders, packaging, and troubleshooting.
Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits
Prompt for generating an AGENTS.md file for a repository
Take google/adk-sample-creator from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.