agents opus

Prompt-driven

Give a free-form prompt; the skill auto-selects a mode and tells you why. No keyword grammar.

Quick reference

FieldValue
Command/brewcode:agents
Inputfree-form prompt or empty
Specialistbrewcode:agent-creator
List source.claude/agents/, ~/.claude/agents/, ${CLAUDE_PLUGIN_ROOT}/agents/ (shipped, read-only)
Modelopus

When to use

  • Check the status of all agents across project and global scopes
  • Create a new agent from a plain-English description
  • Improve an existing agent’s trigger phrases or system prompt
  • Review an agent for quality, focus, and trigger coverage
  • Sync agent files against real code/CLAUDE.md/rules after a repo, session, or commit changed (memory sync)
  • Batch-create or batch-improve a set of agents in one pass

Examples

/brewcode:agents
/brewcode:agents status of my agents
/brewcode:agents create a backend validator agent
/brewcode:agents improve reviewer
/brewcode:agents sync
/brewcode:agents синк по текущей сессии

How it works

  1. Input gate

    Reads $ARGUMENTS. An empty prompt skips analysis and jumps directly to the No-prompt menu; a non-empty prompt proceeds to mode selection.

  2. Auto-mode select

    Announces Mode: <mode> (agents) — chosen because … based on keywords, intent, and target presence in the prompt.

  3. No-prompt menu

    Sends a single AskUserQuestion with options: Status (agents) (recommended), Status (all: agents+rules+skills), Create, Improve, Review, Sync agents (memory sync), List (plain), Cancel. The skill continues with the chosen mode.

  4. Dispatch

    Routes to the appropriate handler. Create, improve and sync delegate to the brewcode:agent-creator specialist via Task tool, passing full context — description, scope, model, and improvement focus; review goes instead to the project’s reviewer agent from .claude/agents/ (falling back to general-purpose), two-phase. Sync mode reads the shared mode-sync.md reference (also used by /brewcode:skills) and fans out one agent-creator subagent per target file. After create/improve completes, the coordinator re-runs that same reference itself, scoped to only the file just written — no extra agent-creator spawn — and applies the verdicts directly with targeted edits.

  5. Real status

    Four blocks, never a flat list: inventory by scope (shipped plugin, read-only / plugin source, workspace-only / project / global — counts, names, load path), state (enabled or disabled via the _name.md toggle marker, model), overlaps and conflicts (same name shadowed across scopes, duplicate triggers or descriptions), and health flags (missing README or frontmatter, agents missing Bash in tools:).

  6. Final output

    Prints a detection + result table: mode chosen, target, file path, model, scope, and CLAUDE.md update status. Suggests next steps such as /reload-plugins and a test invocation phrase.

Modes

ModeTriggerAction
statusdefault for any “show me” intent — “статус”, “что есть”, “состояние”Inventory by scope, state, overlaps, health flags
listexplicit only — “list” / “список” / “перечисли”Globs *.md across .claude/agents/, ~/.claude/agents/, ${CLAUDE_PLUGIN_ROOT}/agents/ (shipped, read-only), plus brewcode/agents/ only inside the plugin workspace (test -d brewcode/.claude-plugin)
create”создай” / “create” / “new” / “добавь” / “scaffold”Scaffolds a new agent file via agent-creator; asks scope, model, CLAUDE.md update
improve”улучши” / “improve” / “refactor” / “fix” / “почини”, or a bare existing <name|path>Tunes description triggers and system prompt quality
review”ревью” / “review” / “validate” / “проверь корректность”Single reviewer — the project’s agent from .claude/agents/, else general-purpose — two-phase: review, then double-check the findings
syncsync, синк, memory sync, актуализируй, обнови знания, приведи в соответствие с кодомMemory sync: rewrites agent files against ground truth via the shared reference; non-growth guaranteed
batchauto-detected fan-out flagNot a menu item — auto-detected from plural form, “все” / “all”, or multiple names/paths; triggers parallel delegation when creating or improving multiple agents

Delegation

Why the rule exists

A big task handed to one agent = an agent gone for an hour: you cannot observe it, cannot correct it, and it usually drifts off-target.

One subagent = ONE bounded unit — here, ONE agent definition: roughly 5 files, roughly 10 steps. “Create the whole roster” is never one task; a batch is split into N spawns fired in ONE message, one agent-creator per agent file.

Every spawn prompt carries six fields. A bare one-line task is never enough:

FieldContent
GOALthe overall task and why it exists — the point beyond the file edit
ROLEwhat this agent owns; what it must NOT touch
SCOPEexact paths/commands in bounds + explicit out-of-bounds
CONTEXTwhat is already done, by whom, what runs in parallel — trimmed to what THIS agent needs
CONSUMERwho or what uses the result next, and the shape it must fit
DONEacceptance criteria + the exact report shape you want back

For create, that means the specialist is told the scope and model were already decided (do not re-ask), which agents already exist and must not be duplicated, how many siblings run in parallel, and that its description line drops verbatim into the CLAUDE.md agents table row written right after it finishes.

Create / improve parameters
ParameterOptionsNotes
ScopeProject / Global / PluginProject → .claude/agents/; Global → ~/.claude/agents/; Plugin → brewcode/agents/, offered only when test -d brewcode/.claude-plugin succeeds (the dev/plugin workspace) — elsewhere the option is dropped, since it would write a stray <cwd>/brewcode/agents/
Modelsonnet (recommended) / opus or fable / haiku / inheritinherit omits the model: field entirely, so the agent runs on the calling session’s model
CLAUDE.md updateyes / noAdds or updates the agent row in the agents table; appends a new section if none exists
Improve focustriggers / system prompt / both / full reviewAsked for improve mode only
Descriptionfree-form, aim ≤100 charsUsed as the agent description frontmatter — drives LLM auto-invocation
Specialistbrewcode:agent-creatorHandles file scaffolding and prompt engineering; never writes under ${CLAUDE_PLUGIN_ROOT} — the installed plugin copy is read-only

improve resolves the target across the writable scopes (project / global / plugin workspace) only. A name that only matches under the shipped, read-only ${CLAUDE_PLUGIN_ROOT}/agents/ is reported and the skill stops — it is never copied or edited.

Sync mode
ScopeMeaning
repo (default)Whole working tree
sessionThis conversation only — decisions, user 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) via the constant SYNC_REF = ${CLAUDE_SKILL_DIR}/../skills/references/mode-sync.md — the same file /brewcode:skills sync runs, so the two rosters cannot drift apart.

Non-growth directive: each synced file ends <= its original line count; total delta <= 0. Any positive delta needs per-line justification. Order: DELETE first, then FIX, then ADD last.

Auto-dispatch after create/improve: once a create or improve completes, the same reference runs again scoped to only the file just written — S3 ground truth through S5 verdicts, folded into one row of the final report. No second agent-creator spawn: the coordinator applies every verdict itself with targeted Edit calls, since S4 fan-out is skipped for this scoped pass. A clean file reports one line: sync: no drift.

VerdictAction
STALEFix to minimal true form
DEADDelete, plus anything that only existed to explain it
DUPLICATEKeep the single best location
OBVIOUSDelete
DRIFTCompress prose to a table row
MISSINGAdd <= 1 line, only if verified against a real source and its absence costs a real failure

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

📝

rules

Sibling: manage project rules
✏️

skills

Sibling: manage skills
🔄

memory-sync-setup

Sibling: generates a project-local sync over memory files, CLAUDE.md, rules — same non-growth rule
🚀

brewcode

Plugin overview
🔗

GitHub source

SKILL.md

Updating plugins

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.