Skip to main content
AI/MLruvnet

autopilot-loop

Run an autonomous /loop iteration -- check progress, work on next task, schedule next wake

Stars
56,726
Source
ruvnet/claude-flow
Updated
2026-05-31
Slug
ruvnet--claude-flow--autopilot-loop
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/ruvnet/claude-flow/HEAD/plugins/ruflo-autopilot/skills/autopilot-loop/SKILL.md -o .claude/skills/autopilot-loop.md

Drops the SKILL.md into .claude/skills/autopilot-loop.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Run one autopilot iteration using Claude Code's native /loop:

  1. Check status: mcp__claude-flow__autopilot_status
  2. If all tasks complete or max iterations reached, call mcp__claude-flow__autopilot_disable and stop
  3. Get prediction: mcp__claude-flow__autopilot_predict for the optimal next action
  4. Execute the predicted task (spawn agent, edit code, run tests, etc.)
  5. Log via mcp__claude-flow__autopilot_log
  6. Schedule next: ScheduleWakeup({ delaySeconds: 270, reason: "next autopilot iteration" })

Cache-Aware Scheduling

Always use delay 270s (under 300s cache TTL) to keep the prompt cache warm between iterations.

Task Sources

Autopilot discovers tasks from:

  • team-tasks: Claude Code TaskList entries
  • swarm-tasks: MCP task_list entries
  • file-checklist: Markdown checkbox items in tracked files

Configure: mcp__claude-flow__autopilot_config({ taskSources: ["team-tasks", "swarm-tasks"] })