agentleFS
rkalievrkaliev/eng-kit/skills/writing-skills/SKILL.md

writing-skills

Skill1 starsChanged 15 days agoMITView on GitHub

Use when creating a new skill or subagent, editing an existing skill, agent or prompt template, or checking that a skill actually changes agent behavior

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 9 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 22 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

  • AWSSkill

    condition-based-waiting

    Replace arbitrary sleeps in tests with polling for the ACTUAL condition — a waitFor(() => predicate, description, timeoutMs) helper that polls every 10 ms, calls the getter inside the loop (no stale cache), and throws a clear error on timeout. Use when a test uses setTimeout / sleep / time.sleep, is flaky (passes on fast machines, fails under load or in CI), times out when run in parallel, or waits for an async operation, event, state, count, or file to appear. Do NOT use when the test genuinely exercises timing behavior (debounce / throttle) — then wait for the triggering condition FIRST and comment WHY the timed wait is justified. Trigger on "flaky test", "race condition in tests", "why does this pass locally and fail in CI", or any `await new Promise(r => setTimeout(r, N))` in a test.

    Also in 3 projects that use this

  • MicrosoftSkill

    testing-anti-patterns

    Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

    Also in 3 projects that use this

  • +3 more from Leodorareluctant259

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 6

    Distinctive

    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
  1. Distinctive:

    Start with "Use when…" and list the situations and symptoms that should trigger it.

    line 38
  2. Distinctive:

    Start with the core principle.

    line 46
  3. Distinctive:

    When agents skip steps under pressure, use a hard rule, a red-flags table of the rationalizations you observed, and an explicit closing of …

    line 48
  4. Distinctive:

    When they produce the wrong shape, use a positive template or example, not prohibitions (prohibitions can backfire).

    line 49
  5. Distinctive:

    RED: run a realistic pressure scenario *without* the skill, using a subagent or a fresh session.

    line 59
  6. Distinctive:

    GREEN: write the minimal skill that addresses those failures.

    line 60

“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

A skill is reusable know-how that the agent loads on demand: a technique, a discipline, or a domain reference. It is not a story about one task, and not something a linter or a script can enforce. Put mechanical rules in the guard or verify hooks, or in CI.

Format (Agent Skills spec, as Claude Code loads it)

skills/<name>/SKILL.md        required
skills/<name>/references/*.md optional heavy reference, loaded only when needed
skills/<name>/scripts/*       optional tools; invoke as `node "${CLAUDE_SKILL_DIR}/scripts/x.ts"` (the exec bit can be lost)

A script is code: a test that the project's test command runs covers it, it prints machine-readable output, it refuses unclear input instead of guessing, and it writes only where its usage says.

---
name: <name>            # = folder name; lowercase, digits, hyphens; ≤ 64 chars
description: Use when … # third person; triggers only; description + when_to_use are capped at 1,536 chars
---

Optional fields worth knowing:

  • disable-model-invocation: true: only the user runs it (/<name>). Use it for entry points and side effects: deploys, commits, setup.
  • argument-hint and $ARGUMENTS: for entry points that take a task or path.
  • effort: xhigh: for skills whose value is careful reasoning, writing code or review (design, planning, debugging, security, TDD, plan execution, review).
  • allowed-tools: pre-approves tools while the skill runs. Keep it narrow; never grant broad Bash.
  • context: fork with agent: <type>: runs the skill in an isolated subagent. Only for self-contained tasks that return a result.

Mechanical rules don't belong in a skill. Enforce them with a hook (the kit's guard and verify gate), a permission rule in settings.json, or CI.

The description decides whether the skill fires

  • Start with "Use when…" and list the situations and symptoms that should trigger it. Use the words a user or an error message would contain.
  • Do not summarize the process. The agent will follow the summary instead of reading the body. A description saying "reviews between tasks" produced one review instead of the two the body required.
  • Aim for under 300 characters. The descriptions of every installed skill share the context window.

The body

  • Stay under about 500 words; move heavy reference into references/. A loaded skill costs context for the rest of the session.
  • Name actions, not harness tools ("load the skill", "dispatch a reviewer"), so the skill survives a tool rename.
  • Start with the core principle; use an Iron Law only for real discipline rules.
  • Match the form to the failure:
    • When agents skip steps under pressure, use a hard rule, a red-flags table of the rationalizations you observed, and an explicit closing of loopholes.
    • When they produce the wrong shape, use a positive template or example, not prohibitions (prohibitions can backfire).
  • Give one excellent example rather than many mediocre ones. Refer to other skills by name ("REQUIRED: test-driven-development"), not by force-loading their files.
  • Relative paths resolve against the skill directory.

Subagents

An agent is a role with its own context, tools and report; write one when isolation is the point (review, search, narrower permissions). When to choose one, its format, the prompt rules and how to test it: references/agents.md.

Test it like code

  1. RED: run a realistic pressure scenario without the skill, using a subagent or a fresh session. Mix pressures: time, sunk cost, authority. End with "This is real. Choose and act." Record the agent's rationalizations verbatim.
  2. GREEN: write the minimal skill that addresses those failures. Re-run the scenario and confirm the behavior changed.
  3. REFACTOR: each new rationalization becomes an explicit counter. Re-run until it holds.

Also check that the description triggers: ask for the task in plain words and see whether the skill loads.

A change to a skill the eval suite covers is checked with npm run eval -- --case <name> against docs/EVALS.md (it costs plan usage). Before shipping, run npm test in this package (it lints frontmatter, names, word budgets and relative links) and claude plugin validate .. Then add what you changed and why to docs/ARCHITECTURE.ru.md.

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.