Skip to main content
skill CX Codex

marshal — Claude Code skill: autonomous task orchestration

The marshal skill for Claude Code parses a task, gathers context from code and project memory, and chains skills. It runs in one session and asks only if it cannot continue.

MIT ★ 937 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local
Open on GitHub

What marshal does

Marshal breaks tasks into structured steps: parse intent → plan chain → execute → report. It reads the project's architecture documents (AGENTS.md, CLAUDE.md) first, identifies which files to touch and what mode to work in. Then invokes skills in sequence, gathers context in parallel, and verifies each result.

Two modes: /marshal [direction] runs the full loop from analysis to report; /marshal assess [area] performs investigation only, no changes. Built-in timeouts on sub-agents (10 minutes for skills, 15 for research) prevent hanging. If the direction is ambiguous, it asks one clarifying question but won't request detailed step-by-step guidance.

Git history, code patterns, and documentation are gathered automatically. If something blocks on the first attempt, it tries once more with a different approach. Output is a structured report with line references and a HANDOFF block showing what changed and how to undo it.

What it helps with

  • navigate multi-step tasks without manual verification at each step
  • auto-gather context from docs and project memory before acting
  • select and chain the right skill at each stage
  • get a structured report with file references and reasoning
  • revert changes if something goes wrong

Example prompts for the agent

  • Orchestrate a security audit: scan logs, find anomalies, recommend fixes
  • Improve code in src/auth—analyze current state, identify issues, fix them
  • Research the architecture and suggest how to refactor backend modules

How to install marshal

1Plugin marketplace

/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local

This installs the whole citadel plugin with all its skills

2Skills CLI (Vercel)

npx skills add SethGammon/Citadel --skill marshal -a claude-code

3Manually: put the files in place

~/.claude/skills/marshal/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/marshal/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about marshal

How do I install marshal in Claude Code?

Run /plugin marketplace add SethGammon/Citadel, then /plugin install citadel@citadel-local and npx skills add SethGammon/Citadel --skill marshal -a claude-code. The skill loads into ~/.claude/skills/marshal/SKILL.md.

What does marshal do?

It takes a task description (broad or narrow) and autonomously chains skills, gathers project context, performs actions, and reports findings with code references. It doesn't ask unnecessary questions.

When should I use marshal instead of other skills?

Use marshal for bounded multi-step work that completes in one session: audits, fixes that require investigation, code improvements. Don't use it for work spanning multiple sessions (use /archon) or tasks that parallelize into 3+ streams (use /fleet).

Source text

SKILL.md · MIT
---
name: marshal
license: MIT
description: >-
  Meta-orchestrator that takes any direction — broad, specific, or vague — and
  autonomously chains skills and context into actionable work. Gathers context
  from codebase, docs, and memory. Only asks the user when it genuinely cannot
  proceed. Single-session orchestrator.
user-invocable: true
auto-trigger: false
trigger_keywords:
  - orchestrate
  - chain skills
  - multi-step
last-updated: 2026-03-20
---

# /marshal — Session Commander

## Orientation

Use Marshal when the task is:
- Multi-step but bounded (completable in one session)
- Needs investigation before action
- Spans multiple skills but doesn't need campaign persistence
- Too complex for a single skill but doesn't need Archon/Fleet

**Don't use when:** the task spans multiple sessions (use /archon); work decomposes into 3+ parallel streams (use /fleet); you only need research with no action (use /research).
- Parallel execution (use Fleet)

## Commands

| Command | Behavior |
|---|---|
| `/marshal [direction]` | Full loop: understand → plan → execute → report |
| `/marshal assess [area]` | Read-only: understand the area, produce findings, don't fix |

## Protocol

### Phase 1: UNDERSTAND

Parse the user's direction into structured intent:

1. Read AGENTS.md, then CLAUDE.md if present, to understand the project's architecture and conventions
2. Identify: scope (which files/directories), perspective (user, developer, admin),
   mode (audit, fix, build, improve, map), depth (surface scan vs deep investigation)
3. If the direction is ambiguous, make a reasonable interpretation and state it.
   Do NOT ask clarifying questions unless genuinely stuck.

### Phase 2: PLAN CHAIN

Map the intent to a sequence of actions:

| Direction Pattern | Chain |
|---|---|
| "audit [area]" | explore → analyze → report findings |
| "fix [thing]" | investigate root cause → fix → verify → report |
| "map [area]" | read files in parallel → synthesize → produce analysis |
| "improve [area]" | audit current state → identify gaps → implement → verify |
| "what should [X] be" | research → analyze options → recommend with reasoning |
| "research [topic]" | search codebase + web → synthesize → report |

Announce the chain before executing: "I'll [step 1], then [step 2], then [step 3]."

### Phase 3: EXECUTE

For each step in the chain:

1. Load the relevant skill if one exists (e.g., `/review` for audit steps)
2. Gather context: read relevant files, check git history, search for patterns
3. Perform the action
4. Check the result against the plan — did it produce what was expected?
5. If a step fails, try one alternative approach before escalating

### Phase 4: REPORT

Produce a structured report:

```
=== Marshal Report ===

Direction: {original direction}
Scope: {what was examined}

Findings:
- {finding 1 with file:line reference}
- {finding 2}

Actions Taken:
- {what was changed, if anything}

Recommendations:
- {next steps if applicable}
```

### Phase 5: LEARN

If the investigation revealed reusable patterns or pitfalls:
- Note them in the report
- Suggest creating a skill if a pattern will recur: "This pattern would
  make a good skill. Run `/create-skill` to capture it."

## Agent Timeouts

When Marshal spawns sub-agents (e.g., for parallel investigation or delegated
skill execution), it must enforce execution time limits. Sub-agents can hang
indefinitely on tool calls — the circuit breaker catches failures, not hangs.

### Default Timeouts

| Agent Type | Default Timeout |
|---|---|
| Skill-level agents | 10 minutes |
| Research agents | 15 minutes |

Timeouts are configurable in `harness.json` under `agentTimeouts` (same config
Fleet uses). If an agent exceeds its timeout:

1. Log the timeout in telemetry
2. Check for partial output — extract usable findings if any
3. Try one alternative approach (simpler prompt, reduced scope)
4. If retry also times out, skip and note the gap in the report

Never wait indefinitely. A timed-out agent's scope becomes a "gap" in the
Marshal Report's Findings section.

## Fringe Cases

- **Direction is vague** (e.g., "do the thing", "fix it", "make it better"): Ask one clarifying question before proceeding. Do not attempt to guess scope on truly ambiguous input — one focused question is cheaper than executing the wrong plan.
- **A sub-task fails on first attempt**: Retry once with a different approach (narrower scope, different tool, simpler method). If the second attempt also fails, record the blocker in the report and move on.
- **No relevant files found for the stated scope**: Report the empty result honestly. Do not fabricate findings. Suggest the user verify the scope or file paths.
- **CLAUDE.md missing**: Proceed without it. Note the absence in the report so the user knows project conventions weren't applied.
- **Typecheck not configured**: Skip the verification step and note it as "unverified" in the report rather than blocking completion.

## Quality Gates

- Every finding must cite a specific file and line number
- Every action must be verified (typecheck passes, tests pass)
- If a fix was applied, confirm the original issue is resolved
- The report must be concise — no filler, no repetition
- If you're stuck on a step for more than 3 attempts, skip it and report the blocker

## Exit Protocol

1. Output the Marshal Report (format above)
2. If work items were discovered but not addressed, suggest creating intake items
3. Output a HANDOFF block summarizing what was done

```
---HANDOFF---
- What: {behavior changed or goal achieved — not the file name, the outcome}
- Decisions: {key tradeoffs made — include the alternative that was rejected}
- Unresolved: {what is still open or blocked — actionable next step}
- Reversibility: {green | amber | red} — {how to undo}
---
```

© SethGammon · MIT · SethGammon/Citadel

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set55

The whole set →
systematic-debugging systematic-debugging stops trial-and-error edits by enforcing a four-phase root cause protocol and freezing code changes until hypotheses are tested. CX Codex +1 ★ 937repo stars decision-map Turn an unresolved idea into a Git-tracked decision map, then pick up the investigation in later sessions. Useful before work is ready to build. CX Codex +1 ★ 937repo stars archon archon — a subagent that carries a big task through phases: splits a direction into steps, hands them to other agents and keeps campaign state between runs. CX Codex ★ 937repo stars loop loop — a skill for Claude Code and Codex that runs an action repeatedly and checks the result each time, stopping when verification passes or attempts run out. Useful for fixing lint errors or test failures in an active session. CX Codex +1 ★ 937repo stars test-gen test-gen is a Claude Code skill that generates and runs unit tests matching a project's existing framework, covering happy paths, edge cases, and failures. CX Codex +1 ★ 937repo stars design This skill builds a design manifest from a project’s styles or your preferences. A post-edit hook flags mismatches in edited files. CX Codex +1 ★ 937repo stars live-preview live-preview takes screenshots of components during construction, not after completion. Catches layout regressions and invisible blocks before they propagate. CX Codex +1 ★ 937repo stars architect architect turns a PRD or task outline into an implementation plan with file trees, data models, and phased build steps. CX Codex +1 ★ 937repo stars

Project sponsors

Companies that keep this analytics open