agentleFS
PeanutGTPeanutGT/NutsSkills/skills/writing-skills/SKILL.md

writing-skills

Skill3 starsChanged 22 days agoApache-2.0View on GitHub

Use when creating a new skill, editing an existing skill, or when a skill fails to trigger or is not followed. Covers the SKILL.md template, writing descriptions that trigger, and testing skills with evals.

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, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Iron law: Every skill ships with evals, and you only claim it helps after a baseline comparison.

    line 14
  2. Distinctive:

    Start with "Use when…" and list the situations, symptoms, and words a user would say.

    line 52
  3. Distinctive:

    Keep it under ~300 characters.

    line 55
  4. Very specific:

    Survive context compaction: put the iron law and the checklist near the top, keep SKILL.md short, and restate the one rule that matters at …

    line 63
  5. Distinctive:

    Run the behavior scenario without the skill.

    line 72
  6. Distinctive:

    Add the skill. Run again. The failure should be gone.

    line 73
  7. Distinctive:

    Run trigger prompts; fix the description until triggering is right.

    line 74
  8. Distinctive:

    When the agent finds a new excuse, add it to the rationalizations table and re-run.

    line 75

“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

Iron law: Every skill ships with evals, and you only claim it helps after a baseline comparison.

If the agent already does it right unprompted, the skill is noise. But do not block the user waiting for proof: when asked to create a skill, draft it and its evals right away, aim it at the most likely failures, and mark the baseline as pending.

Structure

skills/<name>/
  SKILL.md                 # required, keep under ~300 lines
  CHANGELOG.md             # one entry per metadata.version
  references/              # optional: long docs loaded only when needed
  scripts/                 # optional: deterministic helpers
  evals/triggers.json      # should / should-not trigger prompts
  evals/<case>/            # behavior case: case.yaml, prompt.md, graders/

SKILL.md template

---
name: <kebab-case, matches folder>
description: Use when <triggering situations>. <One clause on what it does.>
license: Apache-2.0
metadata:
  version: "1.0.0"
---

# <Title>

**Iron law / Core rule:** <one sentence that must never be broken>

## When to use
## Process            (numbered steps)
## Rationalizations to reject   (table: excuse | answer)
## Done when          (checklist)

Related: `other-skill`

Descriptions decide triggering

  • Start with "Use when…" and list the situations, symptoms, and words a user would say.
  • Describe when, not a summary of the steps. If the description summarizes the process, the agent may follow the summary and skip the body.
  • Be specific: "failing test, error message, crash" beats "problems".
  • Keep it under ~300 characters.

Writing the body

  • Imperative, short sentences. Tables and checklists over prose.
  • One iron law per skill. More than one and none of them stick.
  • Fill the rationalizations table from real failures you observed in evals, not imagined ones.
  • Link to related skills by name; do not duplicate their content.
  • Move anything long or rarely needed into references/.
  • Survive context compaction: put the iron law and the checklist near the top, keep SKILL.md short, and restate the one rule that matters at the point where it applies instead of relying on something said earlier.

Testing with evals

Each skill's evals/ contains:

  • triggers.json → should_trigger: ≥ 3 realistic prompts where the skill must load
  • triggers.json → should_not_trigger: ≥ 2 nearby prompts where it must not
  • a behavior case: ≥ 1 scenario with the expected behavior the skill enforces

Process:

  1. Run the behavior scenario without the skill. Record what goes wrong (baseline).
  2. Add the skill. Run again. The failure should be gone.
  3. Run trigger prompts; fix the description until triggering is right.
  4. When the agent finds a new excuse, add it to the rationalizations table and re-run.

Keep eval cost low. One trigger run covering all skills at once; behavior cases only for behavior the model does not already show by default; one run per case first, and more only when a result surprises you. A skill that changes nothing on a strong model is worth knowing about, not hiding.

Done when

  • Frontmatter valid; name matches folder; CHANGELOG has the version
  • Evals exist with trigger, no-trigger, and behavior cases
  • Baseline vs. with-skill difference observed — or explicitly reported to the user as pending
  • Added to the table in nutshell

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.