Install
openclaw skills install skill-design-guide-skillDesign better AI skills with proven architecture patterns. Helps you decide Workflow vs Agent, pick the right pattern (Prompt Chaining, Routing, Parallelizat...
openclaw skills install skill-design-guide-skill30-Second Test: If you're about to write a SKILL.md file OR your skill "works but feels messy", load this guide.
| Tool | What It Does | When You Need It |
|---|---|---|
| skill-creator | Helps you WRITE skill code | "How do I structure this file?" |
| template-skill | Gives you COPY-PASTE templates | "What's the standard format?" |
| THIS GUIDE | Teaches you DESIGN decisions | "Should this be Workflow or Agent?" |
This guide answers WHY, not HOW.
You say: "I want to build a [X] skill" I help you decide:
Output: Architecture blueprint (not code)
You say: "Review my skill design" or "Check this skill's quality" I do: Run 25-point checklist
Output: Review report with improvement suggestions
You say: "Should I use Prompt Chaining or Routing?" I explain: 5 workflow patterns with decision criteria
Output: Pattern recommendation with rationale
Load this guide as a constraint layer whenever designing any Skill or Agent. Distilled from official engineering blogs and technical docs by Anthropic, OpenAI, and LangChain.
Start simple. Add complexity only when simpler solutions fall short.
This is the consensus baseline across Anthropic, OpenAI, and LangChain. Any design violating this principle gets sent back to the drawing board.
Practical checklist:
From Anthropic's April 2026 architecture essay: well-designed Agent systems should separate three concerns:
| Component | Role | In Your Skill |
|---|---|---|
| Brain | Decision logic, workflow definition | SKILL.md — the orchestration layer |
| Hands | Deterministic execution, tool operations | scripts/ — code that actually does things |
| Session | Context, knowledge base, configuration | references/, assets/, config files |
Why this matters:
Your skills already follow this: data-ai-daily-brief (scripts=fetches data), benjie-model (serves as Session layer for other skills).
Before designing anything, answer one question: Are the task steps predetermined, or does the LLM need to decide the next step dynamically?
| Type | Definition | When to choose |
|---|---|---|
| Workflow | Executes along predefined steps | Steps are clear, predictable; stability matters |
| Agent | LLM dynamically plans the flow | Steps are uncertain; flexibility needed; uncertainty acceptable |
Most real-world scenarios are workflows. Don't pick Agent just because it sounds more advanced — workflows are faster, cheaper, and easier to debug.
If you determined it's a workflow (most likely), pick the best-fit pattern from these five:
Step A → [checkpoint] → Step B → [checkpoint] → Step C
Input → [classify] → Route A / Route B / Route C
Input → [split] → Subtask A + Subtask B + Subtask C → [merge]
Central LLM → [dynamic dispatch] → Worker1 + Worker2 + ... → [merge]
Generate → Evaluate → Feedback → Regenerate → ... until pass
| Component | Content | Notes |
|---|---|---|
| SKILL.md | YAML metadata + workflow instructions + hard rules | The only mandatory file |
| Component | When needed | Notes |
|---|---|---|
| reference/ | Skill needs domain knowledge or reference docs | Load on demand, not pre-loaded |
| scripts/ | Deterministic steps can be implemented as scripts | Reduces LLM calls, improves reliability |
| assets/ | Templates, configs, or resources needed | Writing templates, brand guides, etc. |
---
name: my-skill-name
description: |
One sentence describing what it does. Second sentence on trigger scenarios.
Trigger keywords: keyword1, keyword2, keyword3.
version: 1.0.0
allowed-tools:
- read_file
- write_to_file
- replace_in_file
- execute_command
- web_search
disable: false
---
# Skill Name
One paragraph overview: what this Skill does, for whom, and what it outputs.
## Workflow
### Step 1: [Deterministic] Confirm Input
- Read xxx
- Validate xxx exists
- If missing, stop and report
### Step 2: [Deterministic] Load Materials
- Read `reference/xxx.md` (only needed files, don't read everything)
- Read `assets/template.md`
### Step 3: [LLM] Core Generation
- Based on materials above, generate xxx
- Follow these rules:
- Rule 1
- Rule 2
### Step 4: [LLM] Self-Check
- Verify output meets xxx criteria
- If not, fix and re-output
### Step 5: [Deterministic] Save Output
- Write to `output/xxx`
## Hard Rules
> These rules cannot be violated. They take priority over everything else.
1. [Rule 1 — e.g., Never fabricate data]
2. [Rule 2 — e.g., Sensitive content check]
3. [Rule 3 — e.g., Product names must use official names]
## Failure Handling
| Failure Scenario | Action |
|-----------------|--------|
| Source material file not found | Stop generation, report missing file |
| Output exceeds target word count by 50% | Compress and rewrite |
| [Other scenario] | [Action] |
## Output Format
[Define exact output format and required fields]
Run this checklist after completing every Skill design:
name and descriptiondescription contains trigger keywords[Deterministic] or [LLM]user_id not user)For skills running in automation or serving multiple users:
| Anti-Pattern | Description | Correct Approach |
|---|---|---|
| Over-engineering | Complex architecture before a working MVP | Start with simplest SKILL.md, iterate from there |
| Full preload | Dumping all references into context at once | Specify which files to read at each step |
| God Skill | One Skill handling too many responsibilities | Split duties — each Skill does one thing |
| Relative paths | File references using relative paths | Use absolute paths or explicit base paths |
| No guardrails | Missing output checks and failure handling | Every Skill must have hard rules + failure handling |
| All-LLM | Using LLM for every step | Deterministic steps use scripts; LLM only when necessary |
| Vague output | No defined output format | Explicitly define format, fields, and length requirements |
| No evaluation | Shipping without testing | Test with real tasks; observe where the Agent fails |
This guide applies to any Skill/Agent platform:
| Platform | Skill Manifest | Scripts Directory | Notes |
|---|---|---|---|
| ClawHub | SKILL.md | scripts/ | Native support |
| OpenAI GPTs | Instructions + Functions | Code Interpreter | Map concepts to GPT architecture |
| Anthropic Claude | System Prompt + Tools | External functions | Brain=system prompt, Hands=tools |
| LangChain | Chain definition | Runnable lambdas | Patterns map to LCEL |
| Custom Agents | Agent config | Tool implementations | Architecture principles universal |
Key insight: Brain/Hands/Session separation is platform-agnostic. Adapt the file structure to your platform's conventions.
This guide distills official engineering practices from:
When you need more detailed design guidance, load these on demand:
| Scenario | Reference Document |
|---|---|
| Full industry research (Anthropic/OpenAI/LangChain principles) | reference/agent-design-research.md |
| Anthropic tool design detailed guide | reference/anthropic-tool-design.md |
v1.3.0 | Based on Anthropic/OpenAI/LangChain engineering practices | 2026-04-15
Changelog: