MCPInstall

adk-unit-guide

Writes a hands-on developer guide for one ADK code unit — a minimal runnable example, how it works, a configuration-option table, advanced uses, limitations, and links to related samples — to docs/guides/{topic}/{unit}/index.md, then lists it in the index at docs/guides/README.md. Its reader is a developer calling the unit from their own application, at more depth than the published adk.dev documentation carries. Use when asked to "write a unit guide for {class}", "document how to use {feature}", "add a guide for {file}", or after shipping a user-facing class, node, or plugin. Don't use for internals documentation aimed at someone changing or extending the unit — that is a design document under docs/design/ (use adk-unit-design). Don't use to write a runnable sample under contributing/samples/ (use adk-sample-creator).

Installs
76
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-unit-guide
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads adk-unit-guide automatically when relevant.

  3. 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 code unit guide

A unit guide is granular usage documentation for one code unit, deeper than what ships on adk.dev — so detail that would bloat the published documentation has somewhere to live. The reader wants to call the unit from an application, so lead with working code.

Unit guides focus on public APIs and caller-visible behavior. Do not discuss internal implementation details (such as private methods, internal state mechanisms, or unexported helpers).

Voice

Write to help the reader understand, not to instruct them from above.

  • Give the reason, not only the rule. Whenever the guide states a constraint, a default, or a recommendation, say why it is that way. A reader who knows the reason can handle the case the guide did not anticipate.
  • Do not decide for the reader. Phrasings such as "most applications never need this" or "you will rarely" tell people what they want. State the trade-off and let them choose.
  • Explain at the caller's level. Explaining what happens is required; explaining the machinery that makes it happen is not. If an explanation needs a private symbol to make sense, it is pitched at the wrong layer.
  • Length follows understanding. Brevity is not the goal. Where a reader would have a follow-up question, answer it. Where the sentence already lands, leave it.
  • Problem before syntax. Say what the reader is trying to do, then show the code.
  • Every heading has at least one sentence under it before the next heading, and every code block has a sentence introducing what it does.

Sentence-level rules, following the Google developer documentation style guide: present tense, no contractions, no parentheticals (use commas), no bare "This" as a subject, no e.g. or etc., no superlatives, sentence case in headings, and no heading deeper than H3.

What the difference looks like

From the BaseNode guide. Before:

Most applications never subclass BaseNode, so the sections that follow cover the settings first.

That decides for the reader and gives them nothing to check their own case against. After:

You usually configure a node rather than subclass one, because the settings below cover what most graphs need. Subclassing earns its keep when you want behavior the settings cannot express, and that case is at the end.

Same length, same facts. The second one names the reason, so a reader can tell which of the two situations is theirs.

A second pair, from the JoinNode guide. Before:

Here three tasks run in parallel on the same input, and a JoinNode collects their results.

That opens in speech rather than documentation, and it drops the name of the pattern the reader would search for. After:

This example builds a fan-out/fan-in workflow. Three tasks run in parallel on the same input, and a JoinNode aggregates their results so that a final node can present all three together.

Inputs

Require the source file, or a class or method named inside it. Also read, when they exist: its unit tests (they give you an example to adapt) and its design document at docs/design/{topic}/{unit}/index.md.

Analyse before writing

  • Purpose and intended use of the unit.
  • Which classes depend on it, and which it depends on.
  • Configuration options the unit itself introduces, ignoring inherited ones.
  • Known limitations.
  • Exclude internal implementation details such as private methods and attributes, internal helper functions, private execution state, or internal data structures.

Where the guide goes

Mirror the source path under docs/guides/, one directory per unit, guide named index.md. Drop the leading underscore of a private module:

SourceGuide
src/google/adk/workflow/_function_node.pydocs/guides/workflow/function_node/index.md
src/google/adk/plugins/reflect_retry_tool_plugin.pydocs/guides/plugins/reflect_retry_tool_plugin/index.md

Use named files instead of index.md only when one source file has genuinely separate usage modes — docs/guides/agents/llm_agent/ holds single_turn.md and task.md for that reason.

Update an existing guide in place, keeping the existing wording wherever the code has not changed, so the diff shows only what the change actually altered.

Then add the guide to docs/guides/README.md under the right category heading, as * [Title](path/index.md) - one-line summary. That index is the only table of contents; a guide missing from it is unreachable.

When a guide is not required

scripts/check_new_py_files.py enforces this convention on the Python files a change adds under src/google/adk/. Some it passes over without asking, and the rest you can waive, so work out which case you are in before writing a guide the rule does not ask for.

Three subtrees sit outside the rule, because nothing in them is published: src/google/adk/internal/, src/google/adk/platform/internal/, and src/google/adk/v1/.

Elsewhere a file is exempt on one of two grounds. It carries no unit of its own, which covers __init__.py and any path with a cli/ or utils/ component. Or it holds declarations that belong in the guide of whatever uses them rather than in a guide of their own, which covers any filename ending _utils.py, _helper.py, _helpers.py, _types.py, _errors.py, _exceptions.py, or _constants.py.

A module is also exempt when no package __init__.py imports from it or names it, because then it has no public interface for a guide to describe. The check reads every __init__.py under src/google/adk/, and lazy re-exports count: an import under if TYPE_CHECKING: or inside __getattr__, and a string that names the module in a lazy-import table. Its _ prefix decides nothing, so export a name from a new module and that module needs a guide.

Everything else needs a guide or a waiver. A waiver is a NO_UNIT_GUIDE= or SKIP_UNIT_GUIDE= tag carrying the reason, and the two names behave identically. It waives the unit guide requirement alone; the _ prefix rule shares the same hook and the same error report, and has no waiver at all. One tag waives every file the change adds, not the one its reason names, so a change adding several needs a reason that covers all of them.

Write a reason a reviewer can check against the code, because the tag becomes the only record of why the guide is absent:

NO_UNIT_GUIDE=InvocationNotFoundError is covered by docs/guides/errors/index.md.

Where to put the waiver

The tag reaches the check through a commit message or through the environment, and which one applies depends on whether the commit exists yet.

Once the commit exists, its message carries the tag. Continuous integration reads the messages of the commits a pull request contains, so a waiver a contributor writes there satisfies the check that gates the pull request. Start the tag at the left margin with no space before the =, because the check matches at the start of a line. An indented tag, or one inside a list item, is not found, and nothing reports the miss.

The environment carries the tag for a commit that does not exist yet:

NO_UNIT_GUIDE='covered by docs/guides/errors/index.md' git commit ...

Reach for that form when the pre-commit hook stops you. A pre-commit hook runs before git records your message anywhere, and the check declines to read the previous commit's message in its place, so the environment is the channel left open. Quote the reason: an unquoted one ends at the first space, and the shell takes the next word for the command to run, so no commit happens at all. Write the tag into the message as well, so the reason survives in the history rather than only in the shell that ran the commit.

A tag carrying no reason waives nothing, in either channel. The reason is the only record of the decision, so a waiver without one leaves nothing to review.

Code examples

  • One minimal example under "Get started", with enough of the surrounding classes to show where the call belongs. Start from a unit test if one exists.
  • Keep the google.adk import lines, because the import path is the single most error-prone thing a reader copies. Omit unrelated standard-library imports and asyncio.run(main()) runner boilerplate, which add nothing about the unit.
  • Show what a developer would actually write. An example that only demonstrates the shape of an interface, or that drives a service the reader would normally reach through Runner, does not belong in a guide.
  • Do not set model= on a sample agent — guides stay model-agnostic, and no guide in docs/guides/ currently pins a model.
  • For workflow nodes, show the logic as a plain Python function rather than a BaseNode subclass, unless the use case genuinely requires the subclass.
  • Wrap a function as a node with the @node decorator rather than FunctionNode directly, except when demonstrating FunctionNode configuration itself.

Link related samples

Link samples by repo-relative path from the guide, not by GitHub URL: [Node Output](../../../../contributing/samples/workflows/node_output/agent.py). Confirm the file exists before linking it.

Structure

Follow references/guide-template.md section by section.

FAQ

What does the adk-unit-guide skill do?

Writes a hands-on developer guide for one ADK code unit — a minimal runnable example, how it works, a configuration-option table, advanced uses, limitations, and links to related samples — to docs/guides/{topic}/{unit}/index.md, then lists it in the index at docs/guides/README.md. Its reader is a developer calling the unit from their own application, at more depth than the published adk.dev documentation carries. Use when asked to "write a unit guide for {class}", "document how to use {feature}", "add a guide for {file}", or after shipping a user-facing class, node, or plugin. Don't use for internals documentation aimed at someone changing or extending the unit — that is a design document under docs/design/ (use adk-unit-design). Don't use to write a runnable sample under contributing/samples/ (use adk-sample-creator).

How do I install adk-unit-guide?

Run npx skills add https://github.com/google/adk-python --skill adk-unit-guide 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-unit-guide/ (personal) or .claude/skills/adk-unit-guide/ (project).

Which AI agents can use adk-unit-guide?

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-unit-guide 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-unit-guide?

It is published by google in google/adk-python. It has 76 recorded installs.

More from google/adk-python

View all →

adk-agent-builder

google/adk-python

Open the skill to read its SKILL.md instructions.

440 installs

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-style

google/adk-python

Open the skill to read its SKILL.md instructions.

106 installs

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-sample-creator

google/adk-python

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

Docs & Writing91 installs

Popular docs & writing skills

View category →

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.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs