From aradotso-trending-skills-37
Orchestrates coding tasks in Claude Code via /do router with four-tier agents (skill to fleet), campaign persistence across sessions, parallel git worktrees, and 25 skills for autonomous campaigns.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-1 --plugin aradotso-trending-skills-37This skill uses the workspace's default tool permissions.
```markdown
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
---
name: citadel-agent-orchestration
description: Agent orchestration harness for Claude Code with four-tier routing, campaign persistence, parallel fleet agents, and 25 skills for autonomous coding campaigns.
triggers:
- set up citadel for my project
- run parallel agents with citadel
- orchestrate a coding campaign
- use citadel to build a feature
- how do I use the /do router
- run a fleet of agents in parallel
- persist a coding campaign across sessions
- automate code review with citadel
---
# Citadel — Agent Orchestration Harness for Claude Code
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Citadel is a Claude Code **plugin** that routes any coding task through the cheapest capable tool — from a direct one-line fix to a multi-day parallel agent campaign. It provides 25 skills, 4 autonomous sub-agents, 10 lifecycle hooks, and campaign persistence across sessions.
---
## Installation
**Prerequisites:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code) + Node.js 18+
```bash
# 1. Clone Citadel once (global install — works across all projects)
git clone https://github.com/SethGammon/Citadel.git ~/citadel
# 2. Launch Claude Code with the plugin loaded
claude --plugin-dir ~/citadel
# 3. Run first-time setup inside any project
/do setup
Persistent install (recommended):
/plugin marketplace add ~/citadel
/plugin install citadel@citadel-local
/reload-plugins
After install, /do is available in every Claude Code session.
/do RouterType what you want in plain English. /do classifies intent and dispatches to the cheapest capable path automatically.
/do fix the typo on line 42 → Direct edit (zero overhead)
/do review the auth module → /review (5-pass code review)
/do why is the API returning 500 → /systematic-debugging
/do add payments to my app → /create-app tier 5
/do build me a recipe app → /prd → /architect → /archon
/do overhaul all three services → /fleet (parallel agents)
/do continue → resumes active campaign
You never have to choose the tier. If routing is wrong, say "wrong tool" or "just do it yourself" and it adjusts.
| Tier | Tool | When to Use |
|---|---|---|
| 1 | Skill | Single-domain task (review, test, doc, refactor) |
| 2 | Marshal | Multi-skill chain within one session |
| 3 | Archon | Multi-session autonomous campaign with quality gates |
| 4 | Fleet | Parallel agents across isolated git worktrees |
/prd "a recipe sharing app with user accounts and ratings"
# → Generates a full Product Requirements Document
/architect
# → Converts active PRD into file tree, build phases, end conditions
/create-app
# → End-to-end creation (5 tiers: blank → guided → templated → generated → feature addition)
/review src/auth/ # 5-pass: correctness, security, performance, readability, consistency
/test-gen src/payments.ts # Generates runnable tests; detects framework; retries up to 3x
/doc-gen src/api/ # Function/module/API reference docs; matches your style
/refactor src/legacy/ # Safe multi-file refactor; typechecks before/after; reverts on failure
/scaffold "UserService" # Project-aware file generation; reads your conventions
/create-skill # Turns a repeating pattern into a reusable Citadel skill
/research "best approach for rate limiting in Express"
/research-fleet "compare auth strategies: JWT vs sessions vs OAuth" # parallel scouts
/experiment "optimize this function" fitness="benchmark score" # isolated worktree loops
/systematic-debugging # 4-phase root cause; stops after 2 failed fixes
/design # Generates/maintains design manifest for visual consistency
/qa # Playwright-based browser interaction testing (optional dep)
/postmortem # Auto-generates structured postmortem from completed campaign
/triage # GitHub issue/PR investigator; classifies and reviews contributed code
/live-preview # Mid-build visual verification via screenshots
/session-handoff # Transfers context between sessions
/do setup # First-run harness configuration
Campaigns survive terminal closes and session restarts. State is stored in markdown files under .planning/ and .citadel/.
# Start a campaign
/do build a full authentication system with JWT and refresh tokens
# Close terminal, come back tomorrow
/do continue # Picks up exactly where it left off
Campaign files track:
See docs/CAMPAIGNS.md in the Citadel repo for the full spec.
Fleet runs 2–3 Claude Code agents simultaneously in isolated git worktrees. Discoveries compress into ~500-token briefs that relay between waves.
/fleet "refactor the database layer, API layer, and auth layer in parallel"
How it works internally:
git worktree add)Safety: Parallel agents never share a worktree. Merges are gated on quality checks.
See docs/FLEET.md for coordination protocol details.
These run without any action on your part:
| Hook | Trigger | Behavior |
|---|---|---|
| Per-file typecheck | Every file edit | Catches type errors at write-time |
| Circuit breaker | 3 consecutive tool failures | Forces "try a different approach" |
| Quality gate | Session end | Scans modified files for anti-patterns |
| Intake scanner | Session start | Reports pending work items |
| File protection | Before edit/read | Blocks edits to protected files; blocks .env reads |
| Pre-compaction save | Before context compaction | Saves full session state |
| Post-compaction restore | After context compaction | Restores session state |
| Worktree setup | Agent spawn | Auto-installs deps in parallel worktrees |
| External action gate | Before push/PR (opt-in) | Requires user approval before external actions |
| Init project | Session start | Auto-scaffolds .planning/ and .citadel/scripts/ |
Validate all hooks are working:
node hooks_src/smoke-test.js
/do build me a todo app with React, TypeScript, and Supabase
Citadel will:
/prd to generate requirements/architect to generate file tree and phases/archon to execute the campaign autonomously/qa at the end to verify the result/refactor convert all callback-style async code in src/ to async/await
Citadel will:
/test-gen src/services/payments.ts
Citadel will:
/research-fleet "compare: Prisma vs Drizzle vs Kysely for a multi-tenant SaaS"
Multiple research scouts run in parallel, then compress findings into a unified report.
/do why is my Stripe webhook returning 400 intermittently
Routes to /systematic-debugging, which runs:
Turn any repeating pattern into a Citadel skill:
/create-skill "every time I add a new API endpoint I need to: create the route file,
add OpenAPI spec, generate the Zod schema, write integration tests, and update the README"
Citadel generates a .claude/skills/your-skill-name.md file you can invoke with /your-skill-name in future sessions.
your-project/
├── .planning/ # Campaign state (phases, decisions, status)
│ ├── CAMPAIGN.md
│ ├── DECISIONS.md
│ └── FEATURES.md
├── .citadel/
│ └── scripts/ # Per-project hook scripts
└── ...your code...
~/citadel/ # Plugin install (global)
├── hooks_src/ # Hook implementations
│ └── smoke-test.js
├── skills/ # All 25 skill definitions
├── agents/ # Sub-agent definitions
└── docs/
├── CAMPAIGNS.md
├── FLEET.md
├── SKILLS.md
└── HOOKS.md
| Operation | Approximate Cost |
|---|---|
| Skills (not loaded) | 0 tokens |
/do router (Tier 3) | ~500 tokens |
| Hook per edit | ~100 tokens |
| The actual work | Varies by task |
/do not found after install:
/reload-plugins
Hooks not firing:
node ~/citadel/hooks_src/smoke-test.js
Campaign state corrupted:
/do setup # Re-initializes .planning/ and .citadel/ without destroying code
Fleet agents conflicting:
Fleet uses isolated git worktree per agent — conflicts mean you have uncommitted changes in the main worktree. Commit or stash first:
git stash
/fleet "..."
Archon stopped mid-campaign:
/do continue # Reads .planning/CAMPAIGN.md and resumes from last completed phase
Circuit breaker triggered (3 failures): This is intentional. Tell Citadel the correct approach explicitly:
/do [describe what you actually want, with more specifics]