adk-unit-design

A guide for documenting one ADK code unit as it currently works, including its purpose, execution and data flow, dependencies, extension points, and limits.

In plain words
What is it for?
Use it to create an as-built architecture document for a specified ADK source file, class, or method.
Why use it?
It helps developers understand what they can safely change and what could break if the unit is modified.

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-unit-design
Any agent
npx skills add google/adk-python --skill adk-unit-design
Clone the repo
git clone --depth 1 https://github.com/google/adk-python

Made for: Claude Code, Codex.

Per session 181 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 698 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.00181 $0.00698
Opus 5 $0.00090 $0.00349
Sonnet 5 $0.00036 $0.00140
Haiku 4.5 $0.00018 $0.00070

Measured 2d ago against content hash da8ca332ec3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adk-unit-design 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 2d ago.

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-unit-design/SKILL.md · 70 lines

How it starts

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

ADK code unit design

A unit design documents a code unit as implemented, the way a unit test exercises it as implemented. Nothing proposed or aspirational belongs in one. The reader is deciding what they may safely change, so answer "what breaks if I touch this?" — not "how do I call this?".

Inputs

Require the source file, or a class or method named inside it. Also read, when they exist: the base classes and interfaces the unit implements, its unit tests (the best evidence of intended behaviour), and example usage.

Analyse before writing

Answer each of these from the source. Anything the code does not show stays out of the document — do not infer a design intent from a name.

  • Purpose and intended use of the unit.
  • Execution flow, and the data that flows in and out.
  • Upstream dependencies, and which classes depend on this unit.
  • Extension surfaces: abstract methods, hooks, callbacks, configurable fields.
  • Constraints — what a subclass or caller must not change, and why.
  • Operational limitations.

Where the document goes

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

Source Design document
src/google/adk/workflow/_function_node.py docs/design/workflow/function_node/index.md
src/google/adk/events/event.py docs/design/events/event/index.md

If a document already exists at that path, update it in place and keep the existing wording wherever the code has not changed, so the diff shows only what the change actually altered.

docs/design/ does not exist in this repository yet — the first design document creates it. docs/guides/ is the established sibling tree; match its directory shape.

These documents render on GitHub, where a local filesystem path is dead. Rewrite {repo_root}/src/google/adk/{topic}/{unit}.py#L93 as https://github.com/google/adk-python/blob/main/src/google/adk/{topic}/{unit}.py#L93.

Read the full file on GitHub · 70 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. 2d ago First seen · 70 lines · 181 tokens per session scan A da8ca332ec3f

Subscribe to this mod's changes

adk-unit-design is a skill published in the GitHub repository google/adk-python (21,331 stars, last pushed 2d ago), licensed Apache-2.0. It adds 181 tokens to every session and 698 once invoked, about $0.0009 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.