agentleFS
RBraga01RBraga01/a-team/skills/writing-skills/SKILL.md

writing-skills

Skill24 starsChanged 26 days agoMITView on GitHub

Create new A Team skills using TDD for documentation. Write a bad skill, watch agents fail at the gap, improve, iterate. Use when the team needs a new capability that no existing skill covers.

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

12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 180 edited versions we read keep these.

  • 11

    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:

    Write a first draft of the skill

    line 28
  2. Distinctive:

    Add explicit language that prevents the wrong behavior

    line 40
  3. Distinctive:

    Add a red flag for the rationalization the agent used

    line 41
  4. Distinctive:

    Add a concrete example if the step was ambiguous

    line 42
  5. Distinctive:

    Remove content that agents ignored (it's not load-bearing)

    line 47
  6. Distinctive:

    Keep each skill under ~300 lines — after that, split or extract

    line 49
  7. Distinctive:

    Every skill file needs frontmatter:

    line 79
  8. Distinctive:

    Write it as a contract, not marketing copy.

    line 91
  9. Distinctive:

    After writing the skill:

    line 113
  10. Distinctive:

    Add it to CLAUDE.md skills table

    line 115
  11. Very specific:

    Add it to skills/using-a-team/SKILL.md trigger table

    line 117
  12. Distinctive:

    Test it: give an agent a task that should trigger the skill, verify they use it correctly

    line 118

“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

Build effective A Team skills through TDD for documentation: write the skill, watch agents use it, close the gaps.

What Makes a Good Skill

A skill is a reference guide that agents consult before taking action. It is NOT:

  • A tutorial (agents don't need hand-holding on basics)
  • A checklist of preferences (that's a rule file)
  • An agent definition (that's .claude/agents/)

A skill must:

  • Define WHEN to use it (trigger conditions)
  • Define WHEN NOT to use it (scope limits)
  • Define the process (steps, decision points)
  • Define red flags (patterns that mean you're off-track)
  • Be verifiable (an agent following it produces measurable output)

The TDD Process for Skills

Phase RED — Write the Skill, Watch Agents Fail

  1. Write a first draft of the skill
  2. Give agents a task that should trigger it
  3. Watch them use it — specifically look for:
    • Where they skip steps
    • Where they interpret a step differently than intended
    • Where they think they're done but aren't
    • Where the skill is silent on an important case
  4. The gaps you find ARE the failing tests

Phase GREEN — Close the Gaps

For each failure you observed:

  • Add explicit language that prevents the wrong behavior
  • Add a red flag for the rationalization the agent used
  • Add a concrete example if the step was ambiguous
  • Make the step smaller if the agent couldn't execute it correctly

Phase REFACTOR — Tighten

  • Remove content that agents ignored (it's not load-bearing)
  • Consolidate redundant sections
  • Keep each skill under ~300 lines — after that, split or extract

Skill File Structure

---
name: skill-name
description: When to use this (1-2 sentences). What it produces.
---

# Skill Title

## When to Use
[Trigger conditions — be specific enough that the agent knows for certain]

## When NOT to Use
[Scope limits — prevent misapplication]

## The Process
[Steps with decision points. Use flowchart notation for branching.]

## Red Flags — You're Doing It Wrong
[List of rationalizations and shortcuts that indicate the agent has gone off-track]

## Integration
[Which skills come before/after this one in the workflow]

Frontmatter Requirements

Every skill file needs frontmatter:

---
name: kebab-case-name          # matches the directory name
description: |                 # one sentence trigger + one sentence output
  Use when [condition].
  Produces [artifact].
---

The description is used by orchestrators and other agents to decide whether to invoke the skill. Write it as a contract, not marketing copy.

Naming Conventions

  • Directory: skills/kebab-case-name/
  • File: SKILL.md (always uppercase, always this name)
  • Skill name in frontmatter: matches directory name exactly
  • Supporting files: skills/kebab-case-name/supporting-file.md

Common Mistakes

MistakeFix
Skill tries to cover too muchSplit into two focused skills
Steps are vague ("review the code")Make them specific ("run git diff --staged")
No red flags sectionAdd the 3 most common ways agents misuse this skill
No "when NOT to use"Add scope limits — prevent misapplication
Skill is a list of preferencesMove to .claude/rules/ instead
Skill describes an agent's roleMove to .claude/agents/ instead

Registering a New Skill

After writing the skill:

  1. Add it to CLAUDE.md skills table
  2. Add it to AGENTS.md skills table
  3. Add it to skills/using-a-team/SKILL.md trigger table
  4. Test it: give an agent a task that should trigger the skill, verify they use it correctly

A skill that doesn't get used is a skill that doesn't exist.

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.