PLUGIN brewcode / Skills
On this page
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
| Field | Value |
|---|---|
| Command | /brewcode:agents |
| Input | [prompt] [status|list|create|improve|review|sync]; empty = read-only status |
| Specialist | brewcode:agent-creator |
| List source | .claude/agents/, ~/.claude/agents/, ${CLAUDE_PLUGIN_ROOT}/agents/ (shipped, read-only) |
| Model | opus |
When to use
| Situation | Prompt |
|---|---|
| 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
| Mode | Trigger | Does |
|---|---|---|
| status | default for any “show me” intent | Inventory by scope, state, overlaps, health flags |
| list | explicit “list” only | Plain 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 name | Tunes description triggers and system prompt |
| review | ”review” / “validate” | One reviewer (project agent, else general-purpose): review, then double-check |
| sync | sync, 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 #
- Input gate
Reads the whole prompt. Empty input runs read-only status; only an explicit menu request opens the menu.
- Announce
Prints
PLAN — brewcode:agentsonce: INPUT, MODE, SCOPE, DO, RESULT. - Decide once
Bundles unresolved write decisions into one AskUserQuestion (at most four questions). Read-only runs ask nothing.
- Dispatch
Create, improve and sync go to
brewcode:agent-creator, one spawn per file; review goes to one reviewer. - Scoped sync
After create or improve, the coordinator checks only the written file against the shared sync reference.
- 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 #
| Parameter | Options | Notes |
|---|---|---|
| Scope | Project / Global / Plugin | Project: .claude/agents/; Global: ~/.claude/agents/; Plugin: brewcode/agents/, offered only when test -d brewcode/.claude-plugin succeeds |
| Model | sonnet / opus / haiku / inherit, or a verified model id | Inherit uses the caller’s model |
| CLAUDE.md update | yes / no | Adds or updates the agent row in the agents table |
| Improve focus | triggers / system prompt / both / full review | Improve mode only |
| Description | Budget ≤150 tokens (about 600 characters); lead sentence ≤160 characters | Drives discovery; ≤100 characters is an optional target |
| Specialist | brewcode:agent-creator | Never 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 #
| Scope | Meaning |
|---|---|
repo (default) | Whole working tree |
session | This conversation: decisions, corrections, bugs hit |
commit | git 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.
| Verdict | Action |
|---|---|
| STALE | Fix to minimal true form |
| DEAD | Delete, plus anything that only explained it |
| DUPLICATE | Keep the single best location |
| OBVIOUS | Delete |
| DRIFT | Compress prose to a table row |
| MISSING | Add ≤ 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/.
| Prefix | Used by | Holds |
|---|---|---|
agent-* (5) | agent-creator | File format, frontmatter fields, scope and tools, context and execution, template and checklist, known issues |
hooks-* (6) | hook-creator | 33-event table, stdin and output contract, 5 handler types, env vars, templates, changes through 2.1.309 |
mods-* (5) | mod-creator | API 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.
Related
skills
rules
brewcode
GitHub source
Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ