google-adk-agent-patterns

google-adk-agent-patterns is a skill for Claude Code, Codex from saski/arnesto. It costs 92 tokens per session (1,141 once invoked), scanned A, original, Unlicense.

A set of patterns for building Google ADK agents, which are AI programs that can use functions and work together on tasks.

In plain words
What is it for?
Use it to write Python function tools, configure LlmAgent objects, and build sequential, looping, parallel, or routing agent pipelines.
Why use it?
It helps keep agent definitions, tool connections, shared results, and multi-agent workflows understandable and predictable.

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

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for google-adk-agent-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/saski/arnesto/google-adk-agent-patterns.svg)](https://agentmods.dev/skills/saski/arnesto/google-adk-agent-patterns)
Your own site
<a href="https://agentmods.dev/skills/saski/arnesto/google-adk-agent-patterns"><img src="https://agentmods.dev/badge/skills/saski/arnesto/google-adk-agent-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,141 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.00092 $0.01141
Opus 5 $0.00046 $0.00571
Sonnet 5 $0.00018 $0.00228
Haiku 4.5 $0.00009 $0.00114

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

Security

Grade A, and why

google-adk-agent-patterns 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 5d 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/google-adk-agent-patterns/SKILL.md · 157 lines

How it starts

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

Google ADK Agent Patterns

When to Use / When Not to Use

Use this skill when:

  • Defining or modifying an Agent (LlmAgent) with model, instructions, or tools.
  • Writing Python function tools registered in tools=[...].
  • Composing multi-agent pipelines (sequential, loop, parallel, router).
  • Passing state between agents using output_key / {var} injection.

Do not use this skill when:

  • Setting up a new ADK project from scratch (use google-adk-setup).
  • Deploying to Cloud Run (covered in google-adk-setup references).

Agent Configuration (LlmAgent / Agent)

from google.adk.agents.llm_agent import Agent

root_agent = Agent(
    name="my_agent",
    model="gemini-2.5-flash",
    description="One-sentence description used by other agents for routing.",
    instruction="You are a helpful assistant. Answer: {topic?}",
    tools=[my_tool],
)

Key parameters:

Parameter Purpose
name Unique identifier for the agent
model Gemini model string (e.g. gemini-2.5-flash)
description Used by orchestrators for routing — be precise
instruction System prompt; supports {var} (required) and {var?} (optional) state injection
tools List of Python functions or AgentTool instances
output_schema Pydantic model for structured output
output_key Writes agent output to shared session state under this key
include_contents Controls which conversation history is passed
generate_content_config Fine-grained generation parameters

Critical constraint: output_schema and tools cannot both be set on most models. Choose one.


Function Tools

See references/tool-patterns.md for full examples.

Minimal function tool

def get_weather(city: str) -> dict:
    """Return current weather for the given city name.

    Args:
        city: The city name to look up.
    """
    return {"status": "success", "temperature_c": 22}

agent = Agent(model="gemini-2.5-flash", name="weather_agent", tools=[get_weather])

Read the full file on GitHub · 157 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. 5d ago First seen · 157 lines · 92 tokens per session scan A 1651ebd1f1bf

Subscribe to this mod's changes

google-adk-agent-patterns is a skill published in the GitHub repository saski/arnesto (5 stars, last pushed 9d ago), licensed Unlicense. It adds 92 tokens to every session and 1,141 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

pixir-delegate

Use Pixir as a headless subagent runtime from Claude Code or any harness with skill ! preprocessing (Codex roots and other no-hydration hosts use pixir-delegate-codex instead) — one-shot workers (pixir --json), parallel fan-out to N children (pixir delegate --spec), resumable steering (pixir resume), evidence…

Ranvier-Technologies/pixir · 126 tokens

pixir-delegate-codex

Use when a Codex CLI/Desktop root should fan out subagents, delegate to Pixir workers, run parallel workers, or manage a resident delegation daemon via Pixir Delegate; covers Codex preflight, AGENTS.md, approvals/sandbox, dry-run, daemon start/status/attach/cancel, closure evidence, and audited single-run execution…

Ranvier-Technologies/pixir · 89 tokens

pixir-diagnostics

Diagnose Pixir and T3 Code Pixir incidents from local canonical evidence. Use when a Pixir run, ACP/T3 thread, subagent/workflow, provider replay, or daily-driver dogfood session appears stuck, inconsistent, missing tool output, or hard to classify.

Ranvier-Technologies/pixir · 61 tokens

readonly-review

Run a no-network read-only review practice with two explorer steps and one synthesis step.

Ranvier-Technologies/pixir · 20 tokens

pixir-delegate-native

Delegate work to subagents from INSIDE a Pixir session using the native Subagent tools (spawnagent, waitagent, closeagent, listagents, sendinput) instead of shelling out to the pixir CLI. Use when you are a Pixir session that needs to fan out parallel workers, steer a child, or run skill-backed workflow templates …

Ranvier-Technologies/pixir · 89 tokens

repo-contracts-and-boundaries

Use when turning architecture, layering, ownership, dependency direction, schemas, structural metrics, quality thresholds, baselines, allowlists, or generated quality snapshots into repository checks.

yfge/agent-harness-skills · 41 tokens