agentleFS
h3y6eh3y6e/agent-skills/.agents/skills/writing-skills/SKILL.md

writing-skills

Skill0 starsChanged 33 days agoMITView on GitHub

Creates and improves Agent Skills for this repository. Use when authoring, validating, or evaluating a skill under skills/ or .agents/skills/.

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

  • pedronauckSkill

    lesson-learned

    Analyze recent code changes via git history and extract software engineering lessons. Use when the user asks 'what is the lesson here?', 'what can I learn from this?', 'engineering takeaway', 'what did I just learn?', 'reflect on this code', or wants to extract principles from recent work.

    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

16 rules. 0 are common, 9 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create skills that make execution reproducible.

    line 11
  2. Distinctive:

    Before changing, adding, or deleting a rule in this skill, read its sources and keep that file in sync.

    line 13
  3. Distinctive:

    Before writing, define observable process invariants.

    line 17
  4. Distinctive:

    Follow the Agent Skills specification.

    line 19
  5. Very specific:

    Put published skills at skills/<skill-name>/SKILL.md.

    line 23
  6. Very specific:

    Never edit metadata.version manually.

    line 24
  7. Very specific:

    Keep eval cases in <skill>/evals/.

    line 25
  8. Distinctive:

    Before completion, run the validator:

    line 26
  9. Very specific:

    Use a skill for recurring conditional judgment with meaningful failure cost.

    line 34
  10. Distinctive:

    Write only what the agent lacks: gotchas, conventions, and corrections from observed failures.

    line 36
  11. Very specific:

    Search .vendor/skills/ for skills related to the target capability and triggers.

    line 49
  12. Distinctive:

    Run the target tasks without the skill.

    line 50
  13. Very specific:

    Run the validator, rumdl check <path>, and structure review for every skill.

    line 59
  14. Distinctive:

    When a model-invoked skill's triggers change, run about 20 discovery queries, half near-miss should-not-trigger, 3 times each with a …

    line 61
  15. Very specific:

    When codifying experience, record the initial failure, final solution, and connecting insight.

    line 66
  16. Distinctive:

    Before completion, confirm evidence for every process invariant and no claim beyond the evidence produced.

    line 68

“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

Create skills that make execution reproducible. Under identical conditions, required research, branches, artifacts, and verification must meet consistent standards.

Before changing, adding, or deleting a rule in this skill, read its sources and keep that file in sync.

Contracts

Before writing, define observable process invariants. Classify research as checked, not applicable, or unavailable; evaluate branches; require artifact fields; and stop when work or verification is incomplete. State how far work extends — whether a first working result ends it, or iteration continues.

Follow the Agent Skills specification; the validator enforces its mechanical constraints and this repository's frontmatter rules.

Repository rules:

  • Put published skills at skills/<skill-name>/SKILL.md. Keep the body as short as possible; aim for fewer than 500 words without dropping required instructions or references.
  • Never edit metadata.version manually.
  • Keep eval cases in <skill>/evals/; run results go in the git-ignored <skill-name>-workspace/ beside the skill.
  • Before completion, run the validator:
deno run --allow-read --allow-run=git .agents/skills/writing-skills/scripts/validate.ts <skill-directory>

Design

Use a skill for recurring conditional judgment with meaningful failure cost. Prefer hooks or automation for rules that must hold every time, project instructions for knowledge most tasks need, references/ for extensive facts, and notes for temporary information. Extend rather than duplicate a skill.

Write only what the agent lacks: gotchas, conventions, and corrections from observed failures. Model-authored procedure without such evidence scores below no skill, and compact skills beat comprehensive ones.

Skills regress agents in three ways:

  • Description osmosis: the description changes behavior even unloaded. Keep it to capability and triggers; a workflow summary there replaces the body.
  • Grounding displacement: a procedure overrides how the agent reads its inputs. Have steps read the actual inputs rather than presume them.
  • Verification displacement: a procedure suppresses checks the agent would otherwise run. Add checks it would miss; never replace its own.

Treat loading tier and information role independently. Keep required procedures, decisions, gotchas, and output contracts in SKILL.md; conditional detail in references/, one level deep; fragile operations in scripts/; and artifact material in assets/. Reference pointers must say when to read and how to apply them. Invoke bundled scripts through their interpreter, never by bare path. For loading design and invocation choice, read .vendor/skills/writing-for-agents/SKILL.md and its SKILL-MECHANICS.md; for freedom levels, read .vendor/skills/writing-skills/anthropic-best-practices.md.

Workflow

  1. Record capability, triggers, evaluated near-misses, artifacts, and process invariants. Connect requirements to examples.
  2. Search .vendor/skills/ for skills related to the target capability and triggers; read relevant ones before design. Use them only as authoring evidence: the result stands alone and names no consulted skill or path.
  3. Run the target tasks without the skill; write guidance only for failures this baseline shows. One occurrence is an anecdote: add a skill or rule once the same failure recurs.
  4. Write the minimum skill. Format a model-invoked description as "capability. Use when triggers.", key use case first; an explicitly invoked skill states capability alone. Name triggers as the occasions calling for the skill, not the domains it touches: "adding or changing a migration", not "working with databases". Give important steps input, decisions, evidence, completion criteria, and incomplete transitions as needed.
  5. Pass mechanical validation, then evaluate as in Evidence.
  6. Prune statements that do not change the current model's default behavior; those defaults move, so re-check surviving rules on every revision. Keep each rule once per loading tier. Prefer established terms over invented shorthand. Explain why a rule matters instead of stacking MUST, ALWAYS, or NEVER. Pick the form by the baseline failure: a contract or template for wrong shape, a required slot for omissions, a prohibition with its rationalizations only for rules skipped under pressure. Over-constraint costs as much as under-constraint: a prohibition aimed at one model's overreach reads to a stronger one as license to stop early.

Evidence

Choose verification by failure cost, frequency, blast radius, and activation conflicts:

  • Run the validator, rumdl check <path>, and structure review for every skill. When adding a check, prove it fails on a real past mistake.
  • For behavioral rules or branches, run each execution case in a clean context with and without the skill (or with the previous version), graded on concrete evidence. Run candidates as fresh, non-fork subagents; without-skill baselines and discovery evals need an environment without the skill installed. Keep evaluation out of what candidates see: an organic prompt, project-shaped names, no eval vocabulary, no mention of other variants. Judge activation from the files a transcript shows were read, not from self-report. One judge scores all variants in one pass under neutral labels; read every output yourself, and suspect the rubric when you disagree. Report gains and regressions per case, not only the net pass rate.
  • When a model-invoked skill's triggers change, run about 20 discovery queries, half near-miss should-not-trigger, 3 times each with a held-out split. Fix failures by category, not by adding their keywords.
  • For high-risk, frequent, broad, or activation-conflicting skills, repeat runs or models and compare variance.

Record model/version, environment/tools, skill commit/hash, and prompts. For repeated evaluation, also record run count and activation, false-activation, and requirement-satisfaction rates. For discovery protocol, read .vendor/skills/optimizing-descriptions/SKILL.md; for iterative execution tuning, .vendor/skills/empirical-prompt-tuning/SKILL.md; for rules agents skip under pressure, .vendor/skills/writing-skills/testing-skills-with-subagents.md.

When codifying experience, record the initial failure, final solution, and connecting insight; then use .vendor/skills/retrospective-codify/SKILL.md to choose between automation, project instructions, extending a skill, creating a skill, or no persistence.

Before completion, confirm evidence for every process invariant and no claim beyond the evidence produced.

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.