plugins/agent-loops/skills/co-pilot-loop/SKILL.md
Cooperative Multi-Agent Coordination Loop. Spawns a lightweight companion sub-agent (Gemini 3.5 Flash Low) to perform spec discovery, planning, and implementation. The primary agent (Claude) acts as the QA Director, answering Gemini's questions, approving the spec/plan, and running verification tests. Assumes the superpowers plugin is installed in the target repository.
npx skillsauth add richfrem/agent-plugins-skills co-pilot-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Co-Pilot Loop splits software engineering tasks between a Supervisor (Outer Loop — you) and an Executor (Inner Loop — a lightweight companion sub-agent). The Supervisor acts as the product manager and QA director, while the Executor performs spec writing, planning, and coding inside an isolated worktree.
You do not know which CLI or chat interface the user is using — and that's fine. The skill is model-agnostic. It reads the cheapest model for the active CLI at runtime.
Ask the user once (or detect from context):
"Which CLI backend is available for the sub-agent? (
agy,claude,copilot,codex,llama)"
Read plugins/agent-loops/references/cheapest_models.json (relative to the repo root where this skill is installed). Select the model field for the detected CLI:
| CLI | Cheapest Model | Notes |
|:----|:--------------|:------|
| agy | gemini-3.5-flash | Use --model "Gemini 3.5 Flash (Low)" — lower thinking level keeps token costs down |
| claude | claude-haiku-4.5 | $1/$5 per MTok input/output |
| copilot | gpt-5.4-nano | 20 cr/1M input, 125 cr/1M output |
| codex | gpt-5.4-nano | OpenAI-compatible endpoints |
| llama | gemma-4-12b | Free, self-hosted at port 8089 |
Source of truth:
plugins/agent-loops/references/cheapest_models.json. Always read this file — do not hardcode model names. The table above is a snapshot only.
Use run_agent.py with the resolved CLI and model:
# For agy (recommended — cheapest Gemini)
python ./scripts/run_agent.py <PERSONA_FILE> <PACKET_FILE> <OUTPUT_FILE> "<INSTRUCTION>" \
--cli agy --model "Gemini 3.5 Flash (Low)" < /dev/null
# For claude CLI
python ./scripts/run_agent.py <PERSONA_FILE> <PACKET_FILE> <OUTPUT_FILE> "<INSTRUCTION>" \
--cli claude --model claude-haiku-4.5 < /dev/null
# For copilot CLI
python ./scripts/run_agent.py <PERSONA_FILE> <PACKET_FILE> <OUTPUT_FILE> "<INSTRUCTION>" \
--cli copilot --model gpt-5.4-nano < /dev/null
CRITICAL: Always append
< /dev/nullto preventSIGTTINprocess suspension in background execution.
Create an isolated Git worktree or branch for the Executor. Generate a Strategy Packet (via scripts/agent_orchestrator.py packet) containing:
git commands.docs/superpowers/specs/YYYY-MM-DD-<feature>-spec.md.implementation_plan.md.Hand the Strategy Packet to the Executor and start the parallel session.
You (the Supervisor) enforce the following sequential gates. No gate may be skipped.
When the Executor generates a design spec, audit it:
TODO, TBD, REPLACE).Review the Executor's implementation_plan.md / task.md:
Once Executor signals completion, run the verification suite:
python3 run_tests.py # or npm run test / npm run build
git diff # inspect all changed files
Classify issues using the severity schema:
Generate correction packets via:
python ./scripts/agent_orchestrator.py correct --packet handoffs/task_packet_NNN.md --feedback "Specific failure reason"
Once all verification tests pass:
main (only from the main repo root, never from inside the worktree).git commit the changes.python ./scripts/agent_orchestrator.py retro.testing
Skill for creating and managing isolated git worktrees (`.worktrees/issue-NNN`) for issue execution branches. USE ONLY when setting up or cleaning up isolated git worktrees for specific issue execution. DO NOT USE for managing local task files (use `task-agent`) or escalating tasks to issues (use `github-issue-backlog-agent`).
data-ai
Skill for orchestrating the end-to-end GitHub issue lifecycle flow: Issue -> Worktree -> Implementation -> PR Creation -> Resolution Closure. USE ONLY when running or dry-running full lifecycle orchestration for resolving an issue with a PR. DO NOT USE for isolated worktree management only (use `issue-worktree-agent`) or logging issues (use `github-issue-agent`).
tools
Automatically ranks GitHub issues (P0-P3) based on friction tier, frequency, and blockages, synchronizing priority labels and GitHub Projects v2 custom fields.
testing
Bridge skill for escalating ephemeral local task scratchpad items (`tasks/*.md`) into durable, taxonomy-validated, evidence-rich GitHub Issues. USE ONLY when promoting a single-session local task into durable repository backlog. DO NOT USE for managing local kanban boards (use `task-agent` instead) or directly querying/commenting on issues (use `github-issue-agent` instead).