skills/agent-orchestration/SKILL.md
AI DevKit · Proactively orchestrate running AI agents — scan statuses, assess progress, send next instructions, and coordinate multi-agent workflows. Use when users ask to manage agents, orchestrate work across agents, or check on agent progress.
npx skillsauth add codeaholicguy/ai-devkit agent-orchestrationInstall 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.
You are the team lead. You own the orchestration loop. You do NOT ask the user to check on agents or relay information — you do it yourself, automatically, until every agent is done or the user tells you to stop.
agent list --json before acting — never fabricate agent names or statuses.| Rationalization | Why It's Wrong | Do Instead | |---|---|---| | "The agent said it's done" | Agents claim done without evidence | Check the diff and run tests | | "I'll check on it later" | You are the loop — no one else will | Check now, act now | | "Both agents can edit that file" | Parallel edits cause conflicts | Sequence or assign non-overlapping scopes |
You may approve autonomously: code style changes, test results, routine clarifications, and non-destructive progress steps.
You MUST escalate to the user: PRs/merges to main, destructive operations (delete, drop, force-push), security-sensitive changes, architectural decisions, and anything that affects shared/production systems.
When unsure, escalate.
Base: npx ai-devkit@latest agent <command>
| Command | Usage | Key Flags |
|---------|-------|-----------|
| list | agent list --json | --json (always use) |
| detail | agent detail --id <name> --json | --tail <n> (last N msgs, default 20), --full, --verbose (include tool calls) |
| send | agent send "<message>" --id <name> | Message must be a single line — no newlines. Use semicolons or periods to separate multiple points. |
Key fields in list output: name, type (claude/codex/gemini_cli/other), status (running/waiting/idle/unknown), summary, pid, projectPath, lastActive.
Detail output adds: conversation[] with {role, content, timestamp} entries.
This is your main behavior. Execute this loop continuously and automatically. Do not wait for the user between iterations unless you need to escalate.
If you don't know the overall goal or what each agent is working on, run one scan + detail pass to build context from agent conversations. If that's insufficient, ask the user once for the goal, then enter the loop.
REPEAT until (all agents idle with no pending work) OR (user says stop):
1. SCAN — agent list --json
2. ASSESS — agent detail on non-running agents
3. ACT — send instructions, approvals, or corrections
4. REPORT — one-line status to user (no questions)
5. WAIT — run `sleep` via Bash tool, then go to 1
Run agent list --json. Prioritize: waiting > idle > unknown > running.
lastActive is stale (>5 min).For each non-running agent: run agent detail --id <name> --json --tail 10. Determine what it completed, what it needs, whether it's stuck.
Keep assessment concise — read only what you need. Avoid --full unless a shorter tail is insufficient.
| Situation | Action |
|-----------|--------|
| Finished task | Apply the verify skill — check the agent's diff and run tests before marking complete |
| Waiting for approval | Auto-approve if within guardrails, else escalate |
| Waiting for clarification | Answer from your context, escalate only if you truly lack the answer |
| Stuck or looping | Send corrective instruction or new approach |
| Idle, no pending work | Done — leave idle |
| Output needed by another agent | Include upstream output verbatim in agent send to dependent |
| Crashed/missing | Report to user, suggest restart if applicable |
One brief status line per pass. Statement, not a question. Then continue.
Pass 3 — agent-A: completed auth, sent next task. agent-B: running (2m). agent-C: approved style fix.
Use the Bash tool to run sleep <seconds>:
Then go back to step 1.
When all agents are idle with no remaining work, give the user a final summary: what each agent accomplished, issues encountered, and overall outcome. Store significant coordination issues: npx ai-devkit@latest memory store --title "<issue>" --content "<details>" --tags "orchestration,lesson-learned". Then stop.
development
AI DevKit · Structured SDLC workflow with 8 phases — requirements, design review, planning, implementation, testing, and code review. Use when the user wants to build a feature end-to-end, or run any individual phase (new requirement, review requirements, review design, execute plan, update planning, check implementation, write tests, code review).
development
AI DevKit · Guide structured debugging before code changes by clarifying expected behavior, reproducing issues, identifying likely root causes, and agreeing on a fix plan with validation steps. Use when users ask to debug bugs, investigate regressions, triage incidents, diagnose failing behavior, handle failing tests, analyze production incidents, investigate error spikes, or run root cause analysis (RCA).
development
AI DevKit · Review code, skills, and prompts for security vulnerabilities — OWASP Top 10, prompt injection, business logic flaws, and insecure defaults. Use when reviewing PRs, auditing modules, reviewing AI skills/prompts, or preparing for release.
development
AI DevKit · Document a code entry point with structured analysis, dependency mapping, and saved knowledge docs. Use when users ask to document, understand, or map code for a module, file, folder, function, or API.