write-a-skill
Skill1 starsChanged 3 months agoMITView on GitHub
Create a new Claude Code skill — scaffolds a properly-structured `SKILL.md` (with YAML frontmatter, trigger-rich description, workflow, examples, anti-patterns), drops it in the right location (this library's `skills/`, the project's `.claude/skills/`, or the global `~/.claude/skills/`), and — when adding to the `dennisrongo/claude-skills` library — also updates the README table. Use this skill whenever the user says "create a skill", "write a skill", "new skill", "add a skill", "make a skill", "/write-a-skill", or pastes a SKILL.md URL and asks for something similar — even if they don't explicitly say "skill author".
122 other projects use a version of this.
Adopted by
Most recently taken up by
- robotostudio/hotrodtheir own version, first seen Nov 8, 2026
- aditya-vermax/skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- darkweb19/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use zoom-out, to-issues and 7 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.
victorgarciaesgiSkillzoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
Also in 48 projects that use this
GoogleSkillto-issues
Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.
Also in 43 projects that use this
kennethkeimSkillubiquitous-language
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".
Also in 20 projects that use this
GoogleSkillto-prd
Turn the current conversation into a PRD and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 42 projects that use this
HK-hubSkillprd-to-plan
Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in ./plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".
Also in 7 projects that use this
semtexfromuaSkillhow-to
Курс typing-уроків по існуючому проекту — «як написати його з нуля»: аналіз → план у .practicum/course.md → покрокова генерація уроків. Використовуй для команди /vibe-typing:how-to.
Also in 3 projects that use this
- +1 more from google
Other versions122 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 122
- sanity-io/sanity★ 6.4ksame name
- victorgarciaesgi/regle★ 508same name
- amazingloft999-droid/mattpocock-skills★ 422same name
- InditexTech/weavejs★ 266same name
- ayoubben18/ab-method★ 192same name
- yamcodes/arkenv★ 151same name
- alex-on-ai/WebReaper★ 149same name
- aurorasoft2/Matt_Pocock_Skills★ 133same name
- better-stack-ai/better-stack★ 79same name
- VisualxIntelligence/mattpocok-skills★ 55same name
112 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-reviewSkill
- autopilotSkill
- backlog-plannerSkill
- codebase-explainerSkill
- code-reviewSkill
- context-dietSkill
- conventional-commitsSkill
- create-prSkill
- design-briefSkill
- diagnoseSkill
- dotnet-conventionsSkill
- dotnet-onion-apiSkill
- draw-optionsSkill
- e2e-verifySkill
- githubSkill
- goal-runnerSkill
- grill-with-docsSkill
- handoffSkill
- humanizerSkill
- improve-codebase-architectureSkill
- maestro-mobile-testSkill
- migration-safetySkill
- model-inventorySkill
- nextjs-app-routerSkill
- plan-and-buildSkill
- record-browser-testSkill
- regression-huntSkill
- safe-refactorSkill
- security-reviewSkill
- ship-itSkill
- sql-reviewSkill
- task-executorSkill
- tauri-2-appSkill
- think-like-fableSkill
- upgrade-depsSkill
- worktree-sandboxSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 5 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 118 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Do not auto-trigger when the user is just *discussing* skills, asking how skills work in general, or editing an existing skill's body.
- Distinctive: line 20
Before scaffolding anything, figure out where the new skill belongs.
- Very specific: line 29
If you're in the library repo, prefer that destination — the user can install it elsewhere later with claude-skills install <name>.
- Very specific: line 43
Scaffold from
_template/: if it exists in the destination, otherwise from the template embedded below. - Distinctive: line 53
No nuance clauses ("don't X unless it matters" reopens the negotiation) — express a real exception as its own conditional on something …
- Very specific: line 154
Context budget: Every line of the skill is loaded into the executing model's window.
- Distinctive: line 156
When reviewing a draft, simulate the weakest reader: for each instruction ask "could this be followed *wrong* while technically complying?" …
- Very specific: line 160
Default to a single SKILL.md.
- Very specific: line 165
If you do add either, mention them by relative path from the SKILL.md body so Claude knows they exist.
- Distinctive: line 169
Before showing the draft to the user:
- Very specific: line 244
When adapting a skill from an external source (e.g.
“Common” is measured: kept by at least 6 in 10 of the 118 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.
Files
Write a Skill
Author a new Claude Code skill that Claude will actually trigger when it should. The description field is the only thing Claude sees when deciding whether to load the skill, so most of the effort goes into making that field specific and trigger-rich — not into the body.
When to use this skill
- The user says any of: "create a skill", "write a skill", "new skill", "add a skill", "make a skill", "scaffold a skill", "/write-a-skill".
- The user pastes a URL to an existing
SKILL.md(e.g. a GitHub link to someone else's skill) and asks for "one like this" / "similar to this" / "based on this". - The user describes a recurring workflow ("every time I do X, I want you to Y") that should be packaged as a skill rather than dropped into
CLAUDE.md.
Do not auto-trigger when the user is just discussing skills, asking how skills work in general, or editing an existing skill's body. Wait for an explicit author-a-new-skill cue.
Detect the target location first
Before scaffolding anything, figure out where the new skill belongs. The CWD usually tells you:
| Signal | Target |
CWD is the dennisrongo/claude-skills repo (has bin/claude-skills.js + skills/_template/) | skills/<name>/SKILL.md in this library — and update README table |
| CWD is some other project, user says "project skill" / "for this repo" | ./.claude/skills/<name>/SKILL.md |
| User says "global" / "every project" / "all my sessions" | ~/.claude/skills/<name>/SKILL.md |
| Ambiguous | Ask once with AskUserQuestion — don't guess |
If you're in the library repo, prefer that destination — the user can install it elsewhere later with claude-skills install <name>.
Workflow
- Confirm the trigger — and that a skill is the right tool. Restate in one sentence what the skill is for and the phrases that should trigger it. Bail and ask if either is fuzzy. Don't write a skill for: a one-off solution; a project-specific convention (belongs in
CLAUDE.md/AGENTS.md); or a mechanical constraint a linter, hook, or validation script could enforce (automate it — save prose for judgment calls).- Baseline the failure first (discipline skills). If the skill exists to stop a behavior ("always X before Y", "never Z"), run the tempting scenario in a fresh sub-agent without the skill and capture what it does and the rationalization it uses, verbatim. That transcript is the spec: the skill addresses those rationalizations. No baseline failure → there's nothing to fix; don't write the skill.
- Gather requirements with
AskUserQuestion(one question at a time, max 3–4 total). Pull from this menu — skip ones already answered:- Trigger phrases — what does the user actually say when they want this? Collect 3+ concrete phrases / commands.
- Inputs — does Claude need a file? A URL? Just a free-form description?
- Outputs — files written, commands run, a structured response, a PR?
- Scripts / references — does the skill need bundled executable helpers or long reference docs, or is plain
SKILL.mdenough? - Anti-patterns — what should Claude explicitly not do? (Most-overlooked input — ask for it.)
- Pick the name. kebab-case, 2–4 words, matches what the user says. Use the leading-verb form when the skill does something (
write-a-skill,diagnose,handoff); use the noun form when it defines something (conventional-commits,model-inventory). - Check for collisions.
lsthe target skills directory. If a skill with the same name exists, stop and ask the user whether to overwrite, rename, or extend the existing one. - Scaffold from
_template/if it exists in the destination, otherwise from the template embedded below. Create the parent directory if missing. Draft the SKILL.md using the section structure in Required structure. Write the description LAST — it depends on the body. Match the form to the failure you're fixing:
Baseline failure Right form Wrong form Knows the rule, skips it under pressure Prohibition + rationalization table ("Excuse → Reality") + red-flags list Soft guidance ("prefer…", "consider…") Complies, but output has the wrong shape (bloated, buried verdict) A recipe/contract stating what the output IS — its parts, in order A list of "don't"s (agents negotiate with prohibitions under competing incentives) Omits a required element from something it already produces A REQUIRED slot in the template it fills in A prose reminder near the template Behavior should depend on a condition A conditional keyed to an observable predicate ("if X.mdexists, …")An unconditional rule plus exemption clauses No nuance clauses ("don't X unless it matters" reopens the negotiation) — express a real exception as its own conditional on something observable.
- Write the description carefully — see Writing the description. This is the single highest-leverage part of the file.
- Self-review against the Review checklist before showing the user.
- Prove it works (discipline and technique skills). Re-run the baseline scenario from step 1 in a fresh sub-agent with the skill loaded. Complies → done. Finds a new rationalization → add its counter to the table and re-run. A skill you never watched change behavior is documentation, not a skill. Reference-only skills skip this; test retrieval instead (can a fresh agent find the right entry?).
- Leave out anything sensitive — before the file is saved, not before the push. A skill drafted against real work absorbs the details around it. Check each class and remove it: credentials, tokens and connection strings; personal data (names, email addresses, usernames, and paths that carry them); internal infrastructure (hostnames, IP ranges, database / service / repo names); organization and client names; ticket numbers; and real record or customer IDs. A shared library is a publishing surface, and git history keeps what a later edit removes. Replace with placeholders —
<org>,example.invalidorexample.comfor domains, an address from the documentation range (203.0.113.x) rather than a private one,<repo>,~/projects/<name>— and prefer an invented example to a sanitized real one — a redacted real case still leaks its shape. The rule: a skill should read as if anyone could have written it, anywhere.- ❌
Run the check against 203.0.113.5 with the svc_deploy token before the #4821 rollout — Dana owns that box.— host, credential, ticket and a person, none of which help a reader. - ✅
Run the check against your dev host with a deploy credential before a risky rollout.— same instruction, nothing private.
- ❌
- If targeting the library repo, update
README.md— add a row to the skills table in alphabetical order with a one-paragraph "what it does" hook matching the existing voice. Verify the row by re-reading the file after the edit. - Report back: skill path, the description verbatim, and the install command the user can run on other machines (
npx --yes github:dennisrongo/claude-skills install <name>for library skills).
Required structure
---
name: <kebab-case-name>
description: <see "Writing the description">
---
# <Title Case Name>
<1–2 sentence elevator pitch — what this skill does and why it exists.>
## When to use this skill
- <Concrete trigger phrase or condition>
- <Concrete trigger phrase or condition>
- <Concrete trigger phrase or condition>
<Optional: "Do **not** auto-trigger when …" — explicit non-triggers if the skill has near-neighbors.>
## Workflow
1. <Imperative step>
2. <Imperative step>
3. <Imperative step>
## Examples
### Example 1: <scenario name>
**User:** "<exact phrasing>"
**Claude:** <what the ideal behavior looks like — 1–3 bullets, not a full transcript>
## Anti-patterns
- ❌ <Thing Claude would plausibly do that's wrong>
- ❌ <Thing Claude would plausibly do that's wrong>
- ✅ <The right thing, contrasted>
## Notes
<Caveats, edge cases, things that only matter occasionally. Optional.>Skip sections that would be empty. Reorder only if there's a real reason. Keep the file under ~150 lines — split into references/ if a section grows past that.
Writing the description
The description is the only field Claude reads when deciding whether to consult the skill. Optimize it for that decision:
- First sentence — what the skill produces or does, named concretely (not "helps with X"). One sentence of what, never the how. A description that summarizes the workflow ("runs X, then Y, then reviews Z") becomes a shortcut: the model follows the description and skips the body, so the two-stage step the body carefully specifies runs once. Name the outcome and the scope; leave every process step to the body.
- ❌
Executes plans — dispatches a sub-agent per task with a code review between tasks.(a model reading this does one review and never opens the skill) - ✅
Executes a written implementation plan task-by-task with fresh sub-agents.(outcome + scope; the review protocol lives in the body)
- ❌
- Second sentence —
Use this skill whenever the user says "<phrase 1>", "<phrase 2>", "<phrase 3>", … — even if they don't explicitly say "<skill name>".Include symptoms as well as commands ("flaky", "hanging", "is this a breaking change") — the model searches by problem, not by skill name. - Third sentence (optional) — explicit non-triggers if there's a near-neighbor skill it could be confused with.
- Length — max 1024 chars. Use the budget for trigger phrases, not adjectives or steps.
- Voice — third person, present tense.
Good:
Capture a session hand-off so work can resume cleanly in a new Claude session before context runs out. Writes a canonical dated Markdown file (objective, progress, decisions, files, open issues, and a ready-to-paste "Next Session Prompt") AND a lightweight project-memory pointer to it. Use this skill whenever the user says "/handoff", "hand off", "handoff", "save context", "preserve context", "running out of context", …
Bad:
Helps the user create handoffs.
(The bad one tells Claude nothing about when — it'll under-trigger and the skill effectively doesn't exist.)
The most common failure mode is under-triggering (Claude doesn't load the skill when it should). Err on the side of more trigger phrases — three is the floor, not the ceiling.
Write for the weakest reader
The skill will be executed by whatever model loads it — often a smaller one. A top-tier model fills gaps with judgment; a weak one fills them with confident garbage. Encode the judgment explicitly. Preempt these predictable failure modes:
- Ungrounded claims. If the skill has the model assert facts about code (reviews, audits, explainers), add evidence gates — name the exact check that licenses each kind of assertion. Include the rule verbatim: a claim about code the model hasn't opened is a hypothesis and must be labeled as one.
- ❌ "Flag unused exports." — the model flags whatever it doesn't recognize.
- ✅ "Flag an export as unused only after a repo-wide grep for its name returns no callers outside its own file. Read the whole function before judging it, not just the diff hunk."
- Severity inflation / padding. Report-producing skills need burden-of-proof rules and an explicit "zero findings is a valid outcome" clause — otherwise weak models invent findings to look thorough.
- ❌ "Be rigorous about severity." — everything still gets marked critical.
- ✅ "A
blockermust name a concrete failure scenario in one sentence (user does X → wrong Y). No scenario → demote tosuggestion. Zero blockers is a valid result."
- Confabulated success. Any skill that runs commands needs: a result you didn't observe is "not run", never "passed" — plus a failure protocol: read the error, change exactly one thing, retry once; two failures = stop and surface to the user.
- ❌ "Run the tests and fix any failures." — the model may report "tests pass" without running them.
- ✅ "Run the test command and quote its summary line in your report. If you did not run it, write
tests: not run."
- Contrastive examples beat rules. Weak models imitate examples more than they follow rules. Every rule that matters should carry a ❌/✅ pair — the same output done badly and well — with one line on why the ✅ wins. A rule without an example is a suggestion.
- Forking questions. Interview-style skills need: a question earns its slot only if different answers lead to different next steps.
- ❌ "Should this be robust and user-friendly?" — every answer leads to the same next step; it's filler.
- ✅ "Postgres or SQLite?" — each answer changes the migration step that follows.
- Re-anchoring. Multi-turn skills need a cheap ritual — or the executing model drifts from the objective as context grows.
- ❌ A 9-step workflow with no checkpoint — by step 6 the model is optimizing the wrong thing.
- ✅ "Before each step, restate the goal in one line. If the step doesn't serve it, stop."
- Context budget. Every line of the skill is loaded into the executing model's window. Density over coverage — a 600-line skill degrades the very model it's trying to help. Cut before you split; split into
references/before you exceed ~150 lines.
When reviewing a draft, simulate the weakest reader: for each instruction ask "could this be followed wrong while technically complying?" If yes, tighten it with a check, a threshold, or an example.
When to add scripts or reference files
Default to a single SKILL.md. Only escalate when:
- Scripts (
scripts/*.{js,sh,py}) — the operation is deterministic and Claude would otherwise regenerate the same code each call (validators, formatters, scaffolders). Scripts save tokens and improve reliability. - References (
references/*.md) — long lookup tables, exhaustive option lists, or domain glossaries that Claude only needs occasionally. Link fromSKILL.mdrather than inlining.
If you do add either, mention them by relative path from the SKILL.md body so Claude knows they exist.
Review checklist
Before showing the draft to the user:
name:matches the directory name exactlydescription:starts with what the skill does (outcome + scope, no workflow steps), then "Use this skill whenever the user says …"- Discipline skill: baseline failure observed without the skill; compliance observed with it; rationalization table + red-flags list present
- Guidance form matches the failure type (prohibition / recipe / required slot / conditional)
- Description includes ≥ 3 concrete trigger phrases / commands
- Description ends with "— even if they don't explicitly say …" escape hatch
## When to use this skilllists the same triggers as bullets (so the body reinforces the description)- Workflow steps are imperative and verifiable, not vibes ("Verify X exists", not "Be careful")
- At least one concrete example
- Anti-patterns section names plausible wrong behaviors, not strawmen
- Each rule that matters carries a ❌/✅ pair of the same output done badly and well
- Each assertion the skill asks the model to make has an evidence gate — the exact check that licenses it
- Report-producing skills state "zero findings is a valid outcome"; command-running skills state "a result you didn't observe is 'not run', never 'passed'"
- No time-sensitive info (specific dates, "as of 2026", model version numbers) unless load-bearing
- File is under ~150 lines; longer content is split into
references/ - Nothing sensitive survives — credentials or tokens, personal data (names, emails, usernames, paths carrying them), internal hosts or IP ranges, real repo/system/database names, organization or client names, ticket numbers, record IDs. It reads as if anyone could have written it, anywhere
- If targeting the library repo, README table row is added in alphabetical order
Examples
Example 1: Library skill from scratch
User: "/write-a-skill — I want one that runs eslint --fix and stages the changes whenever I say 'lint this'"
Claude:
- Confirms the trigger phrases ("lint this", "fix lint", "/lint-and-stage") via
AskUserQuestion. - Names it
lint-and-stage, scaffoldsskills/lint-and-stage/SKILL.mdfrom_template/. - Fills in the workflow (run
eslint --fix, rungit add -u, summarize changed files). - Writes a description with all three trigger phrases.
- Adds a row to
README.mdskills table. - Reports the path and the install command.
Example 2: "One like this" from a pasted URL
User: "Create a skill like https://github.com/mattpocock/skills/blob/main/skills/productivity/write-a-skill/SKILL.md but for our repo"
Claude:
- Fetches the URL, reads the source skill.
- Identifies what to keep (process, description requirements, checklist) and what to adapt (directory structure, README updates, this repo's voice).
- Scaffolds the adapted version, gets user sign-off, writes the file.
Example 3: Project-scoped skill
User: "Add a skill just for this repo that reminds me to run pnpm changeset before any feat/fix commit"
Claude:
- Detects CWD is not the library repo → targets
./.claude/skills/changeset-reminder/SKILL.md. - Creates
.claude/skills/if missing. - Drafts a tiny skill keyed on
git commit/ "commit" triggers that checks for a changeset file and warns if missing. - Does not touch the library README.
Anti-patterns
- ❌ Writing a vague description like "Helps with commits." — Claude won't trigger it. Always include explicit trigger phrases.
- ❌ Summarizing the workflow in the description — the model follows the summary and never reads the body.
- ❌ Shipping a discipline skill without watching an agent fail without it and comply with it — you don't know what it teaches.
- ❌ Fixing a wrong-shaped output with a list of "don't"s — state what the output IS instead.
- ❌ Inventing trigger phrases the user didn't confirm — ask, don't guess.
- ❌ Padding
SKILL.mdwith motivational prose. Every line should change Claude's behavior; if removing it changes nothing, cut it. - ❌ Delegating judgment to the executing model ("use discretion", "be careful", "apply good judgment") — name the check, the threshold, and the fallback instead.
- ❌ Stating a load-bearing rule without a ❌/✅ pair — weak models imitate examples, not prose.
- ❌ Hard-coding model names, package versions, or dates that will rot. Resolve at runtime when possible.
- ❌ Putting executable behavior in
SKILL.mdprose when a 10-line script would be deterministic and cheaper. - ❌ For library skills: drafting the SKILL.md but forgetting to update the README table — the skill is invisible to anyone browsing the repo.
- ❌ Overwriting an existing skill without confirmation when the names collide.
- ✅ Trigger-rich description, imperative workflow, one concrete example, explicit anti-patterns, under 150 lines.
Notes
- The library repo's
_template/SKILL.template.mdis the canonical starting point when working insidedennisrongo/claude-skills. It lives outsideskills/(soclawhub synccan't publish it and the installer can't pick it up) — copy it in asskills/<name>/SKILL.md. - When adapting a skill from an external source (e.g. another GitHub repo), credit the inspiration in a
## Notesline — don't copy verbatim if the voice doesn't match this repo's existing skills. - Skills installed to
~/.claude/skills/are picked up by every Claude Code session globally;.claude/skills/in a project is scoped to that repo. The library repo'sskills/<name>/is the source — not where Claude reads from at runtime.
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
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.

