agentleFS
reddygopalkrishnareddygopalkrishna/developer-agent-skills/skills/writing-skills/SKILL.md

writing-skills

Skill8 starsChanged 10 days agoMITView on GitHub

Writes and improves Agent Skills (SKILL.md folders) that agents reliably load and follow. Use when the user asks to create, edit, review, or debug a skill, says a skill is not triggering or is ignored, or wants to turn a team workflow, checklist or runbook into a reusable skill. Not for writing general documentation.

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

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 180 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not for: project docs meant for humans (READMEs, wikis), or always-on rules that belong in a project instructions file such as AGENTS.md.

    line 18
  2. Distinctive:

    Find what the agent gets wrong without the skill: Run or reason through one example with no skill.

    line 32
  3. Distinctive:

    Test it: Run each example task with the skill installed.

    line 35
  4. Distinctive:

    Start with what the skill does, in third person: "Plans zero-downtime schema migrations ...".

    line 65
  5. Very specific:

    Add Not for ... when a nearby skill or task could be confused with it.

    line 67
  6. Distinctive:

    No stale facts: Avoid prices, model names and version numbers unless the skill is about that version.

    line 95
  7. Very specific:

    Put material needed only in some cases in references/<topic>.md and link it from SKILL.md with the condition, for example: Read …

    line 100
  8. Distinctive:

    Keep references one level deep.

    line 101

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

A skill is instructions an agent loads only when its description matches the task. Most broken skills fail in one of two places: the description never triggers, or the body is too vague to change what the agent does. Fix those two first.

When to use

  • Creating a new skill from a workflow, checklist, runbook or style guide.
  • A skill exists but the agent does not load it, or loads it for the wrong tasks.
  • A skill loads but the agent's output does not change.
  • Reviewing someone else's skill before adding it to a project.

Not for: project docs meant for humans (READMEs, wikis), or always-on rules that belong in a project instructions file such as AGENTS.md.

Skill or something else?

NeedUse
Rules that apply to every task in a repoProject instructions file (AGENTS.md or the agent's equivalent)
A procedure needed only for some tasksA skill
A deterministic, repeatable operationA script or CLI (a skill may tell the agent to run it)
Live data from an external systemA tool / MCP server

Workflow

  1. Collect real examples first. Get 3-5 concrete tasks the skill should handle and 2-3 nearby tasks it should not. Ask the user if you don't have them. Never write a skill from the topic name alone.
  2. Find what the agent gets wrong without the skill. Run or reason through one example with no skill. The skill should contain only what closes that gap. Leave out what any competent agent already does.
  3. Write the description (rules below). Check it against every example from step 1: it should clearly match the "should" tasks and clearly not match the "should not" tasks.
  4. Write the body (structure below). Keep SKILL.md under about 300 lines. Move long tables, per-stack details and templates into references/.
  5. Test it. Run each example task with the skill installed. Check that the agent loads it, follows the workflow, and meets the "Done when" criteria. Run one "should not" task and check it does not load.
  6. Fix what you saw, not what you guess. If the agent skipped a step, make the step more concrete or move it earlier. If it loaded on the wrong task, tighten the description.

Folder layout

skill-name/
├── SKILL.md          # required
└── references/       # optional: loaded only when SKILL.md says to
    └── topic.md

Optional scripts/ or assets/ folders are allowed by the format, but plain Markdown is the easiest for users to audit and trust. Add code only when a task must be exact and repeatable.

Frontmatter

---
name: skill-name
description: Does X. Use when ...
license: MIT
---
  • name: lowercase letters, digits and hyphens; at most 64 characters; no leading, trailing or double hyphens; must match the folder name.
  • description: required, at most 1024 characters. This is the only part the agent sees before deciding to load the skill.
  • name, description and license work everywhere. Other fields (for example tool allowlists) are not supported by every agent, so leave them out of skills meant to be shared.

Writing the description

  • Start with what the skill does, in third person: "Plans zero-downtime schema migrations ...".
  • Then Use when ... listing triggers: the task types, the words users actually type, file types, error messages, framework names.
  • Add Not for ... when a nearby skill or task could be confused with it.
  • Be specific. "Helps with databases" matches nothing reliably. "Use when adding, renaming or dropping columns, adding indexes, or backfilling data on a live database" matches the right tasks.
WeakStrong
Helps with testing.Designs test suites and fixes flaky tests. Use when writing tests for new code, choosing unit vs integration vs e2e, or when a test fails intermittently in CI.
React best practices.Applies modern React patterns ... Use when writing or reviewing React components, hooks, effects, or state management.

Writing the body

Structure (drop sections that add nothing):

  1. # Title and 1-3 sentences with the core principle.
  2. When to use / when not to.
  3. Workflow: numbered, concrete, checkable steps.
  4. Decision tables and checklists for the topic.
  5. Anti-patterns: the mistakes that actually happen.
  6. Done when: objective exit criteria.
  7. References: each link with when to read it.

Rules:

  • Imperative and direct. "Run X. If Y, do Z." Not "You might consider ...".
  • Concrete beats general. Give the exact command, flag, threshold or code shape. A skill that says "write good tests" changes nothing.
  • Explain the why in one clause for rules that look arbitrary, so the agent can handle cases you didn't list.
  • Decide for the agent. Pick a default and say when to deviate. A list of five equal options leaves the agent where it started.
  • Safety gates. Any destructive or outward-facing action (deleting data, force-pushing, deploying, sending messages) gets an explicit "stop and ask the user first".
  • Portable wording. Say "run", "search the codebase", "read the file". Don't name tools that exist in only one agent.
  • No stale facts. Avoid prices, model names and version numbers unless the skill is about that version. When a fact changes often, tell the agent where to check it.

Progressive disclosure

  • SKILL.md is loaded in full when the skill triggers, so every line costs context on every use.
  • Put material needed only in some cases in references/<topic>.md and link it from SKILL.md with the condition, for example: Read [references/mysql.md](references/mysql.md) when the database is MySQL.
  • Keep references one level deep. Don't chain reference files to each other.

Review checklist

  • Folder name equals name; name follows the format rules.
  • Description says what it does and Use when ..., with real trigger words.
  • Description was checked against "should" and "should not" examples.
  • Body has a workflow of concrete steps and objective "Done when" criteria.
  • Every command, flag and threshold is real; nothing invented.
  • Destructive or outward actions have a confirmation gate.
  • SKILL.md is under about 300 lines; details are in linked references/.
  • No agent-specific tool names; no secrets, internal URLs or personal data.
  • Tested on real tasks in at least one agent.

Anti-patterns

  • Encyclopedia skill: a long essay on the topic. The agent already knows the theory; give it the procedure and the decisions.
  • Vague description: the skill never loads. Fix the description before touching the body.
  • Kitchen-sink skill: one skill covering five unrelated tasks. Split it so each description can be precise.
  • Options without a default: listing every approach with no recommendation.
  • Hidden side effects: scripts that install, download or call the network without the skill saying so. Users stop trusting the whole pack.
  • Untested skill: written and published without running a single real task.

Done when

  • The skill loads for every "should" example and not for the "should not" ones.
  • On the test tasks, the agent's output is measurably better than without the skill (fewer mistakes, steps followed, criteria met).
  • The review checklist above passes.

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.