Loading...
Loading...
Execute the same task repeatedly with clean context via handoff. Triggers on: recursive loop, repeat until, keep doing until, loop until done. REQUIRES a finish condition to stop.
npx skill4agent add sebastiaanwouters/dotagents recursive-handoffsrc/legacy/┌─────────────────────────────────────────┐
│ Thread 1: Check condition → not met │
│ Do work → handoff │
└─────────────────┬───────────────────────┘
│
┌─────────────────▼───────────────────────┐
│ Thread 2: Check condition → not met │
│ Do work → handoff │
└─────────────────┬───────────────────────┘
│
┌─────────────────▼───────────────────────┐
│ Thread 3: Check condition → MET │
│ STOP (no handoff) │
└─────────────────────────────────────────┘RECURSIVE TASK - Iteration [N] of [LIMIT]
## Finish Condition
[CONDITION]
## How to Check
[COMMAND OR METHOD TO VERIFY CONDITION]
## If Limit Reached or Condition Met
Stop. Report: "✅ Complete: [summary]" or "⚠️ Limit reached after [N] iterations"
Do NOT handoff.
## If Condition NOT Met
### Task
[WHAT TO DO THIS ITERATION]
### After Completing Work
Handoff with follow: true, incrementing iteration count:
[PASTE THIS PROMPT WITH N+1]RECURSIVE TASK - Iteration 1 of 20
## Finish Condition
Queue is empty
## How to Check
[command to check queue length]
If result is 0, condition is met.
## If Limit Reached or Condition Met
Stop. Report completion status.
Do NOT handoff.
## If Condition NOT Met
### Task
1. Get next item from queue
2. Process it
3. Remove from queue
### After Completing Work
Handoff with follow: true, goal:
[THIS PROMPT WITH ITERATION 2 of 20]follow: truehandoff
goal: [THE FULL HANDOFF PROMPT]
follow: true