Write Skill
Create or update a concise, well-routed Agent Skill grounded in supplied source material.
Inputs
- Goal, trigger and do-not-trigger cases, source material, and any reusable scripts, references, or templates.
- Required tools, license, and runtime. If unspecified, use the host license and minimum necessary tools, and disclose those defaults.
Workflow
- Confirm scope. For a vague new skill, ask for trigger boundaries before writing. For an existing package, inspect its files before changing them.
- Choose a lowercase-hyphen name matching the directory. Read
references/formatter_fields.mdwhen drafting or auditing frontmatter; preserve concrete trigger terms and do-not-trigger cases. - Route content deliberately. Keep active decisions in
SKILL.md, reusable deterministic work inscripts/, on-demand reasoning material inreferences/, and output-only material inassets/. Readreferences/writing_principles.mdwhen the split or instruction freedom is unclear. Do not duplicate content across them or create empty folders. - For a new directory, run
scripts/scaffold_skill.sh <skill-name> [output-dir] [components]. It refuses existing directories; ask the user before any overwrite. - Write or revise the active body: prerequisites, ordered decision path,
safety gates, script invocations, conditional reference pointers, and
output contract. Read
references/full_template.mdonly when selecting a structure or drafting a new skill. - Validate name/directory match, description routing quality, no empty bundled folders, executable referenced scripts, and a body below roughly 5,000 tokens. Move detail to a referenced file instead of deleting safety guidance.
| Condition | Action |
|---|---|
| Missing domain source for fragile specifics | Mark the gap and ask for documentation; do not invent it. |
| Description exceeds budget | Remove redundant trigger prose before anti-triggers. |
| Existing target directory | Stop and request overwrite approval. |
| Referenced resource unavailable | Name it and pause; do not fabricate it. |
Compact cases
- New Terraform review skill with supplied policy → scaffold → place the
policy in references and the decision path in
SKILL.md. - Existing directory without overwrite approval → report the conflict → stop.
Resources
scripts/scaffold_skill.sh: creates new package skeletons (step 4).references/formatter_fields.md: frontmatter and budget checks (step 2).references/writing_principles.md: bundling and instruction guidance (step 3).references/full_template.md: structural template (step 5).assets/skill_template.md: scaffold starter content (used by the script).
Output
Return the changed folder tree, relevant SKILL.md content or diff, and the
description/token-budget validation result with any defaults called out.