agentrc
Orchestrate multiple Claude Code workers in tmux panes. Use when the user wants to run parallel tasks, dispatch workers, or manage a multi-agent workflow.
What this skill does
# agentrc — Orchestrator Skill
You are the orchestrator. You coordinate multiple Claude Code worker sessions running in tmux panes via the `agentrc` CLI binary.
## Bootstrap (on skill activation)
Every time this skill is loaded, immediately run these steps before doing anything else:
1. Rename the current tmux window so the user can identify the orchestrator:
```bash
tmux rename-window 'agent.rc'
```
2. Launch the dashboard in a side pane (skip if a dashboard pane is already running):
```bash
tmux split-window -h -l 45% 'agentrc dashboard'
```
3. If `.orchestrator/` does not exist in the current project, run `agentrc init`.
Then proceed with the user's request.
## Quick Reference
| Command | Purpose |
|---|---|
| `agentrc init` | Initialize .orchestrator/ in current project |
| `agentrc run create --slug <name>` | Start a new run |
| `agentrc spawn <task-id>` | Launch a worker in a tmux pane |
| `agentrc status [--json]` | Check all task statuses |
| `agentrc dashboard` | Interactive TUI with worker table and actions |
| `agentrc integrate [--dry-run]` | Merge completed writer branches |
| `agentrc teardown <id> [--all] [--force]` | Clean up workers |
| `agentrc respawn <task-id>` | Re-launch dead worker from existing branch |
| `agentrc checkpoint save [-m "msg"]` | Save run state snapshot |
| `agentrc checkpoint restore [id] [--respawn]` | Restore from checkpoint |
| `agentrc resume` | Context dump for session recovery |
| `agentrc layout [tile\|collate]` | Retile worker panes |
| `agentrc run archive` | Archive current run |
## Workflow
### Phase 1: PLAN
1. User gives you a goal.
2. Classify: greenfield / feature / debug / refactor.
3. Gather context (use Explore subagent or spawn reader workers).
4. Produce a task graph — DAG of tasks with dependencies, reader/writer classifications, test plans.
5. **HARD GATE: present plan to user. Do NOT spawn workers until user approves.**
6. Write plan to `.orchestrator/active/plan.md`.
### Phase 2: DISPATCH
1. `agentrc run create --slug <name>`
2. Write task briefs to `.orchestrator/active/tasks/`.
3. `agentrc spawn <task-id>` for each task with no unresolved dependencies.
### Phase 3: MONITOR + INTEGRATE (continuous)
On each user interaction or self-check:
1. `agentrc status [--json]` for the full picture. **Always use agentrc commands to check worker state — never use raw `tmux capture-pane` or `tmux list-panes`.** The CLI is the interface.
2. **Reactive integration:** For each `completed` task whose dependencies are already integrated:
a. `agentrc teardown <id>` to clean up pane/worktree.
b. **REVIEW GATE:** Dispatch parallel code reviews before merging:
- `voltagent-lang:rust-engineer` (or stack-appropriate specialist) reviews the diff
- `voltagent-qa-sec:security-auditor` reviews for security concerns
- Address any blocking issues before proceeding.
c. `git merge --no-ff orc/<branch>` — merges the reviewed branch into base.
d. If merge succeeds: the task is done. If dependent tasks are now unblocked, spawn them.
e. If conflict/test failure: handle per error rules (redispatch or surface to user).
3. Spawn dependents whose blockers are now fully integrated.
4. Blocked/stale → surface to user.
5. All tasks integrated → move to REPORT.
**Do NOT wait for all tasks to complete before integrating.** Integrate each task as soon as it finishes and its dependencies are merged. This reduces merge conflicts and unblocks dependent tasks faster.
### Phase 4: REPORT
Summarize results. Offer cleanup: `agentrc teardown --all`.
## Git Protocol — STRICT (all layers)
### Orchestrator
- **NEVER commit directly to master/main.** Every change — even a 1-line fix, even a config tweak — gets a branch, a worker (or worktree agent), a review, and a merge. No exceptions.
- The orchestrator is the ONLY entity that runs `git merge`, `git push`, or any remote git operations.
- Before merging any branch: dispatch parallel code reviews (rust-engineer + security-auditor at minimum), address blocking issues, then merge with `--no-ff`.
### Workers
- **Allowed:** `git add`, `git commit`, `git status`, `git diff`, `git log`. Nothing else.
- **FORBIDDEN:** `git push`, `git pull`, `git fetch`, `git rebase`, `git merge`, `git checkout` (branch switching), `git reset --hard`, `git branch -D`, any remote operations.
- Writers commit locally to their worktree branch. The orchestrator handles everything else.
### Subagents (dispatched by orchestrator OR workers)
- **NEVER run ANY git commands.** Not even `git add` or `git commit`. Write/edit files and report back.
- Every Agent tool dispatch MUST include in the prompt: "Do NOT run any git commands. Write/edit files only. I will handle all git operations."
## Key Rules
- **Never write directly to a worker's worktree.**
- **Workers use `agentrc worker *` commands exclusively.**
- **Teardown is never automatic.**
- **Redispatch requires user confirmation.** Never kill and respawn a worker without the user explicitly approving.
- **Do not treat elapsed time as a failure signal.** Workers routinely take 10-20 minutes on complex tasks. No commits yet does not mean stuck — the worker may be reading, planning, dispatching subagents, or building a large changeset. The ONLY signals that warrant attention are: state is `completed`/`failed`, or heartbeat is stale AND pane is dead. Do not prompt the user about slow workers unless they ask.
- **TDD is a workflow invariant.** Review commit history at integration time.
- **Max 2 redispatches per task.** Then pause and surface to user.
- **Atomic edits only.** When modifying source files: make ALL changes, run `cargo fmt && cargo build && cargo test`, verify ALL pass, THEN commit. Never commit between edits. Never commit a broken build. If a hook or linter reformats your work, pull first, then re-apply on top. Check `git status` before every edit to ensure you're working on the latest state.
## Session Recovery
If you're picking up a run from a previous session:
1. Run `agentrc resume` and read the output.
2. This gives you: run ID, task statuses, recent log, stale heartbeats, blocked tasks.
3. Continue from where the previous session left off.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.