Use when you want to iteratively build a feature using a PRD as source of truth, with progress tracking and fresh-context iterations - the Autopilot technique for autonomous development.
71%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/autopilot/SKILL.mdExecute complex features autonomously using the Autopilot technique: PRD as source of truth, progress file for state persistence, and fresh-context iterations to avoid context rot.
Target: $ARGUMENTS
@builder).md): Read it as the PRD/prd to generate docs/PRD-[name].md.claude/autopilot/progress.md with a PRD reference: Resume from where it left off# Check for existing progress
cat .claude/autopilot/progress.md 2>/dev/nullBLOCKED until a PRD file exists and is readable.
.claude/autopilot/progress.md:# Autopilot Progress
## Config
- PRD: [path/to/PRD.md]
- Max iterations: [N, default 10]
- Current iteration: 0
- Status: IN_PROGRESS
- Started: [timestamp]
## Tasks
| # | Task | Status | Iteration | Notes |
|---|------|--------|-----------|-------|
| 1 | [task from PRD] | PENDING | - | - |
| 2 | [task from PRD] | PENDING | - | - |
| 3 | [task from PRD] | PENDING | - | - |
## Iteration Loggit add -A 2>/dev/null
git tag restore-point/ralf-$(date +%Y%m%d-%H%M%S) 2>/dev/nullFor each iteration until completion:
1. READ the PRD (source of truth - may have been updated)
2. READ .claude/autopilot/progress.md
3. IDENTIFY next task with Status = PENDING
4. If no PENDING tasks remain → go to Step 4 (Completion)Critical: Delegate each task to a subagent using the Agent tool. This gives the task a fresh context window, preventing context rot.
Agent(
description: "RALF iteration N - task description",
prompt: "
You are executing a Autopilot task.
## PRD (Source of Truth)
[inline PRD content]
## Current Progress
[inline progress.md content]
## Your Task
Task #N: [task description]
## Instructions
1. Implement this task completely
2. Follow existing codebase patterns
3. Run tests if available
4. Create a git commit: git add -A && git commit -m 'autopilot: task-N - [description]'
5. Report what you did and what files changed
"
)After the subagent returns:
1. CHECK git log for the commit
2. RUN tests (if test command exists in package.json)
3. RUN type check (tsc --noEmit, if TypeScript project)
4. If PASS → mark task DONE in progress.md
5. If FAIL → retry (max 2 retries per task)
6. If still FAIL after retries → mark task BLOCKED, add error notes## Update in progress.md:
- Increment "Current iteration" counter
- Update task status (DONE / BLOCKED)
- Add iteration log entry:
### Iteration [N]
- Task: #[X] [description]
- Result: DONE | BLOCKED
- Files changed: [list]
- Notes: [what happened]git tag checkpoint/ralf-task-[N] 2>/dev/null- All tasks DONE or BLOCKED? → Exit loop
- Current iteration >= max iterations? → Exit loop
- Otherwise → Continue to next iteration (3a)COMPLETE or MAX_ITERATIONS_REACHED/verify for validation, /finish for branch finalization)The progress file at .claude/autopilot/progress.md is the state persistence layer between iterations. It MUST follow this exact format for reliable parsing:
# Autopilot Progress
## Config
- PRD: docs/PRD-feature-name.md
- Max iterations: 10
- Current iteration: 3
- Status: IN_PROGRESS | COMPLETE | MAX_ITERATIONS_REACHED
- Started: 2026-03-16T14:30:00
## Tasks
| # | Task | Status | Iteration | Notes |
|---|------|--------|-----------|-------|
| 1 | Create data models | DONE | 1 | Created User, Task models |
| 2 | Implement API endpoints | DONE | 2 | REST endpoints for CRUD |
| 3 | Build frontend components | IN_PROGRESS | 3 | Started TaskList component |
| 4 | Add authentication | PENDING | - | - |
| 5 | Write integration tests | PENDING | - | - |
## Iteration Log
### Iteration 1
- Task: #1 Create data models
- Result: DONE
- Files: src/models/user.ts, src/models/task.ts
- Notes: Followed existing Prisma schema patterns
### Iteration 2
- Task: #2 Implement API endpoints
- Result: DONE
- Files: src/api/users.ts, src/api/tasks.ts
- Notes: RESTful CRUD with validation
### Iteration 3
- Task: #3 Build frontend components
- Result: IN_PROGRESS
- Files: src/components/TaskList.tsx
- Notes: Component created, needs stylingRuns inside Claude Code using Agent tool for fresh-context subagents. Easier to use but doesn't fully reset the outer context window.
/autopilot docs/PRD-my-feature.md --max-iterations=10For the true Autopilot experience with full context reset between iterations, use the bash script:
./scripts/autopilot.sh docs/PRD-my-feature.md --max-iterations=10 --model=claude-opus-4-6The script kills and restarts Claude Code between iterations, giving each iteration a completely fresh context window. Best for:
--dangerously-skip-permissionsSee templates/autopilot/README.md for DevContainer setup.
| Component | How Autopilot Uses It |
|---|---|
/prd | Generates the PRD if user provides a description instead of a file |
/checkpoint | Creates restore points and per-task checkpoints |
@executor | Pattern reference for self-healing (max 2 retries) |
@builder | Subagent for implementation tasks |
after-task hook | Fires after each iteration completes |
| TodoWrite | Live progress tracking during plugin mode |
| Excuse | Reality |
|---|---|
| "I'll just do it in one long session" | Context rot is real. After ~50K tokens, quality degrades measurably. Fresh iterations produce better code. |
| "The PRD is too detailed, I'll wing it" | Vague PRDs produce vague code. The PRD is the contract. If it's wrong, fix the PRD first. |
| "I don't need progress tracking" | You are a goldfish with a notepad. Without progress.md, you'll redo completed work or skip critical tasks. |
| "One more retry will fix it" | After 2 retries, the approach is wrong, not the execution. Mark BLOCKED and move on. A human needs to look at it. |
| "I can combine multiple tasks per iteration" | One task per iteration. Combining tasks creates entangled commits and makes rollback impossible. |
| "Script mode is overkill" | For 3 tasks, maybe. For 10+ tasks or overnight runs, script mode's clean context pays for itself in fewer total iterations. |
/autopilot again reads progress.md and continues from where it stopped.──── /autopilot ────
PRD: docs/PRD-[name].md
Mode: Plugin | Script
Max Iterations: N
[1/N] Task 1: [description]... DONE (iteration 1)
[2/N] Task 2: [description]... DONE (iteration 2)
[3/N] Task 3: [description]... BLOCKED (iteration 3-5, retried 2x)
[4/N] Task 4: [description]... DONE (iteration 6)
[5/N] Task 5: [description]... PENDING
Status: IN_PROGRESS | COMPLETE | MAX_ITERATIONS_REACHED
Iterations used: X/N
Tasks: Y DONE, Z BLOCKED, W PENDING
Progress: .claude/autopilot/progress.md
──── Next: /verify or /finish ────fernandezbaptiste/specialist-agent
cd716d9
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.