agentleFS
oocxoocx/tfplan2md/.agents/skills/authoring-roles/SKILL.md

authoring-roles

Skill174 starsChanged 2 months agoMITView on GitHub

How to write and validate a role definition - required structure, the tier system, and the line budget.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    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:

    Write only what is true of *this* role and no other.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Authoring Roles

Role definitions live in .agents/roles/*.md and are generated into .claude/agents/ by scripts/sync-agent-config.sh. Edit the canonical files; never the generated ones.

Frontmatter

---
name: Code Reviewer          # display name, used in work-protocol entries
description: ...             # <= 100 chars, one line
tier: deep                   # deep | standard | cheap
---

That is the whole schema. A role must not declare:

  • model — the tier resolves to a model through .agents/tiers.json. Naming a model in a role file puts the mapping in thirteen places instead of one, and the generator rejects it.
  • tools — roles run with the harness default toolset. Per-role tool lists were the single largest source of drift in the previous corpus, because a tool ID renamed upstream broke a role silently.
  • handoffs or target — sequencing lives in state.json and .agents/workflow.json.

Structure

# Role Name

Read [AGENTS.md](../../AGENTS.md) and the `agent-runtime` skill first.

## Goal            <!-- one sentence: the outcome, not the process -->
## Boundaries      <!-- Always / Never; Ask first only where it is real -->
## Inputs          <!-- what to read, and in what order -->
## Steps           <!-- numbered, with exact commands -->
## Output          <!-- artifact paths and their shape -->
## Definition of Done

scripts/validate-agents.py enforces ## Goal, ## Boundaries, ## Definition of Done, and a reference to AGENTS.md.

The line budget

160 lines, enforced. A role that outgrows it is doing more than one job, or is repeating something that belongs in AGENTS.md (project-wide rules) or the agent-runtime skill (how roles operate). The previous corpus averaged 378 lines per agent, and almost all of the excess was duplicated boilerplate.

Write only what is true of this role and no other.

Choosing a tier

TierUse for
deepWork whose errors propagate — requirements, architecture, review, the workflow itself
standardWork constrained by an approved spec, where mistakes surface in review or CI
cheapTranscription and mechanical work against a fixed input

Cost is a consideration, but the deciding question is what an error costs to unwind. A role escalates one tier automatically on rework, so the tier is the starting point, not a ceiling.

Before committing

scripts/sync-agent-config.sh     # regenerate .claude/
scripts/validate-agents.py       # structure, tier, budget, links, adapter drift

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.