adk-verify-snippets

A checker for Python examples inside Markdown files. It extracts each code block, runs it separately, and records whether it loaded, ran, and produced line-coverage information.

In plain words
What is it for?
Use it to validate Python snippets in READMEs, guides, and other Markdown documentation.
Why use it?
It finds documentation examples that no longer work, without changing the document or fixing the reported problems.

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

Made for: Claude Code, Codex.

Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,333 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00149 $0.01333
Opus 5 $0.00075 $0.00666
Sonnet 5 $0.00030 $0.00267
Haiku 4.5 $0.00015 $0.00133

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

Security

Grade C, and why

adk-verify-snippets scanned grade C with 1 finding 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/run.py, scripts/verify_md.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

Put `<!-- verify-snippets: ignore -->` alone on a line immediately before the
.agents/skills/adk-verify-snippets/SKILL.md · 137 lines

How it starts

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

Verify Markdown Snippets

Extracts every ```python block from a Markdown file, runs each one in its own subprocess via the bundled run.py harness, and writes a report covering load status, run status, and line coverage per snippet.

Read-only contract

Verifying a doc must never change the doc. Do not create, modify, or delete any file in the repository — including the Markdown being verified, its code blocks, and this SKILL.md. Report the failures; do not fix them and do not offer patches.

The script performs the only two writes that happen: temporary .py files in a system temp directory outside the repository (removed when it exits), and the report beside the source Markdown file.

Prerequisites

  1. An ADK development environment — run from the repository root with the uv virtual environment active (see the adk-setup skill).

  2. coverage, optional. It is not a declared project dependency, so install it explicitly; without it the Coverage column shows .

    uv pip install coverage
    
  3. A Gemini API key, needed only for snippets that build an Agent, App, or Workflow — those are executed against the live API.

    export GEMINI_API_KEY="{your_key}"
    # or
    export GOOGLE_API_KEY="{your_key}"
    

    If both are set the harness drops GOOGLE_API_KEY, so GEMINI_API_KEY wins.

Usage

uv run --no-sync python .agents/skills/adk-verify-snippets/scripts/verify_md.py {path_to_markdown_file}

The script prints per-snippet progress, then writes the report beside the source file and prints its full path.

The report filename is the source file's stem lowercased with everything except [a-z0-9_] stripped, plus _REPORT.md. Workflow-Guide.md therefore produces workflowguide_REPORT.md, not Workflow-Guide_REPORT.md — read the path the script prints rather than reconstructing it.

The report contains an Executive Summary table with one row per snippet, then a detailed section per snippet holding the code block, the execution logs (stdout plus stderr/traceback), and the coverage output.

Read the full file on GitHub · 137 lines

Files

What ships with it

2 files 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 · 137 lines · 149 tokens per session scan C 24fbbd3bc36b

Subscribe to this mod's changes

adk-verify-snippets is a skill published in the GitHub repository google/adk-python (21,331 stars, last pushed 3d ago), licensed Apache-2.0. It adds 149 tokens to every session and 1,333 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.