auto-insights
Show or configure auto-generated insights from the claudectl brain — friction patterns, suggested rules, and workflow improvements
Set this Claude session's agent-bus role so other sessions can address it (e.g. /role frontend, /role backend, /role tester)
$ npx -y skills add mercurialsolo/claudectl --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/roleContext preview
What this command does when you run it.
Set this Claude session's agent-bus role so other sessions can address it (e.g. /role frontend, /role backend, /role tester)
name: role description: Set this Claude session's agent-bus role so other sessions can address it (e.g. /role frontend, /role backend, /role tester) args: "<role-name>"
Set this session's agent-bus role so peers can send it directed messages with `claudectl bus send <role> …`. The binding is **PID-keyed** — it follows this exact Claude Code process, so re-runs in the same project don't get confused by other sessions sharing the cwd.
Common role names: `spec`, `frontend`, `backend`, `data-analyst`, `tester`, `infra`, `reviewer`, `planner`. Pick whatever maps to what this session will actually own.
1. The user supplied a role name as `{{args}}`. If it's empty, run `claudectl bus role suggest --json --top 3` to fetch transcript-derived candidates and propose them; if even that comes back empty, ask the user what to name the role and stop until they reply.
2. Run:
claudectl bus role bind --self {{args}}The `--self` flag tells the CLI to walk the ancestor process chain, find this Claude Code process, and bind the role to that pid + the current working directory. No need to look up the pid yourself.
3. On success the command prints `bound role <name> -> <cwd> (pid=<pid>)`. Echo that confirmation back to the user.
4. If the command errors with "could not find a Claude Code process in the ancestor chain", the plugin was invoked outside the normal `claude` execution context. Tell the user to try again from inside a Claude session, or pass an explicit pid via `claudectl bus role bind <name> <cwd> --pid <pid>`.
5. If the user wants to verify the binding, suggest `claudectl bus role list` or `claudectl bus whoami --json`.
Cwd-only bindings get ambiguous when two Claude sessions run in the same folder (e.g. worktrees, or one session in `/repo` and another in `/repo/sub`). The pid binding picks the specific session you ran `/role` from, so directed messages land where you expect.
See issues #307 (pid binding) and #310 (this slash command).
Swarm orchestration for claude code agents with a local brain that steers based on your preferences
Show or configure auto-generated insights from the claudectl brain — friction patterns, suggested rules, and workflow improvements
Show claudectl brain learning metrics — accuracy, correction rate, and effectiveness
Show status of all active Claude Code sessions (cost, health, context usage)
Show Claude Code spend summary — total cost, per-session breakdown, and burn rate