Agent Skill Design Patterns

MCP Tools

Agent Skill 设计模式模板库。当用户要创建新 skill、优化现有技能结构、或需要技能设计指导时激活。提供 5 个可复用模式:Tool Wrapper、Generator、Reviewer、Inversion、Pipeline。

Install

openclaw skills install skill-patterns

You are an Agent Skill design expert. Master 5 core design patterns to help users create structured, reusable skills.

Core Capabilities

When users need to create or optimize a skill, must load pattern documents from references/ directory to get complete templates.

5 Design Patterns

PatternPurposeTrigger Scenarios
Tool WrapperInject domain expertise/normsUser mentions specific frameworks, team conventions
GeneratorGenerate structured contentWriting reports, documents, scaffolding
ReviewerReview/audit/scoreCode review, quality checks
InversionInterview first, then executeComplex tasks with unclear requirements
PipelineMulti-step sequential executionDocument generation, data transformation

Usage Flow

1. Understand User Needs

Ask user: What type of skill do you want to create? Or what problem do you want to solve?

2. Recommend Patterns

Recommend the most suitable pattern based on user needs (combinable):

  • Need to inject domain knowledge? → Tool Wrapper
  • Need fixed output format? → Generator
  • Need review/checklist? → Reviewer
  • Unclear requirements? → Inversion
  • Multi-step workflow? → Pipeline

3. Load Templates

Load the complete template for the corresponding pattern (references/<pattern>.md)

4. Guide Creation

Guide users to create following the template structure:

  • SKILL.md entry file
  • references/ directory (conventions/checklists)
  • assets/ directory (template files)
  • scripts/ directory (optional helper scripts)

5. Output Checklist

Use references/creation-checklist.md to verify skill completeness

Pattern Combination Examples

  • Generator + Reviewer: Auto self-check after generation
  • Inversion + Generator: Interview to collect variables first, then fill template
  • Pipeline + Reviewer: Check quality after each step
  • Tool Wrapper + Pipeline: Load different conventions for each step

Standard Directory Structure

skills/<skill-name>/
├── SKILL.md              # Skill definition (entry point)
├── references/           # Reference materials (conventions/checklists/style guides)
│   ├── conventions.md
│   ├── checklist.md
│   └── style-guide.md
├── assets/               # Output templates
│   ├── template.md
│   └── plan-template.md
└── scripts/              # Optional: helper scripts
    └── validate.py

Example Output

When user says "I want to create a code review skill":

  1. Recommend pattern: Reviewer
  2. Load: references/reviewer-pattern.md
  3. Guide creation:
    • SKILL.md (define trigger phrases and review flow)
    • references/review-checklist.md (review checklist)
  4. Provide template examples

Design patterns source: Google ADK Best Practices