agentleFS
odere-proodere-pro/claude-calibration/skills/calibrate-subagents/SKILL.md

calibrate-subagents

Skill1 starsChanged 6 months agoMITView on GitHub

Audits every subagent `.md` across user / project / plugin-self / plugin-cache. Flags missing frontmatter (`name`, `description`, `tools`), the big footgun (no `tools:` → inherits ALL tools including every MCP server), bodies over 200 lines, omitted `model:` (defaults to `inherit`, silently inflates cost), vague descriptions Claude can't route on, near-duplicate descriptions that should be consolidated, bare-MCP usage that should move into the agent's `mcpServers:` frontmatter, and plugin-shipped agents that include `hooks:` / `mcpServers:` / `permissionMode:` frontmatter (silently ignored). Also produces the create-row companion when a recurring `subagent:missing-tools` pattern needs a write-guard hook. Invoked by the calibration orchestrator (`/calibrate`) and standalone via `/claude-calibration:calibrate-subagents`.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the planner detects a recurrence that this bundle's signatures trigger (per rules/dispatch.md), the create row is usually routed to a …

    line 78
  2. Very specific:

    After every edit or create, re-run bash <BUNDLE>/scripts/lint.sh <changed path> and record verify: ✓ if the signature no longer fires (or …

    line 89
  3. Distinctive:

    Don't reformat unrelated content when applying a fix.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

calibrate-subagents — per-feature bundle

You audit and tune subagent .md files. You receive one of two kinds of work:

  • Direct invocation (/claude-calibration:calibrate-subagents) — audit everything, report findings, propose fixes inline. The user drives the conversation.
  • Dispatch from the calibrator — one approved plan row at a time, applied surgically.

In both cases the workflow is the same; only the framing differs.

1. Enumerate

bash <BUNDLE>/scripts/enumerate.sh "$PROJECT_DIR"

Yields TSV scope\tpath. Scope is user (~/.claude/agents/*.md), project ($PROJECT/.claude/agents/*.md), or plugin-self ($PROJECT/agents/*.md when the project is itself a plugin, plus plugin-cache best-effort).

The plugin-self (cached + project-plugin) rows honour the CALIBRATION_PLUGIN_FILTER env var, so a calibration run scoped with /calibrate --plugins … only audits the requested plugins' subagents.

2. Lint

bash <BUNDLE>/scripts/lint.sh <path …>

Yields TSV path\tsignature\tseverity\tdetail. The signatures this bundle owns (see reference.md):

  • subagent:missing-name (HIGH)
  • subagent:missing-description (HIGH)
  • subagent:missing-tools (HIGH)
  • subagent:body-over-200 (MEDIUM)
  • subagent:default-inherit-model (MEDIUM)
  • subagent:vague-description (MEDIUM)
  • subagent:near-duplicate (MEDIUM)
  • subagent:bare-mcp-in-mcpjson (LOW)
  • subagent:plugin-ignored-frontmatter (LOW)

3. Fix — kind: edit rows

For each finding, the remediation pattern is in examples/<case>/:

  • subagent:missing-name / :missing-description → add the frontmatter field.
  • subagent:missing-tools → see examples/missing-tools/: add an explicit tools: list. This is the single biggest footgun — without it, the subagent inherits every MCP server.
  • subagent:body-over-200 → trim; move detail into a reference.md or out of the subagent body.
  • subagent:default-inherit-model → set model: explicitly (usually sonnet or haiku).
  • subagent:vague-description → rewrite with routing words ("use when …", "after …", "before …").
  • subagent:near-duplicate → consolidate the two subagents or rename to make routing unambiguous.
  • subagent:bare-mcp-in-mcpjson → move the MCP server from shared .mcp.json into this subagent's mcpServers: frontmatter (companion work in calibrate-mcp).
  • subagent:plugin-ignored-frontmatter → remove the silently-ignored frontmatter (hooks:, mcpServers:, permissionMode: — plugin-shipped subagents can't use these).

4. Create — kind: create rows

When the planner detects a recurrence that this bundle's signatures trigger (per rules/dispatch.md), the create row is usually routed to a sibling bundle:

  • subagent:missing-tools ×N → calibrate-hooks scaffolds a PreToolUse write-guard on Edit(.claude/agents/*.md) that fails if tools: is absent.

This bundle owns templates/subagent.md.tmpl for the case when a subagent is being recreated from scratch — frontmatter has every field set explicitly.

5. Verify

After every edit or create, re-run bash <BUNDLE>/scripts/lint.sh <changed path> and record verify: ✓ if the signature no longer fires (or verify: ✗ <signature> if it still does).

Hard rules

  • tools: MUST be set explicitly — omitting it inherits every MCP server in scope.
  • model: should be explicit — default inherit silently picks up the parent's Opus.
  • Body ≤ ~200 lines; routing detail in the description, not the body.
  • Plugin-shipped subagents must NOT include hooks: / mcpServers: / permissionMode: — those fields are silently ignored.
  • Don't reformat unrelated content when applying a fix.

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.