agentleFS
EzraAppleEzraApple/skills-init/skills/writing-skills/SKILL.md

writing-skills

Skill2 starsChanged 4 months agoMITView on GitHub

Use when creating, editing, packaging, consolidating, routing, validating, or publishing agent skills under .agents/skills or a tool-specific skill directory.

154 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, chinese-code-review 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.
  • 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 6 projects that use this

  • shibit-netSkill

    chinese-code-review

    中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。

    Also in 3 projects that use this

  • shibit-netSkill

    chinese-commit-conventions

    中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。

    Also in 3 projects that use this

  • pedronauckSkill

    writing-agents-md

    Write or audit AGENTS.md/CLAUDE.md instructions. Use writing-skills for on-demand skills; excludes human-facing docs and READMEs.

    Also in 3 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 3 projects that use this

  • MorningStar0709Skill

    workflow-runner

    Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.

    Also in 3 projects that use this

  • +1 more from shibit-net

The file

Show its rules and text

We split this skill into the rules it gives an agent

46 rules. 0 are common, 37 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 144 edited versions we read keep these.

  • 37

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing or editing a skill, answer these from the current task and the target project.

    line 15
  2. Distinctive:

    When should it trigger? Include user phrases, symptoms, tools, paths, and near-miss cases.

    line 19
  3. Distinctive:

    Do placement before writing content.

    line 32
  4. Distinctive:

    Search before adding a top-level skill:

    line 42
  5. Distinctive:

    Prefer adding a nested reference file under an existing skill when the new guidance is really a variant of an existing workflow.

    line 49
  6. Distinctive:

    Create or keep a skill when the guidance is reusable and requires judgment.

    line 55
  7. Distinctive:

    If reliable automation can enforce the behavior, add or use the automation and make the skill point to the command.

    line 74
  8. Very specific:

    Start descriptions with Use when.

    line 92
  9. Distinctive:

    Keep descriptions under 1024 characters.

    line 96
  10. Distinctive:

    Keep XML-style angle brackets out of descriptions because descriptions are often injected into structured prompts.

    line 97
  11. Distinctive:

    Write for a future agent under time pressure.

    line 114
  12. Distinctive:

    Put routing decisions near the top.

    line 117
  13. Distinctive:

    Use imperative instructions when the agent must do something.

    line 118
  14. Distinctive:

    Prefer one excellent example over several generic examples.

    line 120
  15. Distinctive:

    Use tables for quick reference and comparisons.

    line 121
  16. Distinctive:

    Keep examples copy-pasteable when they are commands or code.

    line 122
  17. Very specific:

    Avoid generic labels like step1, helper2, or pattern3.

    line 123
  18. Distinctive:

    Avoid all-caps rules unless the constraint is safety-critical or agents have repeatedly rationalized around it.

    line 124
  19. Very specific:

    Keep SKILL.md as the entry point and router.

    line 139
  20. Very specific:

    Put deterministic or repetitive work in scripts/.

    line 141
  21. Very specific:

    Put reusable prompts, templates, and assets in templates/ or assets/.

    line 142
  22. Distinctive:

    Use repo-relative file paths for local references.

    line 144
  23. Very specific:

    Use REQUIRED: Use <skill-name> when the other skill must be followed.

    line 150
  24. Very specific:

    Use REQUIRED BACKGROUND: Read <skill-name> when concepts from another skill are needed.

    line 151
  25. Very specific:

    Use Optional reference: <path> for supporting docs.

    line 153
  26. Distinctive:

    Avoid vague "see also" lists.

    line 154
  27. Distinctive:

    Use for small edits, reference updates, and typo-level fixes.

    line 163
  28. Very specific:

    Search for stale references with rg.

    line 165
  29. Distinctive:

    Check local paths exist.

    line 166
  30. Distinctive:

    Run the package or repo skill linter.

    line 167
  31. Distinctive:

    Use for new skills, routing changes, and meaningful behavior changes.

    line 172
  32. Distinctive:

    Write 2-3 realistic prompts that should trigger the skill.

    line 174
  33. Distinctive:

    Write 2-3 near-miss prompts that should not trigger it.

    line 175
  34. Distinctive:

    Read the skill as the future agent and trace what instruction each prompt should use.

    line 176
  35. Distinctive:

    If practical, compare with-skill behavior against without-skill behavior.

    line 178
  36. Distinctive:

    Use for high-risk discipline skills, broad consolidations, or skills that enforce behavior agents tend to rationalize away.

    line 184
  37. Distinctive:

    Write the minimal guidance that addresses the failure mode.

    line 189
  38. Distinctive:

    Prefer scripts or assertions for objectively checkable outputs.

    line 191
  39. Distinctive:

    Use human review for subjective quality.

    line 192
  40. Distinctive:

    Do not turn every skill edit into an eval project.

    line 194
  41. Distinctive:

    Read references and callers before changing routing.

    line 201
  42. Distinctive:

    Prefer deleting stale guidance over layering exceptions.

    line 202
  43. Distinctive:

    If feedback came from a review, fix both the specific issue and the pattern that allowed it.

    line 203
  44. Distinctive:

    Call out non-obvious tradeoffs in release notes or PR descriptions.

    line 205
  45. Distinctive:

    Before finishing, test the description mentally against realistic prompts.

    line 209
  46. Distinctive:

    If discovery is shaky, improve the description before expanding the body.

    line 217

“Common” is measured: kept by at least 6 in 10 of the 144 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 operational guidance that helps a future agent recognize a situation and apply a proven approach. Treat skill writing like product work for agents: define the job, make discovery reliable, keep the path through the docs obvious, and verify that the skill changes behavior.

Start With Intent

Before writing or editing a skill, answer these from the current task and the target project. Ask only for gaps that cannot be inferred.

  • What task should this help agents do?
  • When should it trigger? Include user phrases, symptoms, tools, paths, and near-miss cases.
  • What should the agent produce or decide after reading it?
  • What 2-3 concrete tasks should it handle end to end?
  • Who is the audience: repository developer agents, user-facing runtime agents, or a packaged skill bundle for many projects?
  • What existing skill, always-on guidance, script, lint, or test already covers part of this?

Those concrete tasks become the should-trigger prompts used during validation.

Choose The Right Home

Do placement before writing content.

HomeUse for
.agents/skills/<skill>/SKILL.mdProject-local source of truth for reusable skills.
Tool-specific links, such as .claude/skillsGenerated symlinks or copies that point back to .agents/skills.
AGENTS.md or equivalent always-on guidanceBroad rules that should apply even when no skill is invoked.
scripts/, lint, or testsMechanical behavior that can be enforced automatically.
Runtime workspace skill directoryUser-facing skills that must be visible to a sandbox or runtime agent.

Search before adding a top-level skill:

rg --files .agents/skills | rg '/SKILL\.md$' | sort
rg -n "keyword|tool|old-skill-name" .agents AGENTS.md .

Prefer adding a nested reference file under an existing skill when the new guidance is really a variant of an existing workflow. Keep a separate top-level skill when separate discovery metadata matters.

When To Create Or Keep A Skill

Create or keep a skill when the guidance is reusable and requires judgment.

Good fits:

  • non-obvious techniques;
  • repeated debugging or review workflows;
  • routing decisions;
  • tool-specific setup or failure modes;
  • API or command references that agents often misuse;
  • rubrics, quality gates, and heuristics.

Poor fits:

  • one-off history;
  • project facts that belong in always-on guidance;
  • mechanical checks that should be linted;
  • obvious language or library docs;
  • postmortems with no reusable decision rule.

If reliable automation can enforce the behavior, add or use the automation and make the skill point to the command.

Frontmatter

Every SKILL.md needs:

---
name: lowercase-hyphen-name
description: Use when triggering situations, symptoms, tools, paths, and user phrases apply.
---

Rules:

  • name is lowercase hyphen-separated and matches the directory.
  • description is the main discovery surface.
  • Start descriptions with Use when.
  • Describe triggering conditions, not the workflow.
  • Include concrete keywords an agent or user would mention.
  • Include near-miss routing when adjacent skills could compete.
  • Keep descriptions under 1024 characters.
  • Keep XML-style angle brackets out of descriptions because descriptions are often injected into structured prompts.

Bad:

description: Use when debugging - checks logs and writes a fix.

Good:

description: Use when production errors, service health regressions, logs, traces, incidents, or failing monitors need investigation.

Body Content

Write for a future agent under time pressure.

  • Lead with the core principle in 1-3 sentences.
  • Put routing decisions near the top.
  • Use imperative instructions when the agent must do something.
  • Explain why a rule matters when that helps the agent generalize.
  • Prefer one excellent example over several generic examples.
  • Use tables for quick reference and comparisons.
  • Keep examples copy-pasteable when they are commands or code.
  • Avoid generic labels like step1, helper2, or pattern3.
  • Avoid all-caps rules unless the constraint is safety-critical or agents have repeatedly rationalized around it.

Do not include:

  • storytelling about a specific past session;
  • long transcripts or postmortems;
  • multiple language examples for the same idea;
  • full API docs that could live in references/;
  • instructions to use skills that are not installed with this package.

Progressive Disclosure

Skills should load only the context needed for the task.

  • Keep SKILL.md as the entry point and router.
  • Move heavy material over roughly 100-300 lines into references/.
  • Put deterministic or repetitive work in scripts/.
  • Put reusable prompts, templates, and assets in templates/ or assets/.
  • In the root doc, say exactly when to read each nested file.
  • Use repo-relative file paths for local references.

Cross-References

Make dependency strength explicit.

  • Use REQUIRED: Use <skill-name> when the other skill must be followed.
  • Use REQUIRED BACKGROUND: Read <skill-name> when concepts from another skill are needed.
  • Use Optional reference: <path> for supporting docs.
  • Avoid vague "see also" lists.

Validation

Skill writing is documentation, but the output is agent behavior. Validate enough for the risk.

Lightweight Validation

Use for small edits, reference updates, and typo-level fixes.

  • Search for stale references with rg.
  • Check local paths exist.
  • Run the package or repo skill linter.
  • Regenerate symlinks or tool copies.

Standard Validation

Use for new skills, routing changes, and meaningful behavior changes.

  • Write 2-3 realistic prompts that should trigger the skill.
  • Write 2-3 near-miss prompts that should not trigger it.
  • Read the skill as the future agent and trace what instruction each prompt should use.
  • If practical, compare with-skill behavior against without-skill behavior.
  • Fix gaps where the agent would fail to discover, over-apply, or misroute the skill.

Rigorous Validation

Use for high-risk discipline skills, broad consolidations, or skills that enforce behavior agents tend to rationalize away.

  • Define pressure scenarios first.
  • Observe the baseline failure if practical.
  • Write the minimal guidance that addresses the failure mode.
  • Rerun the scenario.
  • Prefer scripts or assertions for objectively checkable outputs.
  • Use human review for subjective quality.

Do not turn every skill edit into an eval project. Use rigor where the cost of a bad skill is meaningful.

Improving Existing Skills

  • Preserve the original skill name unless intentionally renaming or consolidating.
  • Read references and callers before changing routing.
  • Prefer deleting stale guidance over layering exceptions.
  • If feedback came from a review, fix both the specific issue and the pattern that allowed it.
  • Call out non-obvious tradeoffs in release notes or PR descriptions.

Description Quality Pass

Before finishing, test the description mentally against realistic prompts.

  • Would expected user phrasing trigger this skill?
  • Would common setup, review, or debugging workflows route correctly?
  • Would near misses avoid triggering it?
  • Does the description avoid summarizing the workflow?
  • Does it include old names or synonyms that users still say?

If discovery is shaky, improve the description before expanding the body.

Anti-Patterns

Anti-patternWhy it failsFix
Narrative skillFuture agents cannot reuse a one-off story.Extract the repeatable decision, command, or pattern.
Workflow hidden in descriptionAgent may follow the summary and skip the body.Put triggers in description, steps in body.
Missing synonymsUsers mention old tool names and the skill does not trigger.Add old names, symptoms, and common phrasing.
Link-only routingAgents do not know when to open which doc.Add explicit routing bullets.
Overgrown root fileAgents load too much irrelevant context.Move heavy sections to references.
Excessive hard rulesAgents follow rigidly or fight the instruction.Explain why; reserve hard rules for real constraints.
Untested routing changeSkill looks clean but is undiscoverable.Run trigger and near-miss checks.

Checklist

  • Correct home: .agents/skills, tool-specific link, always-on guidance, script, or runtime workspace skill.
  • Top-level skill is justified.
  • Name is lowercase hyphen-separated and matches the directory.
  • Frontmatter has name and description.
  • Description starts with Use when and contains concrete triggers.
  • Description does not summarize the workflow.
  • Description is under 1024 characters and has no XML-style tags.
  • Local references point to existing files.
  • Heavy details are moved to references, templates, assets, or scripts.
  • Examples are reusable, not narrative.
  • Validation level matches risk.

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.