一键导入
skill-creation
Use when creating a new skill, improving an existing skill, or deciding what a skill should contain and how it should be structured
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating a new skill, improving an existing skill, or deciding what a skill should contain and how it should be structured
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when constructing or interpreting the approval handoff envelope between subagent and orchestrator -- sealed_payload schema, approval_id format, APPROVAL_REQUEST contract shape, and reading a granted approval from the DB
Use when producing any agent response
Use when classifying any operation before executing it, or deciding whether user approval is required
Use when a mutative command was blocked by the hook and you need to request user approval, or when presenting a plan for a T3 operation before executing it
Use when the user wants to build, design, or extend a diagram — an architecture overview, a timeline, a planner board, a flow diagram, a presentation, a comparison, or a mind-map — as a portable, data-driven deck rendered from plain YAML. Triggers — "build a diagram", "architecture diagram", "diagram deck", "timeline", "flow diagram", "planner board", "add a page/section/component to the diagram".
Use when the user wants something to run routinely / on a schedule rather than once now -- "tarea programada", "rutinariamente", "cada mañana", "cada N horas", "todas las noches", "schedule", "cron". Covers mounting, structuring, and running an unattended headless task that reports back, plus consuming its reports. NOT for a live in-session agentic loop (that is agentic-loop).
| name | skill-creation |
| description | Use when creating a new skill, improving an existing skill, or deciding what a skill should contain and how it should be structured |
| metadata | {"user-invocable":false,"type":"technique"} |
Injected procedural knowledge -- the "how" for agents. The agent brings identity and domain knowledge. The skill brings process and protocol. They never duplicate each other.
Type determines structure. Choose before writing anything.
| Type | Purpose | When it applies |
|---|---|---|
| Discipline | Enforces rules the agent will rationalize around under pressure | command-execution, execution |
| Technique | How to think about or approach a class of problem | investigation, approval |
| Reference | Lookup tables, classifications, format specifications | security-tiers, fast-queries, git-conventions |
| Domain | Project-specific patterns for a technical area | gaia-patterns |
| Protocol | System operating contract -- state machines, mandatory formats | agent-protocol |
With the type chosen, place the skill before you structure it: where it lives in a flow, and what it can affect. Treat these as one gate with two coupled facets -- position is what sets blast radius.
The consequence is why the gate exists. A mid-flow skill inherits state and assumptions from upstream; write it as though it started clean and it either redoes work already settled or emits what the next step cannot consume -- and because that output is consumed downstream, the break propagates instead of staying local. A wrong position mis-scopes everything the skill's process assumes and produces.
The gate is conditional on the type from Step 1, not universal:
When position is load-bearing and the flow is not determinable from the context you were given, ask the user where the skill sits before writing -- do not guess; when the context fixes it or the type makes it irrelevant, do not ask.
This is frame before action applied to the skill you are placing: a unit of work has a past that set it up and a future that consumes it. See agent-protocol ("Frame before action") for that principle at the agent-turn level.
Discipline: Iron Law -> Mental Model -> Rules -> Traps -> Anti-patterns. Each trap and anti-pattern names a principle of failure -- one row per failure mode, not one row per concrete instance. If three rows are subcases of the same principle, one row that names the principle teaches more than three rows that enumerate.
Technique: Overview (core principle + when to use) -> Process (numbered steps) -> Anti-patterns.
Reference: Quick-scan table at top -> Examples -> Edge cases / special rules.
Domain: Conventions (naming, structure) -> Examples/snippets -> Key rules -> links to reference files.
Protocol: State machine / flow -> Mandatory format -> State transitions -> Error handling.
The first sentence states what the skill IS and does, in its own terms. Never open by contrast ("this is NOT X"): that forces the reader to already know X, so the skill stops being self-contained. If you must disambiguate from a sibling skill, do it after the self-definition and frame it as a pointer for continuation ("for the universal envelope see agent-protocol"), not as the definition.
Cross-referencing another skill for flow continuation (handoff, "see X for the next step") is correct and avoids duplication. Defining your skill by contrast with another ("unlike X, this...") is not -- the first keeps you self-contained, the second couples your meaning to a skill the reader may not have loaded.
See examples.md for a before/after of each prose failure mode.
A rule without context ("ALWAYS do X") carries almost no weight in the LLM's reasoning -- the model has no reason to prioritize it over competing signals. An explanation with consequences carries enough weight to influence decisions even under pressure. Every line competes for attention; earn each one with reasoning the model can use.
The dual test: for each row in a Traps or Anti-patterns table, ask -- is this a separate principle, or is it the same principle as a row already there? If the latter, fold it in. Specificity competes with itself: five rows that share a principle each carry one-fifth the weight of one row that names the principle, because the model spreads attention across them.
The test: for each rule, ask -- if the agent saw enough examples of this going wrong, would it reach the same conclusion? If yes, you are capturing genuine wisdom. If no, it needs more context.
For detailed guidance on tone by type, see reference.md.
Triggering conditions only -- describing the process causes the agent to follow the description and skip reading the content. See agent-creation/SKILL.md Step 4 for the bad/good example pattern.
| Injection method | Budget | Reason |
|---|---|---|
| Frontmatter (always loaded) | < 100 lines | Loaded on every agent call |
| On-demand (read from disk) | < 500 lines | Loaded only when explicitly needed |
Size is not the only criterion. The canonical contract/schema that IS the skill's purpose belongs in SKILL.md even when large; reference.md holds the deep mechanics (internals, walkthroughs, edge cases) that a reader needs only occasionally. Ask "is this the primary thing the skill exists to state?" before "is this big?".
Heavy reference material -> reference.md (on-demand). Concrete examples -> examples.md. Executable tools -> scripts/.
skill-name/
├── SKILL.md <- main content (always loaded)
├── reference.md <- heavy docs (on-demand)
├── examples.md <- concrete examples (on-demand)
└── scripts/ <- executable tools
Create new skill: Distinct behavioral concern not covered by existing skills. Domain knowledge inline in an agent that applies to multiple agents.
Update existing skill: Agent ignores a rule the skill already defines -> strengthen with traps. Skill is missing a type-appropriate section.
Put elsewhere: Project-specific config -> CLAUDE.md or agent inline. Single-agent-only behavior -> keep inline. Knowledge the LLM covers well from training -> not needed.
When creating a new skill: Also update skills/README.md to add the new skill to the index. Load Skill('readme-writing') to do this correctly.
activate_db_pending_by_prefix), not line ranges (approval_grants.py:1679-1955) -- a symbol survives edits, a line number does not. For Reference skills especially, every named artifact must be verifiable -- cite the file and symbol. Verify before you assert.