PLUGIN brewcode / Skills

agents opus

Manages the agent roster across project, global and plugin scopes. Give one free-form prompt; the skill picks a mode, prints a PLAN block, and tells you why. No keyword grammar.

Quick reference

FieldValue
Command/brewcode:agents
Input[prompt] [status|list|create|improve|review|sync]; empty = read-only status
Specialistbrewcode:agent-creator
List source.claude/agents/, ~/.claude/agents/, ${CLAUDE_PLUGIN_ROOT}/agents/ (shipped, read-only)
Modelopus

When to use

SituationPrompt
See which agents exist and where they overlap/brewcode:agents
Add an expert for a recurring job/brewcode:agents create a backend validator agent
Fix weak triggers or a bloated system prompt/brewcode:agents improve <agent-name>
Re-check agent files against the code/brewcode:agents sync from the current session

Modes

ModeTriggerDoes
statusdefault for any “show me” intentInventory by scope, state, overlaps, health flags
listexplicit “list” onlyPlain listing of *.md across all agent scopes
create”create” / “new” / “add” / “scaffold”Scaffolds an agent via agent-creator
improve”improve” / “refactor” / “fix”, or a bare nameTunes description triggers and system prompt
review”review” / “validate”One reviewer (project agent, else general-purpose): review, then double-check
syncsync, memory sync, “bring in line with the code”Re-verifies each agent file against the code, deletes first, never grows

Batch is a flag, not a mode: a plural form, “all” or several names fan out to one spawn per agent. Russian prompts work too.

Example

/brewcode:agents create a backend validator agent
/brewcode:agents sync from the current session

The first prints a PLAN block, asks scope, model and CLAUDE.md update in one question, then reports the file path, model and next steps (/reload-plugins, a test phrase). The second re-verifies agent files against the session and reports the line delta.

How it works #
  1. Input gate

    Reads the whole prompt. Empty input runs read-only status; only an explicit menu request opens the menu.

  2. Announce

    Prints PLAN — brewcode:agents once: INPUT, MODE, SCOPE, DO, RESULT.

  3. Decide once

    Bundles unresolved write decisions into one AskUserQuestion (at most four questions). Read-only runs ask nothing.

  4. Dispatch

    Create, improve and sync go to brewcode:agent-creator, one spawn per file; review goes to one reviewer.

  5. Scoped sync

    After create or improve, the coordinator checks only the written file against the shared sync reference.

  6. Report

    Prints mode, target, path, model, scope and CLAUDE.md status.

Delegation of the fan-out follows the six-field brief in Delegation. One subagent owns one agent definition.

Authoring a Claude Code mod is a separate job: see mod-creator and mods.

Technical details

Create / improve parameters #
ParameterOptionsNotes
ScopeProject / Global / PluginProject: .claude/agents/; Global: ~/.claude/agents/; Plugin: brewcode/agents/, offered only when test -d brewcode/.claude-plugin succeeds
Modelsonnet / opus / haiku / inherit, or a verified model idInherit uses the caller’s model
CLAUDE.md updateyes / noAdds or updates the agent row in the agents table
Improve focustriggers / system prompt / both / full reviewImprove mode only
DescriptionBudget ≤150 tokens (about 600 characters); lead sentence ≤160 charactersDrives discovery; ≤100 characters is an optional target
Specialistbrewcode:agent-creatorNever writes under ${CLAUDE_PLUGIN_ROOT}: the installed copy is read-only

improve resolves the target across writable scopes only. A name found only under the shipped ${CLAUDE_PLUGIN_ROOT}/agents/ is reported and the skill stops.

Sync mode #
ScopeMeaning
repo (default)Whole working tree
sessionThis conversation: decisions, corrections, bugs hit
commitgit show / git diff <ref>, default HEAD

Announced as Sync scope: <scope> — <evidence> | targets: <N> agents. Implemented in brewcode/skills/skills/references/mode-sync.md (steps S1-S6), the same file /brewcode:skills sync runs.

Non-growth: each synced file ends at or below its original line count; total delta ≤ 0. Order: DELETE, then FIX, then ADD. A clean file reports sync: no drift.

VerdictAction
STALEFix to minimal true form
DEADDelete, plus anything that only explained it
DUPLICATEKeep the single best location
OBVIOUSDelete
DRIFTCompress prose to a table row
MISSINGAdd ≤ 1 line, only if verified against a real source

Report: per-target table (File, Lines before → after, Fixed, Deleted, Added, Key change), corrected facts, added items with source, skipped agents, total delta.

Reference files #

agent-creator, hook-creator and mod-creator read domain knowledge from this skill’s references/ directory, each only the file it needs: 16 files in references/.

PrefixUsed byHolds
agent-* (5)agent-creatorFile format, frontmatter fields, scope and tools, context and execution, template and checklist, known issues
hooks-* (6)hook-creator33-event table, stdin and output contract, 5 handler types, env vars, templates, changes through 2.1.309
mods-* (5)mod-creatorAPI index, mod lifecycle, patterns, testing kit, per-version changes

Drift check: scripts/mods-ref-check.mjs <types.d.ts> <refs dir> compares every symbol-index row of mods-api.md with the Claude Code types file. Exit 0 = clean, 1 = drift, 2 = error; the verdict is the first stdout line. tests/run.sh runs the offline suite and adds a live check when MODS_TYPES=<types.d.ts> is set.

Plugin agent limits #

Plugin agents ignore frontmatter hooks, mcpServers, permissionMode and initialPrompt; place plugin hooks in hooks/hooks.json. Ordinary subagents cannot use AskUserQuestion, so unresolved decisions return to the main caller. A partial maxTurns return is unfinished work: inspect checkpoint evidence before resuming.

skills

Sibling: manage skills

rules

Sibling: manage project rules

brewcode

Plugin overview

GitHub source

SKILL.md

Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ