agentleFS
ZunoSmartLabsZunoSmartLabs/zsl-superpowers/skills/productivity/writing-great-skills/SKILL.md

writing-great-skills

Skill2 starsChanged 2 months agoMITView on GitHub

Principles and vocabulary for authoring great agent skills — progressive disclosure, sharp descriptions/triggers, when to bundle scripts, and the structure that keeps SKILL.md small. Use when writing, designing, reviewing, or improving a skill, or when asked how to make a skill fire reliably.

57 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use batch-grill-me, loop-me and 8 more.

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.
  • 47thtechcornerSkill

    batch-grill-me

    A relentless interview that asks every frontier question at once, round by round.

    Also in 4 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 10 projects that use this

  • kayamanSkill

    request-refactor-plan

    Guides creating a detailed refactor plan with tiny commits via user interview, then files it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

    Also in 7 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 5 projects that use this

  • qhuang20Skill

    migrate-to-shoehorn

    Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

    Also in 9 projects that use this

  • RoentekSkill

    writing-beats

    Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.

    Also in 7 projects that use this

  • +2 more from Roentek

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 54 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add a bundled script when the operation is deterministic (validation, formatting, a fixed serialization), the same code would otherwise be …

    line 79

“Common” is measured: kept by at least 6 in 10 of the 54 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

Writing Great Skills

A principles-and-vocabulary reference for authoring skills that are small, discoverable, and fire reliably. This is the reference — not a wizard. Reach for it when you're designing a new skill or sharpening an existing one. Shared terms live in GLOSSARY.md.

The three principles

  1. Progressive disclosure. SKILL.md loads first and costs context on every activation, so keep it small (aim under ~100 lines). Push long-form detail — references, examples, glossaries — into sibling files linked one level deep, read only when the task needs them.
  2. The description is the product. It is the only thing the agent sees when deciding whether to load the skill. A vague description is a skill that never fires (or fires for the wrong prompts). Make it deep, not shallow (see GLOSSARY.md).
  3. Bundle the deterministic, narrate the judgmental. A step with exactly one correct answer (a length cap, a clean-tree check, a fixed serialization) belongs in a bundled script behind a gate — not in prose the model re-derives each run. Everything that needs judgment stays as instructions.

Skill structure

skill-name/
├── SKILL.md           # Frontmatter + small body (required)
├── GLOSSARY.md        # Shared vocabulary (if the skill has its own terms)
├── REFERENCE.md       # Detailed docs (if needed)
├── EXAMPLES.md        # Usage examples (if needed)
└── scripts/           # Deterministic-gate utilities (if needed)
    └── check-something.py

Split a file out when SKILL.md exceeds ~100 lines, content spans distinct domains, or advanced material is rarely needed.

Writing the description

The description is surfaced in the system prompt next to every other skill's. The agent picks based on it alone, so give it exactly two things:

  1. What the skill does (first sentence, third person).
  2. When to reach for it (second sentence: Use when … with concrete keywords, contexts, file types).
  • Good: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
  • Bad: Helps with documents. — gives the agent no way to distinguish this from any other document skill.

Deterministic gate — count the 1024-char cap, don't eyeball it

The harness silently truncates a description over 1024 characters, dropping the trailing Use when … trigger so the skill stops firing for exactly the cases the cut-off text described. len(description) <= 1024 has one correct answer, so check it rather than guessing:

CK=$({ ls "$PWD"/skills/*/writing-great-skills/scripts/check-description-length.py 2>/dev/null
       ls "$HOME/.claude/skills/writing-great-skills/scripts/check-description-length.py" 2>/dev/null
       ls -d "$HOME"/.claude/plugins/cache/zsl-superpowers/zsl/*/skills/*/writing-great-skills/scripts/check-description-length.py 2>/dev/null | sort -Vr; } | head -1)
if [ -n "$CK" ]; then printf '%s' "$DESCRIPTION" | python3 "$CK"; else echo "zsl-gate: check-description-length.py unresolved — count chars by hand (Fallback)"; fi

A FAIL: line means trim before shipping.

Fallback (if $CK is empty): count the characters yourself and confirm <= 1024 — never approve a description by visual length alone. The trailing Use when … clause is the first thing lost to truncation, so a description that looks like two reasonable sentences can still be silently over the cap.

When to add scripts

Add a bundled script when the operation is deterministic (validation, formatting, a fixed serialization), the same code would otherwise be regenerated every run, or errors need explicit handling. Scripts save tokens and improve reliability versus generated code. Every gate script ships with tests, including at least one input the prose way gets wrong.

Review checklist

  • Description names what it does and when to fire (Use when …).
  • Description within 1024 chars (run the gate above — counted, not eyeballed).
  • SKILL.md body stays small; depth lives in linked files one level deep.
  • No time-sensitive info baked into the body.
  • Terminology consistent with GLOSSARY.md.
  • Concrete examples included.
  • Deterministic steps are bundled scripts with a Fallback; judgmental steps stay prose.

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.