authoring-project-skills
Skill1 starsChanged 5 months agoMITView on GitHub
Use when creating, updating, reviewing, or deciding whether to write a project skill (docs/skills/*.md) — covers the file template, verb-led naming, the quality bar, the pre-write 5-weakness self-check, and when NOT to write a skill. Pairs with the always-on "scan docs/skills before a task / create-or-update after" rule in CLAUDE.md.
In this repository40 other files it gives its agents.
- background-jobs-and-cachingSkill
- code-conventionsSkill
- containerize-and-ship-a-serviceSkill
- database-migrationsSkill
- design-an-error-modelSkill
- git-flowSkill
- handle-files-frontendSkill
- import-data-from-csvSkill
- integrate-external-servicesSkill
- integrate-identity-providersSkill
- integrate-internal-servicesSkill
- keep-service-memory-leanSkill
- operate-ecs-services-safelySkill
- prevent-secret-and-pii-leaksSkill
- release-safetySkill
- render-transactional-emailsSkill
- rules-backendSkill
- rules-code-styleSkill
- rules-debuggingSkill
- rules-gitSkill
- rules-infraSkill
- rules-pr-reviewSkill
- rules-shippingSkill
- rules-workflowSkill
- schedule-effective-dated-changesSkill
- secure-a-frontend-appSkill
- security-auditSkill
- send-slackSkill
- serve-realtime-with-websocketsSkill
- structure-a-backend-serviceSkill
- structure-a-frontend-appSkill
- structure-a-shared-backend-libSkill
- structure-a-shared-ui-libSkill
- tdd-http-firstSkill
- use-feature-flagsSkill
- write-cross-cutting-codeSkill
- write-frontend-codeSkill
- write-frontend-testsSkill
- write-service-codeSkill
- write-unit-testsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
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
- Distinctive: line 28
If the generalized version would duplicate an existing skill, update that skill instead.
- Distinctive: line 48
Re-test "non-obvious" against existing tooling: Check whether the stack trace, logs, or error message *already* surface the cause (e.g.
- Distinctive: line 52
Disambiguate every overlap: If any existing skill OR a CLAUDE.md/AGENTS.md rule shares the symptom, add a one-line "this vs that — same …
- Distinctive: line 54
Strip generic advice; if little remains, it's trash: Delete sentences a competent dev already knows.
- Distinctive: line 61
Every skill file must follow this exact structure:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Authoring project skills
Project skills live in docs/skills/ and document repeatable workflows for humans and AI. The
always-on trigger lives in CLAUDE.md (scan docs/skills/ before a task; create/update one after a
repeatable task, ending your response with ✏️ Skill <created|updated>: docs/skills/<file>.md — <reason>).
This skill is the full how-to for actually writing one well.
Signals to skill it
- Hit a non-obvious gotcha (env mismatch, hidden dependency, undocumented step).
- Ran a multi-step sequence to set up, debug, deploy, or migrate.
- Answered "how do I X here" by tracing through several files.
- A teammate is likely to ask the same question later.
Scope: generalize before writing
A skill must cover the class of problems, not the single incident that triggered it. Before writing, ask: "what is the general workflow this incident is one instance of?" — and write THAT. Parameterize the incident-specific parts (the specific package, workflow file, error code, branch) into steps that work for the whole class; keep concrete values only as examples inside the steps.
- Bad (incident-scoped):
fix-github-packages-401-in-ci.md— one package, one workflow, one status code. - Good (class-scoped):
fix-ci-package-registry-auth.md— any registry auth failure (401/403), any workflow, any repo. - If the generalized version would duplicate an existing skill, update that skill instead.
No trash skills — skip when in doubt
A skill that's never opened again is noise that buries the useful ones. Skip creation when:
- The task is genuinely one-off (exploratory question, throwaway script, trivial edit).
- It's already covered — code comments, existing docs/skill, or a CLAUDE.md / AGENTS.md rule.
- The fix is a single obvious change anyone would find from the error message alone.
- The knowledge goes stale within weeks (a temporary state, one ticket, one secret's current value).
- It merely restates standard framework/library/language behavior a competent dev already knows from the framework docs. Before writing, ask: "Would a competent dev know this from the docs or the error?" If yes → trash; at most link or extend an existing doc.
"General" alone isn't enough — a skill must also be project-specific AND non-obvious.
Pre-write self-check — kill these five weaknesses before saving
- Discriminating trigger, not a symptom magnet. The
description/When-to-use must distinguish THIS cause from other causes of the same symptom. A trigger like "endpoint 500s" or "field is null" fires on dozens of unrelated bugs → opened at the wrong time and ignored. Anchor it to the distinctive signal: a specific log string, error class, or precondition — not the user-visible symptom alone. - Re-test "non-obvious" against existing tooling. Check whether the stack trace, logs, or error message already surface the cause (e.g. the controller already logs the real message). If they do, the skill can't rest on "the bug is mysterious" — it must earn its place on something else (a multi-place invariant, a counter-intuitive mechanism) or be cut. Make Step 1 = read that signal.
- Disambiguate every overlap. If any existing skill OR a CLAUDE.md/AGENTS.md rule shares the symptom, add a one-line "this vs that — same symptom, different cause" and cross-link it.
- Strip generic advice; if little remains, it's trash. Delete sentences a competent dev already knows. Keep only the repo-specific mechanism. Strip test: remove the obvious lines — if the skill collapses, don't write it.
- Write for the world as it is now. Note what's already fixed/mitigated and exactly where the class still bites, so the skill doesn't describe an already-closed path as if it were live.
File template
Every skill file must follow this exact structure:
---
name: <skill-name>
description: <one line — when to use this>
last-updated: YYYY-MM-DD
---
## When to use
<one paragraph — the trigger condition, including phrases the AI or a user might say>
## Steps
1. ...
## Verification
<how to confirm it worked — a command + expected output, a file that should now exist, an HTTP status, etc.>
## Related (optional)
- [other-skill](./other-skill.md) — short reason for the linkNaming
Short, verb-led, kebab-case. Good: setup-local-dev.md, run-migrations.md, debug-failing-tests.md,
add-env-var.md. Bad: notes.md, misc.md, useful.md.
Quality bar
- Steps specific enough for a fresh assistant or teammate to execute without context. Replace "configure the env" with the exact env var name and an example value.
- Verification must be observable, not "looks good" — prefer a command + expected output over prose.
- One skill = one workflow. If you have two sets of steps in one file, split.
- Broad scope, concrete steps: the trigger and steps generalize to the whole class; the examples inside steps stay concrete (real commands, real paths, real error strings).
Updating existing skills
Found a new gotcha or a changed step? Update the existing skill in place — don't create a
near-duplicate. Bump last-updated to today. If a workflow is fully superseded (tool replaced,
approach abandoned), delete the file in the same commit and link the replacement from any related
skill's Related section.
When the project has no docs/skills/ yet
First time you'd write a skill in a repo without the folder: create docs/skills/ and a minimal
README.md pointing back to this rule, then add the first skill. Don't skip just because the folder
is missing.
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.

