Main orchestration loop for autonomous coding. Use when running autonomous sessions, orchestrating feature completion, managing continuous loops, or coordinating agent lifecycle.
/plugin marketplace add adaptationio/Skrillz/plugin install skrillz@skrillzThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/autonomous_loop.pyscripts/continuation_handler.pyscripts/feature_orchestrator.pyscripts/loop_config.pyMain orchestration loop that runs continuously until all features are complete.
from scripts.autonomous_loop import AutonomousLoop
loop = AutonomousLoop(project_dir)
result = await loop.run()
print(f"Completed: {result.features_completed}")
print(f"Sessions: {result.sessions_used}")
from scripts.loop_config import LoopConfig
config = LoopConfig(
max_sessions=10,
token_budget=500000,
auto_checkpoint=True
)
result = await loop.run(config)
┌─────────────────────────────────────────────────────────────┐
│ AUTONOMOUS LOOP │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ INITIALIZE │ │
│ │ ├─ Detect session type (INIT vs CONTINUE) │ │
│ │ ├─ Load or create feature list │ │
│ │ └─ Initialize state tracker │ │
│ └────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ FEATURE LOOP │ │
│ │ while (incomplete_features > 0): │ │
│ │ ├─ Select next feature │ │
│ │ ├─ Create checkpoint │ │
│ │ ├─ Implement with TDD │ │
│ │ ├─ Run E2E tests │ │
│ │ ├─ If pass: mark complete │ │
│ │ ├─ If fail: recover or rollback │ │
│ │ └─ Check context limits │ │
│ └────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ CONTEXT CHECK │ │
│ │ if (approaching_limit): │ │
│ │ ├─ Compact context │ │
│ │ ├─ Prepare handoff │ │
│ │ └─ Request continuation │ │
│ └────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ COMPLETION │ │
│ │ ├─ Generate final report │ │
│ │ ├─ Store session memory │ │
│ │ └─ Signal completion │ │
│ └────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
@dataclass
class LoopResult:
success: bool
features_completed: int
features_total: int
sessions_used: int
total_tokens: int
errors_recovered: int
duration_minutes: float
handoff_reason: Optional[str]
| Mode | Description | Trigger |
|---|---|---|
| Auto | Loop continues automatically | Context limit |
| Manual | User confirms continuation | Session end |
| Scheduled | Runs at scheduled times | Cron trigger |
| Event | Triggered by events | Git push, CI |
references/LOOP-LIFECYCLE.md - Loop detailsreferences/CONTINUATION-PROTOCOL.md - Continuationscripts/autonomous_loop.py - Main loopscripts/loop_config.py - Configurationscripts/feature_orchestrator.py - Feature flowscripts/continuation_handler.py - ContinuationsActivates when the user asks about Agent Skills, wants to find reusable AI capabilities, needs to install skills, or mentions skills for Claude. Use for discovering, retrieving, and installing skills.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.