run-epic
Execute an epic plan phase-by-phase, inline by default with opt-in worker spawns per task annotation
Best use case
run-epic is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Execute an epic plan phase-by-phase, inline by default with opt-in worker spawns per task annotation
Teams using run-epic should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/run-epic/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How run-epic Compares
| Feature / Agent | run-epic | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Execute an epic plan phase-by-phase, inline by default with opt-in worker spawns per task annotation
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Devloop Run Epic
Execute an epic phase-by-phase. Tasks run inline by default; subagents are spawned per task `[model:X]` annotation (same pattern as `/devloop:run`). **You are the orchestrator -- execute the phase, validate tests, commit, promote the next phase.**
## Step 1: Load State
Read `.devloop/epic.json`.
- **No file**: "No epic found. Use `/devloop:epic <topic>` to create one." STOP.
- **`--status`**: Display phase tracker and STOP.
- **`status: "complete"`**: "Epic already complete." STOP.
- **`--phase N`**: Override current phase and re-promote.
## Step 2: Validate Plan
Read `.devloop/plan.md`. Verify `**Phase**:` matches `epic.json.current_phase`.
- Mismatch or missing: run `${CLAUDE_PLUGIN_ROOT}/scripts/promote-phase.sh --force`.
- All tasks `[x]`: skip to Step 5 (already completed).
## Step 3: Execute Phase
Read `epic.json` for context (user_stories, invariants, negative_cases, test_command). Keep this context in working memory while executing the phase.
**Execute plan.md tasks inline**, following the same model-annotation pattern as `/devloop:run`:
- **`[model:haiku]` tasks**: spawn `devloop:haiku-worker`.
- **`[model:sonnet]` tasks**: spawn `devloop:swarm-worker` (sonnet).
- **No annotation**: execute inline (no subagent). This is the default — most tasks should be inline.
- Respect `[depends:N.M]` constraints and `[parallel:X]` groupings.
- Do NOT commit or modify epic.json/epic.md during execution (that's Step 5).
Use the epic context to guide your work:
- User stories anchor WHY the tasks exist.
- Invariants / negative cases are testable constraints that must hold.
- Run `test_command` after implementation tasks.
**Fallback (opt-in only)**: If the phase is very large (>15 tasks) *and* session context is already heavy, you MAY delegate the whole phase to a single sonnet subagent in a fresh context. This is a last-resort fresh-context reset, not the default path.
## Step 4: Validate Completion
1. Run `${CLAUDE_PLUGIN_ROOT}/scripts/check-plan-complete.sh .devloop/plan.md`.
- Incomplete: **AskUserQuestion**: "Retry" or "Skip remaining".
2. Run tests (unless `--skip-tests` or `test_command` is null).
Use Monitor for real-time streaming when `test_command` matches a known long-running pattern
(test suites: `npm test`, `pytest`, `go test`, `cargo test`, etc.; builds; full-codebase linting).
Example:
```
Monitor({ description: "epic phase tests", command: "<test_command> 2>&1 | grep --line-buffered -E 'PASS|FAIL|Error|ok|error|passed|failed'", timeout_ms: 300000, persistent: false })
```
Fallback: if Monitor errors, run `test_command` with Bash directly.
- Fail: **AskUserQuestion**: "Fix and retry" or "Skip tests".
## Step 5: Commit & Advance
1. Commit: `git add` changed files, commit with `feat: phase N -- phase-name`.
2. Update `epic.json`: mark phase `"complete"`, record commit hash, increment `current_phase`.
3. Update `epic.md` Phase Tracker table.
4. If all phases complete: Report done. **AskUserQuestion**: "Ship it" or "Review". STOP.
5. Promote next phase: run `${CLAUDE_PLUGIN_ROOT}/scripts/promote-phase.sh --force`.
Report:
```
Phase N complete and committed.
Phase M loaded: "Phase Name" (X tasks)
```
## Step 6: Pause Point
The next phase is already loaded in plan.md. **AskUserQuestion**:
- **Continue now**: Loop to Step 3 in the same session.
- **Clear and run**: "Run `/clear`, then `/devloop:run-epic` to execute Phase M." STOP.
## Recovery
`run-epic` is resumable. `epic.json` is the source of truth:
- Mid-phase: plan.md has partial progress, execution picks up remaining tasks.
- Post-phase: detects plan complete, skips to validation.
- After `/clear`: reads epic.json, resumes from correct phase.
If the repo is in a broken state (e.g. orphaned changes, mismatched plan), run-epic will detect the mismatch in Step 2 and re-promote the correct phase. Tests in Step 4 catch implementation issues before committing.
---
**Now**: Load epic state and begin.Related Skills
epic
Create a multi-phase epic plan with TDD structure for large features
Example Skill
Brief description of what this skill does and the domain expertise it provides.
vulnerability-patterns
Index of vulnerability detection pattern skills. Routes to core patterns (universal) and language-specific patterns for security scanning.
vuln-patterns-languages
Language-specific vulnerability detection patterns for JavaScript/TypeScript, Python, Go, Java, Ruby, and PHP. Provides regex patterns and grep commands for common security vulnerabilities.
vuln-patterns-core
Universal vulnerability detection patterns applicable across all programming languages. Includes hardcoded secrets, SQL/command injection, path traversal, and configuration file patterns.
scan
Run a security assessment using deterministic static analysis tools with LLM-powered triage
results
View the most recent security scan results without re-running the scan
remediation-library
Index of security remediation skills. Routes to specialized skills for injection, cryptography, authentication, and configuration vulnerabilities.
remediation-injection
Security fix patterns for injection vulnerabilities (SQL, Command, XSS). Provides language-specific code examples showing vulnerable and secure implementations.
remediation-crypto
Security fix patterns for cryptographic vulnerabilities (weak algorithms, insecure randomness, TLS issues). Provides language-specific secure implementations.
remediation-config
Security fix patterns for configuration and deployment vulnerabilities (path traversal, debug mode, security headers). Provides language-specific secure implementations.
remediation-auth
Security fix patterns for authentication and authorization vulnerabilities (credentials, JWT, deserialization, access control). Provides language-specific secure implementations.