agentleFS
ali-sheibaali-sheiba/development-workflow/skills/writing-skills/SKILL.md

writing-skills

Skill1 starsChanged 22 days agoMITView on GitHub

Use when creating or changing a reusable coding-agent skill to define precise triggers, portable executable instructions, harness wiring, and behaviour-driven validation before accepting the skill.

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

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 13 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 180 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use a lowercase kebab-case directory and a canonical SKILL.md.

    line 18
  2. Very specific:

    Keep the canonical workflow agent- and model-agnostic.

    line 21
  3. Distinctive:

    Write direct steps an agent can execute and results it can verify.

    line 24
  4. Very specific:

    Keep the main workflow concise.

    line 28
  5. Distinctive:

    Isolated execution: when a skill's whole job is to run in a fresh context and hand back a conclusion.

    line 63
  6. Distinctive:

    Before adapting external material, record its repository, author or organisation, exact revision, license, retained behaviour, removed …

    line 73
  7. Distinctive:

    Red: Run or evaluate the scenario without the proposed instruction.

    line 83
  8. Distinctive:

    Green: Add the minimum instruction that prevents the observed failure.

    line 86
  9. Distinctive:

    Refactor: Remove repetition and ambiguity without weakening enforcement.

    line 88
  10. Distinctive:

    Pressure: Test plausible excuses - task size, urgency, a prior agent's claim, unavailable context, partial success, conflicting convenience.

    line 90
  11. Distinctive:

    Boundaries: Test a non-trigger scenario and the interaction with adjacent skills.

    line 96
  12. Distinctive:

    Do not accept prose review as behavioural validation when the behaviour can be simulated.

    line 100
  13. Distinctive:

    verify the frontmatter name, the directory name, headings, and code fences.

    line 108
  14. Distinctive:

    search the canonical files for accidental harness-specific instructions.

    line 110
  15. Distinctive:

    check that every state has a success, retry, blocked, or escalation path.

    line 111
  16. Distinctive:

    read the skill as an agent with no conversation history.

    line 113
  17. Very specific:

    update the guide in ../../docs/development-workflow/ in the same change when a workflow skill's phases, loops, gates, or artifacts changed.

    line 114

“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 executable operational guidance. Treat changes to it like behaviour changes: specify the outcome, observe failure, make the smallest effective instruction change, and prove the new behaviour under pressure.

Define the contract

  1. State the concrete problem, intended outcome, triggers, non-triggers, prerequisites, outputs, and failure or escalation paths.
  2. Inspect the existing skills and the repository conventions before adding a new boundary. Extend an existing skill when it already owns the behaviour.
  3. Use a lowercase kebab-case directory and a canonical SKILL.md. Add YAML frontmatter whose name matches the directory exactly and whose description states observable trigger conditions, not a vague summary.
  4. Keep the canonical workflow agent- and model-agnostic. Describe capabilities and outcomes instead of hard-coding a harness, model, tool name, or operating system. Put harness integration in adapters/.
  5. Write direct steps an agent can execute and results it can verify. State each rule once, in one place, in plain words. Current models follow instructions closely: capitals, repeated rules, and long warnings make them over-cautious and slow, not safer.
  6. Keep the main workflow concise. Move detailed schemas, briefs, and contracts into directly linked, one-level-deep references/ files.

Bound every loop

An instruction set that only adds rigour does not converge. Any skill containing a repeat-until step needs all four:

  • A blocking threshold - which findings actually stop progress, and which are recorded without stopping it.
  • A narrowing scope - later rounds verify the previous round and the new delta rather than re-reading everything with fresh eyes.
  • Memory across rounds - a durable record of what is already settled, so a later round cannot silently reverse an earlier one.
  • A round budget and an escalation path - a hard count, then stop and ask the user.

A gate that never closes costs as much as a gate that never opens. Every extra round, dispatch, and repeated check run must earn its cost in caught defects.

Harness wiring

Canonical files stay portable; adapters do the wiring. When adapting for a harness, use what it actually offers instead of restating a procedure in prose:

  • Agent definitions with a restricted tool list, so "dispatch a fresh reviewer" is a name rather than an improvised prompt. Do not pin a model; workers inherit the session's model.
  • Invocation control - restrict a side-effecting skill to explicit user invocation; mark pure background knowledge model-only.
  • Tool restriction in the skill's own frontmatter, so a read-only skill is enforced read-only rather than merely asked to be.
  • Dynamic context injection for the facts a skill would otherwise spend its first tool calls discovering - the current branch, the working-tree status, the in-flight state file.
  • Isolated execution when a skill's whole job is to run in a fresh context and hand back a conclusion.
  • Prompt-time hooks to put a routing gate in front of the model every turn, and pre-action hooks to hard-block what a prose rule can only forbid.

An adapter wires; it does not restate. It points at the canonical file and adds only what the harness needs. Duplicated procedure drifts.

Preserve provenance

Before adapting external material, record its repository, author or organisation, exact revision, license, retained behaviour, removed assumptions, and material rewrites alongside the project's other attribution records. Do not copy or adapt material whose license does not permit redistribution. Preserve required notices.

Validate behaviour

For each new or materially changed behaviour, create realistic scenarios that exercise the trigger and the strongest likely rationalisations:

  1. Red: Run or evaluate the scenario without the proposed instruction. Record the observable failure or bypass. If the agent already behaves correctly, strengthen the scenario or prove the instruction unnecessary.
  2. Green: Add the minimum instruction that prevents the observed failure. Run the same scenario and record exact evidence of compliance.
  3. Refactor: Remove repetition and ambiguity without weakening enforcement. Rerun the green scenario.
  4. Pressure: Test plausible excuses - task size, urgency, a prior agent's claim, unavailable context, partial success, conflicting convenience. The skill must hold its gates and use its escalation path.
  5. Convergence: For any loop, test that it ends. Feed it a stream of low-severity findings and confirm the round budget, the threshold, and the memory stop it rather than letting it grind.
  6. Boundaries: Test a non-trigger scenario and the interaction with adjacent skills. The skill must neither activate too broadly nor contradict its owning workflow.

Do not accept prose review as behavioural validation when the behaviour can be simulated. Record the scenarios, the observed results, and any unresolved portability limits. Never claim compatibility with a harness that was not tested.

Structural checks

Before completion:

  • verify the frontmatter name, the directory name, headings, and code fences;
  • resolve every relative link;
  • search the canonical files for accidental harness-specific instructions;
  • check that every state has a success, retry, blocked, or escalation path;
  • confirm the examples match the documented repository and runtime layouts;
  • read the skill as an agent with no conversation history;
  • update the guide in ../../docs/development-workflow/ in the same change when a workflow skill's phases, loops, gates, or artifacts changed.

Apply the evidence gate in development-workflow before claiming the skill is ready.

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.