agentleFS
aayushostwalaayushostwal/nexus/skills/skill-writer/SKILL.md

skill-writer

Skill19 starsChanged 3 months agoMITView on GitHub

Use for creating, refactoring, or debugging skills and improving SKILL.md trigger quality. Trigger on "write/create/update/improve skill", trigger-miss complaints, pasted-skill feedback, or repeated workflows that should be skillized. Output production-ready skill structure and routing logic.

32 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use frontend-design and skill-creator.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 28 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every SKILL.md must have YAML frontmatter:

    line 28
  2. Distinctive:

    Before writing anything, classify the request:

    line 47
  3. Distinctive:

    If an existing skill covers 60%+ of the use case, offer to extend instead.

    line 51
  4. Distinctive:

    Never decide for the user — present options and wait for direction.

    line 60
  5. Distinctive:

    Ask conversationally — max 2 questions per turn.

    line 82
  6. Distinctive:

    Never assume answers to Q6, Q7, or Q8.

    line 95
  7. Distinctive:

    Use this exact section order.

    line 101
  8. Distinctive:

    Create or update all supporting files for every skill.

    line 121
  9. Distinctive:

    Output contract is law: Every skill run must produce the same structure.

    line 188
  10. Distinctive:

    Failure modes are first-class: Document what goes wrong. Happy-path-only skills fail silently in production.

    line 190

“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Nexus Skill Writer

Produce a complete, production-ready skill every session — not a draft, not a skeleton.


Required Directory Layout

skill-name/
├── SKILL.md                        ← entry point, <500 lines
├── checklists/
│   └── execution-checklist.md
├── anti-patterns/
│   └── common-mistakes.md
└── validation/
    └── output-validation.md

Every SKILL.md must have YAML frontmatter:

---
name: skill-name                  # must exactly match the containing directory
description: >                    # THE TRIGGER MECHANISM — be explicit and dense
  Use this skill when ... [detailed trigger conditions].
  Trigger phrases include: "...", "...", "...".
  Also trigger when ... [edge cases].

---

The description is the single most important field. Claude selects skills based only on name + description. A vague description means the skill never triggers. Under-triggering is the #1 skill failure mode.


Phase 0 — Skill Classification

Before writing anything, classify the request:

New skill or extension?

  1. Scan available_skills in the system prompt.
  2. If an existing skill covers 60%+ of the use case, offer to extend instead.
  3. Present options as a table:
OptionBest whenRisk
Extend existingSame domain, similar triggersMay bloat the existing skill
Create newDistinct triggers, different output contractMaintenance overhead
Merge two skillsOverlapping triggers, narrow scopesWider scope per skill

Never decide for the user — present options and wait for direction.

Category:

CategoryDescription
engineeringCode generation, architecture, implementation
debuggingFailure investigation, root cause, regression
devopsCI/CD, infra, deployments
code-reviewPR review, diff analysis, quality checks
testingTest writing, coverage, test strategy
reliabilitySLOs, on-call, incident management
observabilityLogs, metrics, traces, dashboards
refactoringCode transformation, technical debt
performanceProfiling, optimization, benchmarking

Primary or sub-skill? Primary = own directory + full SKILL.md. Sub-skill = .md inside an existing skill directory (only for very narrow, truly subordinate scope).


Phase 1 — Requirements Gathering (MANDATORY)

Ask conversationally — max 2 questions per turn. Extract answers from context first; only ask what you cannot infer. Do not proceed to Phase 2 without answers to Q1, Q2, Q3.

#QuestionWhy
1What should this skill enable Claude to do?Defines scope
2What phrases/contexts should trigger it?Shapes description
3What is the expected output format?Shapes Output Contract
4Are there constraints? (tools, env, audience)Shapes Compatibility
5Example input + ideal output?Becomes a production example
6What does failure look like? What must never happen?Shapes Failure Modes
7What context must be gathered before acting?Shapes Context Acquisition
8What are the hallucination risks or dangerous assumptions?Shapes Failure Modes

Never assume answers to Q6, Q7, or Q8.


Phase 2 — SKILL.md Writing

Use this exact section order. Adapt depth to domain; do not drop sections.

Required sections (in order):

  1. YAML frontmatter — name + description (specific task triggers and exclusions)
  2. One-liner — what this skill does and why it exists.
  3. Metadata table — Category, Required Tools, Required Context, Expected Inputs, Expected Outputs.
  4. Skill Philosophy — Problem, Why it matters, 2-3 Engineering principles.
  5. Context Acquisition — Named signals with collection methods + explicit "stop and ask" rule for insufficient context.
  6. Execution Workflow — Numbered steps, each with: What (specific verb), How (tool/command), Output, Failure signal.
  7. Engineering Heuristics — IF/THEN/BECAUSE rules with thresholds. No descriptions — only decision rules.
  8. Failure Modes — Table: Failure Mode | Trigger Condition | Mitigation (3+ rows).
  9. Validation — Checkbox list of pass/fail criteria including a Confidence rating.
  10. Output Contract — Table of every output field: name, required/optional, description. Fields: findings, evidence, confidence, risks, recommendations, next_actions.
  11. Anti-Patterns — "Never X → Instead Y" rules (3+ rules).
  12. Examples — At least 1 production-scale input → output reference.

Phase 3 — Supporting Directory Creation

Create or update all supporting files for every skill. These are not optional.

checklists/execution-checklist.md

  • Pre-flight: what to verify before starting
  • Execution: ordered step-by-step checklist
  • Output review: what to check before delivering
  • Post-delivery: follow-up actions for the user

anti-patterns/common-mistakes.md

10 things NOT to do, each with: name, what it looks like, why it fails, what to do instead.

validation/output-validation.md

  • Trigger test: does the skill activate on the right inputs?
  • Completeness test: did it gather enough context?
  • Output test: does output match the Output Contract?
  • Engineering intelligence test: does output encode real expertise?
  • Confidence test: is the confidence rating justified by evidence?

Phase 4 — Quality Validation (Run Before Delivering)

#CheckPass Condition
1Description trigger density5+ distinct, concrete trigger phrases
2Step actionabilityEvery step has a specific verb — read, search, compare, extract, run, list, flag
3Output contract definedOutput Contract table exists with all required fields
4Anti-patterns present3+ "Never do X → do Y instead" rules
5Production example present1+ real production-scale example (not toy)
6Engineering heuristics are decision rulesEach heuristic is IF/THEN/BECAUSE
7Failure modes documented3+ failure modes with mitigations
8Validation criteria definedConcrete pass/fail criteria for testing the skill

State which items passed and which require user input to complete.


Output Format

Deliver finished skill as ready-to-write files. For each file specify:

  1. Absolute path where it should be written
  2. Full content

After delivery, state:

  • Which of the 8 quality checks passed
  • Which (if any) require additional user input
  • The trigger phrases that will activate this skill

Anti-Patterns (for this skill)

  • Never skip Phase 0 — building the wrong skill type wastes everyone's time.
  • Never skip Phase 1 — skills built on assumed requirements miss their triggers.
  • Never write a vague step — "handle appropriately" is not a step. Specify the exact action.
  • Never write a single-sentence description — it will not trigger reliably.
  • Never omit the Output Contract — a skill without one produces inconsistent output every run.
  • Never use toy examples — examples must be production-scale.
  • Never write heuristics as descriptions — "consider complexity" is not a heuristic; "if cyclomatic complexity > 15, flag for mandatory refactor" is.

Core Principles

  • Engineering system, not prompt wrapper: A skill encodes real expertise. "Tell Claude to do X nicely" is a prompt, not a skill.
  • Atomic, not monolithic: One skill, one job. Two distinct workflows = two skills.
  • Context before action: A skill that acts without sufficient context will hallucinate.
  • Output contract is law: Every skill run must produce the same structure.
  • Triggering over completeness: A skill that triggers reliably at 80% beats a perfect skill that never triggers.
  • Failure modes are first-class: Document what goes wrong. Happy-path-only skills fail silently in production.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.