skills/loop/SKILL.md
Autonomously work through the backlog — dispatches /chain for chain heads, /tusk for standalone tasks, repeating until empty
npx skillsauth add gioe/tusk loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Runs the autonomous backlog loop via the tusk loop CLI command. Queries the highest-priority ready task, dispatches it to /chain (if it has dependents) or /tusk (standalone), and repeats until the backlog is empty or a stop condition is met.
Use
/create-taskfor task creation — handles decomposition, deduplication, criteria, and deps. Usetusk task-insertonly for bulk/automated inserts.
# Run until backlog is empty
tusk loop
# Stop after N tasks
tusk loop --max-tasks N
# Preview what would run without executing
tusk loop --dry-run
# Unattended run — skip stuck chain tasks and continue
tusk loop --on-failure skip
# Unattended run — abort the chain on first stuck task
tusk loop --on-failure abort
tusk task-select)tusk chain scope)claude -p /chain <id> [--on-failure <strategy>]claude -p /tusk <id>--max-tasks is reachedNote: Tasks dispatched via
/tuskor/chainusetusk task-start --forceso that zero-criteria tasks emit a warning rather than hard-failing the automated workflow.
| Flag | Description |
|------|-------------|
| --max-tasks N | Stop after N tasks (default: unlimited) |
| --dry-run | Print what would run without executing |
| --on-failure skip\|abort | Unattended failure strategy passed through to each /chain dispatch. skip — log a warning for each stuck task and continue to the next wave. abort — stop the chain immediately and report all incomplete tasks. Has no effect on standalone /tusk dispatches. Omit for interactive mode (default). |
/loop can be run unattended via claude -p (non-interactive print mode):
# Run up to 5 tasks; abort if any chain task gets stuck
claude -p /loop --max-tasks 5 --on-failure abort
# Run until empty; skip stuck chain tasks and continue
claude -p /loop --on-failure skip
Prerequisites for unattended runs:
--on-failure is required for unattended operation. Without it, a stuck chain sub-agent exits its session in headless mode, causing the loop to stop at that task with a non-zero exit code — leaving the remaining backlog unprocessed.--max-tasks N is recommended in CI to cap unbounded execution and avoid runaway costs.When to use each strategy:
--on-failure abort — prefer this in CI pipelines where a stuck task signals a problem that needs human attention. The loop stops and reports incomplete tasks; whether the CI job fails depends on how the Claude CLI exits.--on-failure skip — prefer this for overnight batch runs where partial progress is acceptable and you want to drain as much of the backlog as possible.tools
Investigate the scope of a problem and form an honest assessment — task creation is optional
data-ai
Groom the backlog by closing completed tickets, removing redundant/stale tickets, reprioritizing, and assigning agents
tools
File a GitHub issue against the tusk repo itself — tusk bugs, CLI limitations, skill improvements, or missing features. Use anytime the user identifies a gap in tusk (not in their own project's code).
tools
Contribute a client-discovered fix or improvement back to the configured iOS library repo from an ios_app tusk project.