Writing Skills
Create, update, or correct Agent Skills following the agentskills.io open standard.
Mode Selection
Determine the mode from the user's request:
| Signal |
Mode |
Section |
| "Create a skill", "write a skill", "new skill", convert knowledge |
Create |
Create Mode below |
| "Update", "improve", "refactor", "the skill is too verbose" |
Update |
Update Mode below |
| "Fix", "correct", "skill doesn't activate", "skill is broken" |
Correct |
Correct Mode below |
Create Mode (7-Step Process)
Step 1: Gather Concrete Scenarios
Ask or infer 3–5 concrete usage scenarios covering simple, medium, and edge cases:
| Column |
Content |
| User Says |
The natural-language trigger phrase |
| Skill Should Do |
The expected agent behaviour |
Conclude when you have clear scenarios with at least one edge case.
Step 2: Plan Resources
For each scenario, identify reusable elements:
| Element Type |
When to Use |
Path |
| Script |
Same code rewritten repeatedly; deterministic reliability needed |
scripts/ |
| Reference |
Detailed docs needed on demand (schemas, API docs, checklists) |
references/ |
| Asset |
Templates, boilerplate, images copied into output |
assets/ |
Output a resource list with justification for each item. If none are needed, skip subdirectories.
Step 3: Scaffold Directory
Create the skill directory. Name: 1–64 chars, lowercase + hyphens only. Prefer gerund form (processing-pdfs, reviewing-code). Noun phrases and action-oriented names are also acceptable:
.github/skills/<skill-name>/
├── SKILL.md
├── scripts/ (if needed)
├── references/ (if needed)
└── assets/ (if needed)
Step 4: Write the Skill
Work in this order: resources → frontmatter → body.
4a. Resources first. Create scripts, references, and assets identified in Step 2. For scripts: avoid hardcoded credentials, include --dry-run for destructive operations, pin dependency versions, and design for non-interactive (CLI arguments, not prompts).
4b. Frontmatter + Body. Read references/frontmatter-guide.md for the frontmatter template, description rules, body patterns, and body writing rules. Apply them in order: frontmatter first (the description is the most critical field — it determines whether the skill ever activates), then write the procedural body.
Step 5: Validate
Structural checks:
Functional checks:
Step 6: Iterate
Observe agent behaviour on real tasks. If struggles occur:
- Identify the gap (missing step, unclear instruction, wrong freedom level).
- Apply the fix.
- Re-validate (Step 5 above).
Step 7: Cross-Model Convergence
Ensure the skill produces equivalent output on GPT 4.1 compared to the Claude Opus baseline.
- Establish baseline. Set the agent model to Claude Opus. Run a representative test scenario and save the output as the reference baseline.
- Switch model. Change the agent model to GPT 4.1.
- Run the same scenario. Execute the identical test scenario on GPT 4.1.
- Compare outputs. Diff the GPT 4.1 output against the Opus baseline. Focus on:
- Structural completeness (all sections/steps present)
- Correctness of content (no hallucinated or missing details)
- Consistent terminology and tone
- Resource references resolve and are used properly
- Diagnose divergences. If GPT 4.1 output differs materially:
- Skipped steps → Make instructions more explicit; remove ambiguity the model could exploit.
- Over-verbose or under-verbose → Tighten length guidance or add output examples.
- Wrong format → Add concrete format templates or examples inline.
- Hallucinated content → Add guardrails ("Only use information from …", "Do not invent …").
- Missed context → Move critical context from references into the body, or add explicit read instructions.
- Apply fixes and re-test. After each adjustment, re-run the scenario on GPT 4.1 and compare again.
- Verify Opus is not regressed. Switch back to Claude Opus and confirm the baseline output is still equivalent.
- Repeat until acceptable. Iterate steps 3–7 until GPT 4.1 output is the same or acceptably close to the Opus baseline.
Update Mode
- Read the existing skill's SKILL.md and all bundled resources.
- Identify the user's concern or improvement goal.
- Diagnose against references/anti-patterns.md (Encyclopedia, Ghost Trigger, False Positive, Duplication Trap, Orphan Resource, Context Hog, README Creep, Monolith, Rules Skill, First-Person Desc).
- Apply improvements:
- Body too long → Move detail to
references/, keep body procedural.
- Description misses triggers → Rewrite with the description formula (Step 4b above).
- Overlapping with another skill → Narrow descriptions, add "Do not use for:" boundaries.
- Missing resources → Add scripts for deterministic tasks, references for deep docs.
- Inconsistent terminology → Pick one term, use it everywhere.
- Re-validate (Step 5 above).
Correct Mode
- Validate structure (Step 5 structural checks).
- If structural issues found, fix them first.
- Use diagnostic tooling:
skills-ref to-prompt to see what the agent sees, skills-ref validate for structural checks, and VS Code Chat Diagnostics (settings gear → Diagnostics) for activation logs.
- Diagnose the behavioural issue:
| Symptom |
Likely Cause |
Fix |
| Skill never activates |
Description too vague or missing keywords |
Rewrite description with trigger formula |
| Activates for wrong tasks |
Description too broad |
Narrow keywords, add anti-triggers |
| Agent ignores body sections |
Body too long or verbose |
Shorten, move detail to references/ |
| References not loaded |
Broken relative paths |
Verify link paths resolve to existing files |
| Scripts fail |
Missing deps or wrong interpreter |
Add compatibility field, test script standalone |
| Conflicts with another skill |
Overlapping trigger domains |
Narrow descriptions on both skills |
| Slash command missing |
name mismatch or user-invokable: false |
Fix name to match directory, check frontmatter |
| Agent doesn't follow steps |
Instructions too vague or too verbose |
Rewrite with more specific imperative steps |
- Apply fixes.
- Re-validate (Step 5 above).
Deep Reference
For detailed guidance on any aspect, read specific sections from references/skill-writer-guide.md:
- Description / trigger engineering → search for
## 7. Writing Effective Descriptions
- Body content patterns → search for
## 8. Writing Effective Body Content
- Progressive disclosure patterns → search for
## 6. Progressive Disclosure Patterns
- Anti-patterns (full gallery) → search for
## 12. Anti-Patterns Gallery
- Worked examples → search for
## 13. Examples and Case Studies
- Naming conventions → search for
## 15. Naming Conventions
- Security considerations → search for
## 16. Security Considerations
- Debugging and troubleshooting → search for
## 18. Debugging and Troubleshooting
- Skill composition → search for
## 19. Skill Composition
- Quick-reference card → search for
## 21. Quick-Reference Card
Source: pslits/copilot-session-feedback — distributed by TomeVault.
1---2name: writing-skills-323description: Creates, updates, and corrects Agent Skills following the agentskills.io open standard and the Skill Writer's Guide. Covers the full skill lifecycle: scaffolding directory structure, writing frontmatter with trigger-engineered descriptions, composing procedural body content, planning bundled resources (scripts, references, assets), and validating structure and behaviour. Use when: creating a new skill, updating or improving an existing skill, correcting or fixing a broken skill, converting session knowledge or documentation into a skill, reviewing a skill for anti-patterns, or writing SKILL.md files. Triggers on: 'create skill', 'write skill', 'new skill', 'update skill', 'fix skill', 'correct skill', 'review skill', 'SKILL.md', 'skill writer', 'agent skill'. Do not use for: writing copilot-instructions.md, agent.md, prompt.md, or hook configurations.4---56# Writing Skills78Create, update, or correct Agent Skills following the agentskills.io open standard.910## Mode Selection1112Determine the mode from the user's request:1314| Signal | Mode | Section |15|--------|------|---------|16| "Create a skill", "write a skill", "new skill", convert knowledge | **Create** | Create Mode below |17| "Update", "improve", "refactor", "the skill is too verbose" | **Update** | Update Mode below |18| "Fix", "correct", "skill doesn't activate", "skill is broken" | **Correct** | Correct Mode below |1920---2122## Create Mode (7-Step Process)2324### Step 1: Gather Concrete Scenarios2526Ask or infer 3–5 concrete usage scenarios covering simple, medium, and edge cases:2728| Column | Content |29|--------|---------|30| User Says | The natural-language trigger phrase |31| Skill Should Do | The expected agent behaviour |3233Conclude when you have clear scenarios with at least one edge case.3435### Step 2: Plan Resources3637For each scenario, identify reusable elements:3839| Element Type | When to Use | Path |40|-------------|-------------|------|41| **Script** | Same code rewritten repeatedly; deterministic reliability needed | `scripts/` |42| **Reference** | Detailed docs needed on demand (schemas, API docs, checklists) | `references/` |43| **Asset** | Templates, boilerplate, images copied into output | `assets/` |4445Output a resource list with justification for each item. If none are needed, skip subdirectories.4647### Step 3: Scaffold Directory4849Create the skill directory. Name: 1–64 chars, lowercase + hyphens only. Prefer gerund form (`processing-pdfs`, `reviewing-code`). Noun phrases and action-oriented names are also acceptable:5051```52.github/skills/<skill-name>/53├── SKILL.md54├── scripts/ (if needed)55├── references/ (if needed)56└── assets/ (if needed)57```5859### Step 4: Write the Skill6061Work in this order: resources → frontmatter → body.6263**4a. Resources first.** Create scripts, references, and assets identified in Step 2. For scripts: avoid hardcoded credentials, include `--dry-run` for destructive operations, pin dependency versions, and design for non-interactive (CLI arguments, not prompts).6465**4b. Frontmatter + Body.** Read [references/frontmatter-guide.md](references/frontmatter-guide.md) for the frontmatter template, description rules, body patterns, and body writing rules. Apply them in order: frontmatter first (the description is the most critical field — it determines whether the skill ever activates), then write the procedural body.6667### Step 5: Validate6869**Structural checks:**7071- [ ] `name` matches directory name72- [ ] `description` ≤ 1,024 characters, non-empty, no XML tags73- [ ] `name`: 1–64 chars, lowercase alphanumeric + hyphens, no leading/trailing/consecutive hyphens, no reserved words (`anthropic`, `claude`)74- [ ] Body ≤ 500 lines75- [ ] No extraneous files (README.md, CHANGELOG.md, INSTALLATION_GUIDE.md)76- [ ] All resources referenced from body (no orphan files)77- [ ] All resource links resolve to existing files7879**Functional checks:**8081- [ ] Trigger test: a relevant query activates the skill82- [ ] Negative trigger test: an unrelated query does not activate it83- [ ] Procedure test: following the steps produces correct output84- [ ] Edge case test: ambiguous inputs and missing context handled gracefully85- [ ] Multi-model test: consistent behaviour on at least two model sizes86- [ ] Scripts execute successfully (if any)8788### Step 6: Iterate8990Observe agent behaviour on real tasks. If struggles occur:91921. Identify the gap (missing step, unclear instruction, wrong freedom level).932. Apply the fix.943. Re-validate (Step 5 above).9596### Step 7: Cross-Model Convergence9798Ensure the skill produces equivalent output on GPT 4.1 compared to the Claude Opus baseline.991001. **Establish baseline.** Set the agent model to Claude Opus. Run a representative test scenario and save the output as the reference baseline.1012. **Switch model.** Change the agent model to GPT 4.1.1023. **Run the same scenario.** Execute the identical test scenario on GPT 4.1.1034. **Compare outputs.** Diff the GPT 4.1 output against the Opus baseline. Focus on:104 - Structural completeness (all sections/steps present)105 - Correctness of content (no hallucinated or missing details)106 - Consistent terminology and tone107 - Resource references resolve and are used properly1085. **Diagnose divergences.** If GPT 4.1 output differs materially:109 - **Skipped steps** → Make instructions more explicit; remove ambiguity the model could exploit.110 - **Over-verbose or under-verbose** → Tighten length guidance or add output examples.111 - **Wrong format** → Add concrete format templates or examples inline.112 - **Hallucinated content** → Add guardrails ("Only use information from …", "Do not invent …").113 - **Missed context** → Move critical context from references into the body, or add explicit read instructions.1146. **Apply fixes and re-test.** After each adjustment, re-run the scenario on GPT 4.1 and compare again.1157. **Verify Opus is not regressed.** Switch back to Claude Opus and confirm the baseline output is still equivalent.1168. **Repeat until acceptable.** Iterate steps 3–7 until GPT 4.1 output is the same or acceptably close to the Opus baseline.117118---119120## Update Mode1211221. Read the existing skill's SKILL.md and all bundled resources.1232. Identify the user's concern or improvement goal.1243. Diagnose against [references/anti-patterns.md](references/anti-patterns.md) (Encyclopedia, Ghost Trigger, False Positive, Duplication Trap, Orphan Resource, Context Hog, README Creep, Monolith, Rules Skill, First-Person Desc).1254. Apply improvements:126 - **Body too long** → Move detail to `references/`, keep body procedural.127 - **Description misses triggers** → Rewrite with the description formula (Step 4b above).128 - **Overlapping with another skill** → Narrow descriptions, add "Do not use for:" boundaries.129 - **Missing resources** → Add scripts for deterministic tasks, references for deep docs.130 - **Inconsistent terminology** → Pick one term, use it everywhere.1315. Re-validate (Step 5 above).132133---134135## Correct Mode1361371. Validate structure (Step 5 structural checks).1382. If structural issues found, fix them first.1393. Use diagnostic tooling: `skills-ref to-prompt` to see what the agent sees, `skills-ref validate` for structural checks, and VS Code Chat Diagnostics (settings gear → Diagnostics) for activation logs.1404. Diagnose the behavioural issue:141142| Symptom | Likely Cause | Fix |143|---------|-------------|-----|144| Skill never activates | Description too vague or missing keywords | Rewrite description with trigger formula |145| Activates for wrong tasks | Description too broad | Narrow keywords, add anti-triggers |146| Agent ignores body sections | Body too long or verbose | Shorten, move detail to references/ |147| References not loaded | Broken relative paths | Verify link paths resolve to existing files |148| Scripts fail | Missing deps or wrong interpreter | Add `compatibility` field, test script standalone |149| Conflicts with another skill | Overlapping trigger domains | Narrow descriptions on both skills |150| Slash command missing | `name` mismatch or `user-invokable: false` | Fix `name` to match directory, check frontmatter |151| Agent doesn't follow steps | Instructions too vague or too verbose | Rewrite with more specific imperative steps |1521535. Apply fixes.1546. Re-validate (Step 5 above).155156---157158## Deep Reference159160For detailed guidance on any aspect, read specific sections from [references/skill-writer-guide.md](references/skill-writer-guide.md):161162- Description / trigger engineering → search for `## 7. Writing Effective Descriptions`163- Body content patterns → search for `## 8. Writing Effective Body Content`164- Progressive disclosure patterns → search for `## 6. Progressive Disclosure Patterns`165- Anti-patterns (full gallery) → search for `## 12. Anti-Patterns Gallery`166- Worked examples → search for `## 13. Examples and Case Studies`167- Naming conventions → search for `## 15. Naming Conventions`168- Security considerations → search for `## 16. Security Considerations`169- Debugging and troubleshooting → search for `## 18. Debugging and Troubleshooting`170- Skill composition → search for `## 19. Skill Composition`171- Quick-reference card → search for `## 21. Quick-Reference Card`172173---174> Source: [pslits/copilot-session-feedback](https://github.com/pslits/copilot-session-feedback) — distributed by [TomeVault](https://tomevault.io).175<!-- tomevault:4.0:skill_md:2026-06-16 -->