agentleFS
LongJohnSilver1504LongJohnSilver1504/claude-skills/skills/writing-skills/SKILL.md

writing-skills

Skill1 starsChanged 2 months agoMITView on GitHub

Author and maintain Claude Code skills that trigger reliably and actually change behavior. Use when creating a new skill, editing an existing SKILL.md or its description, deciding what moves to references/, or verifying a skill works before deployment ("write a skill", "improve this skill", "why doesn't this skill trigger"). NOT for authoring project convention rules in .claude/rules/ or agent definitions in agents/.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 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.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 20 projects that use this

  • kntismSkill

    condition-based-waiting

    Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses

    Also in 3 projects that use this

  • aaddrickSkill

    writing-agents

    Use when creating new agents, editing existing agents, or defining specialized subagent roles for the Task tool

    Also in 3 projects that use this

  • frankxaiSkill

    defense-in-depth

    Use when invalid data causes failures deep in execution, requiring validation at multiple system layers - validates at every layer data passes through to make bugs structurally impossible

    Also in 3 projects that use this

  • +3 more from Leodorareluctant259

The file

We split this skill into the rules it gives an agent

5 rules. 1 is common, 4 are distinctive, and 0 are very specific to this project.

  • 1

    Common

    Most of the 181 edited versions we read keep these.

  • 4

    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:

    Start with "Use when..." and list concrete triggers, symptoms, and situations

    line 38
  2. Common:

    Write in third person (it is injected into the system prompt)

    line 39
  3. Distinctive:

    Run one subagent with a realistic prompt that should trigger the skill

    line 59
  4. Distinctive:

    Check the outcome against what an agent does without the skill

    line 60
  5. Distinctive:

    If the agent ignored or misapplied the skill, fix the description or the ambiguous section and re-run.

    line 63

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

Overview

A skill is a reference guide that teaches future Claude instances a reusable technique, pattern, or workflow — not a narrative about how you solved a problem once. Keep SKILL.md lean, write the description for discovery, and verify the skill actually changes behavior before trusting it.

Canonical methodology: references/anthropic-best-practices.md — Anthropic's full skill-authoring guide (conciseness, progressive disclosure, workflows, scripts, evaluation). Read it when authoring anything non-trivial.

Writing the Description (Most Important Part)

Claude reads only the frontmatter description when deciding whether to load a skill. It must answer: "Should I read this skill right now?"

Rule: the description states WHEN to use the skill — triggers, symptoms, situations. It NEVER summarizes the skill's workflow.

Why: when a description summarizes the process, Claude tends to follow the summary and skip the skill body entirely. A description saying "code review between tasks" caused Claude to run ONE review even though the skill required two; rewriting the description to triggers-only ("Use when executing implementation plans with independent tasks") made Claude read the body and follow both reviews.

# ❌ Summarizes workflow — Claude may follow this instead of reading the skill
description: Use when executing plans - dispatches subagent per task with code review between tasks

# ❌ Too abstract, no trigger
description: For async testing

# ✅ Triggering conditions only
description: Use when executing implementation plans with independent tasks in the current session

# ✅ Symptoms, not process
description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently

Guidelines:

  • Start with "Use when..." and list concrete triggers, symptoms, and situations
  • Write in third person (it is injected into the system prompt)
  • Describe the problem (race conditions, flaky tests), not language-specific symptoms — unless the skill is technology-specific, in which case name the technology explicitly
  • Include keywords Claude would search for: error messages, tool names, synonyms

Structure Checklist

  • Frontmatter has name (letters, numbers, hyphens only) and description (max 1024 chars)
  • A skill that takes an argument declares argument-hint: <what-to-pass> — it is what the user sees on /skill <tab>; without it they guess (the validator requires the <placeholder> form)
  • SKILL.md stays lean — well under 500 lines; move depth to references/ files loaded on demand
  • One canonical copy of any shared reference — never duplicate guidance across skills; cross-reference by skill name instead
  • One excellent code example beats many mediocre ones in multiple languages
  • No @ force-load links to other files (they consume context immediately); use plain paths or skill names
  • Skills that manage long-lived processes (dev servers, watchers, emulators, browsers) define ownership — reuse a healthy process, never kill one the session didn't start, read ports/URLs from real output — and end with a symptom→fix troubleshooting list
  • Written for Claude 5, not against an older model's habits: no CRITICAL/MUST/NEVER without the failure it prevents (bare emphasis now causes over-triggering); no "double-check", "be thorough", "think step by step" (the model does these unprompted — the lines only add re-verification cost); no request to reproduce internal reasoning in the reply (it can be declined and trip safety flags — ask for the conclusion plus the evidence instead); review prompts ask for everything and let a triage step filter (a "be conservative" reviewer withholds real findings).
  • Task sections state outcome + guardrails + a runnable finish line ("the tests pass", "every endpoint is migrated" — not "make it work"), and keep a numbered protocol only where the order itself is the deliverable; documents the skill writes carry a length calibration

Test Before Trusting

For any meaningful new skill (or meaningful edit), verify it works before deploying:

  1. Run one subagent with a realistic prompt that should trigger the skill
  2. Check the outcome against what an agent does without the skill
  3. Confirm the skill actually changed behavior — the agent found it, read it, and followed it

If the agent ignored or misapplied the skill, fix the description or the ambiguous section and re-run. Trivial edits (typos, link fixes) don't need this.

Common Mistakes

MistakeFix
Description summarizes the workflowRewrite to triggers/symptoms only
Everything inline in SKILL.mdMove heavy reference material to references/
Same guidance pasted into multiple skillsKeep one canonical copy, cross-reference it
Narrative "how I solved it once" storytellingDistill into a reusable technique
Deployed without testingRun one subagent check first
Done when: gate that self-attests ("you understand X")Gate on a runnable check — a command plus its expected output
Verdicts without evidence — a reviewer contract or triage step that accepts Superseded / Looks fine / Rejected as a reasonRequire the evidence and the alternative in the reason: superseded by X, which covers A and B; nothing unique remains — a bare label cannot be checked, so it cannot be wrong

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.