agentleFS
qyndexqyndex/claude-init/.claude/skills/autopilot/SKILL.md

autopilot

Skill2 starsChanged 5 months agoMITView on GitHub

Five-phase autonomous execution. Spec expansion → planning → execution → QA loops (max 5) → multi-perspective validation → cleanup. Aborts if same error repeats 3 times. Used by Cloud Routine overnight runs and any /loop autonomy.

76 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-bugbot, rename-chat and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • 0mlkrizzz655335vSkill

    review-bugbot

    缺陷导向代码审查。用 Bugbot 子代理找 bug。

    Also in 3 projects that use this

  • 0mlkrizzz655335vSkill

    rename-chat

    重命名当前聊天。按聊天内容改标题。"disable-model-invocation: true

    Also in 3 projects that use this

  • Tsumugii24Skill

    split-to-prs

    Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.

    Also in 4 projects that use this

  • PandelisZSkill

    update-cli-config

    View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.

    Also in 3 projects that use this

  • 32103210Skill

    migrate-to-skills

    Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.

    Also in 3 projects that use this

  • 32103210Skill

    update-cursor-settings

    Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.

    Also in 3 projects that use this

  • +1 more from 32103210
  • +1 more from 0mlkrizzz655335v

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 8 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 68 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read tasks/TASKS.md. Pick the next unblocked task.

    line 15
  2. Very specific:

    Read the parent spec + plan.

    line 17
  3. Very specific:

    If spec has open [OQ] → STOP.

    line 18
  4. Distinctive:

    Run the test and paste the passing output: No skipping this step.

    line 34
  5. Distinctive:

    Refactor: if needed, keeping tests green.

    line 36
  6. Distinctive:

    If your first run of a new test passes, the test is wrong — either it was already implemented or the assertion is trivial.

    line 38
  7. Distinctive:

    If any step's verification fails → enter self-heal flow.

    line 39
  8. Very specific:

    Run the task's accept: command.

    line 43
  9. Distinctive:

    If exit 0 → proceed to Phase 4.

    line 44
  10. Very specific:

    If same error message appears 3 times in a row → ABORT this task.

    line 47
  11. Very specific:

    NOT retry the same approach.

    line 67
  12. Very specific:

    Run broader test suite (bash .claude/scripts/verify.sh).

    line 80
  13. Very specific:

    Run security scan if diff touches auth/data/network/deps.

    line 82
  14. Distinctive:

    All four must pass to proceed.

    line 84
  15. Very specific:

    Write the final Conventional Commits message with git trailers (per CLAUDE.md §VI).

    line 89
  16. Very specific:

    Write a NEXUS-format handoff to .swarms/streams/<run-id>/handoff-T-<task-id>-<ts>.yaml (in a swarm) OR to the OVERNIGHT_REPORT.md "shipped" …

    line 91
  17. Distinctive:

    No more unblocked tasks

    line 96
  18. Very specific:

    No phantom progress: Every Phase 2/3/5 commit must include passing test evidence.

    line 116
  19. Distinctive:

    One task at a time per session: Use parallel-swarm skill for cross-task parallelism.

    line 118

“Common” is measured: kept by at least 6 in 10 of the 68 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Autopilot

Disciplined autonomous execution. Inspired by OMC's skills/autopilot/SKILL.md. Five phases, hard guard rails, defined exit conditions.

Phase 0 — Spec expansion

  • Read tasks/TASKS.md. Pick the next unblocked task.
  • Brownfield legacy guard (Round 14): if .claude/state/adopt/uncharacterized-paths.txt exists and is non-empty, and the task's files: overlap any glob in it, SKIP the task — log ADOPT-BLOCKED: <file> not yet characterized to OVERNIGHT_REPORT.md and move on. Autonomy must not modify un-characterized legacy ("no tests = no writes"); the fix is a characterization test first (see the characterize skill / sprout-method), which the operator drives during /adopt. (verify.sh enforces this too — but skipping here avoids wasting a turn on work that can't pass the gate.)
  • Read the parent spec + plan. Confirm status: approved.
  • If spec has open [OQ] → STOP. Log to OVERNIGHT_REPORT.md and move to next task.
  • Otherwise: expand the task into a 3-5 step micro-plan.

Phase 1 — Planning

  • Confirm the task's accept: command is well-formed (parses, file paths exist).
  • Identify the minimal set of files to touch.
  • Decide: in-session or delegate to implementer subagent? (Use dispatch-criteria skill.)
  • TodoWrite the micro-plan steps.

Phase 2 — Execution (strict TDD per superpowers:test-driven-development)

  • For each step:
    1. Write the failing test first. Match the acceptance criterion from the task.
    2. Run the test and paste the failure output in your response. Confirm the failure message matches what you expected to see — if it doesn't, the test isn't testing the right thing.
    3. Implement the minimum code to make the test pass.
    4. Run the test and paste the passing output. No skipping this step.
    5. Run the broader suite. Confirm no regressions.
    6. Refactor if needed, keeping tests green.
  • WIP-checkpoint after each step (WIP: <decision in 6 words>).
  • If your first run of a new test passes, the test is wrong — either it was already implemented or the assertion is trivial. Investigate before proceeding.
  • If any step's verification fails → enter self-heal flow.

Phase 3 — QA loops (max 5 iterations)

  • Run the task's accept: command.
  • If exit 0 → proceed to Phase 4.
  • If exit non-zero:
    • Increment QA counter.
    • If same error message appears 3 times in a row → ABORT this task. Mark [!]. Move to next.
    • Otherwise: invoke self-heal skill (debugger → implementer fix).
    • Loop.
  • Hard cap: 5 QA iterations per task. After 5, ABORT regardless.

Phase 3.5 — PIVOT tier (deterministic, not LLM-judged)

The consecutive-abort count is not something you track by reading the transcript — it is owned by loop-iteration.sh + .claude/state/consecutive-aborts.json (the state machine from spec 001 AC-5). After each task you MUST report the outcome:

bash .claude/scripts/loop-iteration.sh record T-<id> abort      # task hit [!]
bash .claude/scripts/loop-iteration.sh record T-<id> progress   # task hit [x]

The loop then decides the tier deterministically:

  • 1st abort → re-attempt normally (self-heal).
  • 2nd consecutive abort of the SAME task → the loop emits PIVOT T-<id>. Do NOT retry the same approach. Delegate to the researcher agent using .claude/templates/pivot-prompt.md; adopt its rank-1 alternative, then re-attempt.
  • 3rd consecutive abort (count ≥ 3) → the loop exits 2 with consecutive-abort cap reached and halts. A human resets the state (or a [x] progress clears it) before the loop resumes.

This replaces any LLM-side strike-counting: the cap is enforced by the state file, so it survives compaction, restarts, and context loss.

Phase 4 — Multi-perspective validation

After QA passes:

  • Run broader test suite (bash .claude/scripts/verify.sh).
  • Run linter + typechecker.
  • Run security scan if diff touches auth/data/network/deps.
  • For UI changes: run webapp-testing skill, capture evidence.
  • All four must pass to proceed.

Phase 5 — Cleanup & commit

  • Squash WIP commits with bash .claude/scripts/squash-wip.sh.
  • Write the final Conventional Commits message with git trailers (per CLAUDE.md §VI).
  • Mark task done: bash .claude/scripts/task-status.sh T-<id> done (lock-safe; Write/Edit on TASKS.md is constitution-guarded).
  • Write a NEXUS-format handoff to .swarms/streams/<run-id>/handoff-T-<task-id>-<ts>.yaml (in a swarm) OR to the OVERNIGHT_REPORT.md "shipped" section (solo run; coordinator picks it up). Never write to .swarms/<run-id>/ directly — that path doesn't match the coordinator's schema.
  • Loop back to Phase 0 for the next unblocked task.

Stop conditions (any one stops the run)

  • No more unblocked tasks
  • Wall-clock budget exceeded (default: 4 hours from start)
  • Token budget exceeded
  • 3 consecutive task ABORTs (enforced by the Phase 3.5 state machine — loop-iteration.sh exits 2 at the cap)
  • Any security check fails on the diff
  • User sends /stop or interrupts

Output

At end of run:

  • OVERNIGHT_REPORT.md at repo root with NEXUS format
  • One PR per completed task on claude/auto-<date>-<task> branches
  • Updated tasks/TASKS.md
  • Memory consolidated via /dream (auto-runs at end if cron didn't already)

Hard rules

  • No skipped tests. Tier 2 self-heal first; never // @ts-ignore.
  • No silent error suppression. Catch only what you understand; let the rest surface.
  • No phantom progress. Every Phase 2/3/5 commit must include passing test evidence.
  • WIP every 5-15 minutes. Crash recovery depends on it.
  • One task at a time per session. Use parallel-swarm skill for cross-task parallelism.
  • Two safety layers, zero prompts. Auto Mode is on (Sonnet 4.6 classifier reviews every tool call). PreToolUse hooks fire FIRST and hard-block destructive ops via exit code 2 regardless of mode. If the classifier denies a call you need, do NOT retry — log it and escalate.

References

  • yeachan-heo/oh-my-claudecode/skills/autopilot (source for 5-phase pattern + 3x-error abort)
  • obra/superpowers (TDD + verification + self-heal patterns referenced inside)
  • ChristopherKahler/paul (loop discipline)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.