ADK Skill Patterns
by @maxlauriehutchinson
5 proven agent skill design patterns (Tool Wrapper, Generator, Reviewer, Inversion, Pipeline) from Google's ADK. Build reliable, composable skills with templ...
clawhub install adk-skill-patternsπ About This Skill
name: adk-skill-patterns description: 5 proven agent skill design patterns (Tool Wrapper, Generator, Reviewer, Inversion, Pipeline) from Google's ADK. Build reliable, composable skills with templates, decision trees, and composition guides. Stop cramming logic into promptsβuse structured patterns instead. metadata: openclaw: emoji: π§© version: 1.0.0
ADK Skill Patterns π§©
Source: Google Cloud Tech β 5 Agent Skill Design Patterns Adapted for: OpenClaw Agent System Purpose: Build reliable, composable agent skills using proven architectural patterns
Overview
The specification explains how to package a skill, but offers zero guidance on how to structure the logic inside it. These 5 patterns solve that problem.
| Pattern | Question It Answers | Use When | |---------|---------------------|----------| | Tool Wrapper | "How do I make my agent an expert on a specific library?" | Agent needs deep, contextual knowledge about a technology | | Generator | "How do I enforce consistent output structure?" | Output format must be predictable every time | | Reviewer | "How do I separate what to check from how to check it?" | Code review, quality gates, compliance checking | | Inversion | "How do I stop the agent from guessing and gather requirements first?" | Complex tasks requiring full context before execution | | Pipeline | "How do I enforce a strict multi-step workflow?" | Multi-phase tasks with checkpoints and approvals |
Pattern 1: Tool Wrapper
Purpose: Give your agent on-demand context for a specific library/framework.
Mechanism:
references/Example Use Cases:
Template: See templates/tool-wrapper-SKILL.md
Pattern 2: Generator
Purpose: Enforce consistent output via fill-in-the-blank orchestration.
Mechanism:
assets/ holds output templatereferences/ holds style guideExample Use Cases:
Template: See templates/generator-SKILL.md
Pattern 3: Reviewer
Purpose: Separate review criteria from review execution.
Mechanism:
references/review-checklist.mdExample Use Cases:
Template: See templates/reviewer-SKILL.md
Pattern 4: Inversion
Purpose: Stop agents from guessing β make them interview first.
Mechanism:
Example Use Cases:
Template: See templates/inversion-SKILL.md
Pattern 5: Pipeline
Purpose: Enforce strict sequential workflow with hard checkpoints.
Mechanism:
Example Use Cases:
Template: See templates/pipeline-SKILL.md
Decision Tree
START: What does your skill need to do?
β
βββ Provide deep knowledge about a specific library/framework?
β βββ Use: TOOL WRAPPER
β
βββ Produce consistent, templated output?
β βββ Use: GENERATOR
β
βββ Check/audit something against criteria?
β βββ Use: REVIEWER
β
βββ Gather requirements before acting?
β βββ Use: INVERSION
β
βββ Execute strict multi-step workflow?
β βββ Use: PIPELINE
β
βββ Multiple of the above?
βββ Patterns COMPOSE (see below)
Pattern Composition
These patterns are not mutually exclusive β they compose:
| Combination | Effect | |-------------|--------| | Pipeline + Reviewer | Multi-step workflow with quality gate at the end | | Generator + Inversion | Gather variables via interview, then fill template | | Pipeline + Tool Wrapper | Each step loads specific expertise as needed | | Reviewer + Generator | Review output before generating final document |
Principle: Your agent only spends context tokens on the exact patterns it needs at runtime.
Quick Reference: Pattern Selection
| Scenario | Pattern | Why | |----------|---------|-----| | "Teach my agent FastAPI conventions" | Tool Wrapper | Context loads only when FastAPI mentioned | | "Generate consistent API docs" | Generator | Template + style guide = predictable output | | "Automate PR reviews" | Reviewer | Swap checklist for different audit types | | "Plan a new project" | Inversion | Gathers full requirements before designing | | "Generate docs from code" | Pipeline | Parse β Generate β Review β Assemble |
Directory Structure
skills/
βββ your-skill/
βββ SKILL.md # Instructions (implements pattern)
βββ references/ # Knowledge, checklists, style guides
β βββ conventions.md
β βββ review-checklist.md
β βββ style-guide.md
βββ assets/ # Templates, examples
βββ report-template.md
βββ plan-template.md
Anti-Patterns to Avoid
β Cramming everything into system prompt β Use Tool Wrapper instead β Different output every run β Use Generator for consistency β Hardcoded review criteria β Use Reviewer for modularity β Agent assumes context β Use Inversion to gather requirements β Skipped steps in workflows β Use Pipeline for enforcement
Implementation Notes for OpenClaw
1. File Loading: Use read tool to load references/assets dynamically
2. Pattern Detection: Check user's intent to determine which pattern to apply
3. Composition: Chain skills via sessions_spawn for complex workflows
4. Gates: Explicit user confirmation before proceeding (especially Pipeline/Inversion)
Using This Skill
To Apply a Pattern
Ask me: "Use the [pattern-name] pattern to [task]"Examples:
To Get Pattern Advice
Ask: "Which pattern should I use for [scenario]?"To Compose Patterns
Ask: "How do I combine [pattern-1] and [pattern-2]?"Source Article: https://x.com/GoogleCloudTech/status/2033953579824758855 Last Updated: March 29, 2026