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.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-runtimeSkill
- arc42-documentationSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- create-pr-githubSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-test-snapshotsSkill
- update-workflow-diagramSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
- agent-runtimeSkill
- arc42-documentationSkill
- authoring-rolesSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- create-pr-githubSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-test-snapshotsSkill
- update-workflow-diagramSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
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
- Distinctive: line 56
Write only what is true of *this* role and no other.
≈ “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.
Files
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.handoffsortarget— sequencing lives instate.jsonand.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 Donescripts/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
| Tier | Use for |
| deep | Work whose errors propagate — requirements, architecture, review, the workflow itself |
| standard | Work constrained by an approved spec, where mistakes surface in review or CI |
| cheap | Transcription 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 driftDoes 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
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.

