run-tasks
БесплатноБез исполняемых скриптовНе проверенOrchestrate task execution via beads and sub-agents. Gets ready work from beads, spawns appropriate agents based on labels, monitors completion, and updates…
Об этом скилле
Run Tasks Skill
Purpose
Execute implementation tasks through coordinated sub-agents with optional TDD workflow:
- Get ready work from beads (no blockers)
- Check TDD configuration and enforce test-first gating if enabled
- Group tasks for parallel execution (with git worktree isolation)
- Spawn agents based on
agent:*labels - Monitor completion and run verification
- Handle failures with debug loop (TDD mode) or blocking
- Update beads status and merge completed work
- Repeat until truly done (stop hook prevents premature exit)
- Present "What's next?" prompt to guide user to next workflow step
Key guarantee: The stop hook ensures ALL tasks complete before exit. Claude queries beads state each cycle rather than tracking in context, enabling token-efficient persistence.
Telemetry Capture
Required after each agent completes:
- Parse agent output JSON (last line):
{"s":"s","t":1200,"m":[...],"c":[...]} - Insert into agent_telemetry table immediately
- Continue even if telemetry insert fails (log warning, don't block)
This enables retrospective analysis via /retro. Telemetry MUST be captured after EACH agent completes, not just at the end of the batch.
When to Use
- After
/approve-spechas created tasks - User says "run tasks", "start implementation", "execute"
- There are open tasks in beads
Arguments
/run-tasks [epic-id] # Run tasks for specific epic
/run-tasks # Run all ready tasks
Process Overview
Step 0a: Path Detection
Determine the location of discovery.db to support both new .parade/ structure and legacy project root:
# Path detection for .parade/ structure
if [ -f ".parade/discovery.db" ]; then
DISCOVERY_DB=".parade/discovery.db"
else
DISCOVERY_DB="./discovery.db"
fi
All subsequent database operations in this skill use $DISCOVERY_DB instead of hardcoded discovery.db.
Step 0b: Check TDD Configuration
Before starting task execution, check if TDD is enabled:
cat project.yaml | grep -A 1 "workflow:"
If tdd_enabled: true, enforce test-first gating workflow (see TDD Protocol).
If tdd_enabled: false, use standard workflow without gating.
Step 0a: Git Setup (Epic Branch)
Create an epic integration branch to isolate all work for this epic:
# Ensure main is up to date
git checkout main
git pull origin main
# Create epic branch
git checkout -b epic/<epic-id>
git push -u origin epic/<epic-id>
All task branches will be created from this epic branch, enabling:
- Clean parallel execution without affecting main
- Atomic epic-level rollback if needed
- Single merge commit when epic completes
See Git Strategy for complete branching and commit workflow.
Step 1: Get Ready Work
bd ready --json
This returns tasks that:
- Have status
open - Have no blocking dependencies (or all blockers are closed)
If epic-id is provided, filter:
bd list --parent <epic-id> --status open --json
Step 1a: Apply TDD Gating (if tdd_enabled)
For each ready task, check metadata and labels:
bd show <task-id> --json
TDD Gating Rules:
- If task has
skip_testslabel → ALLOW immediately (no TDD gating) - If task has
test_task_idmetadata and test task is NOT closed → EXCLUDE from ready batch - Test tasks (those without test_task_id) can run immediately
- Implementation tasks wait for their test tasks to close (RED phase verified)
See TDD Protocol for complete gating details.
Step 2: Identify Parallel Batches
Tasks can run in parallel if they don't depend on each other.
CRITICAL: Apply batch size limit to prevent context overflow.
# Check project config for max parallel tasks (default: 3)
MAX_PARALLEL=$(grep -A1 "workflow:" project.yaml | grep "max_parallel_tasks:" | awk '{print $2}')
MAX_PARALLEL=${MAX_PARALLEL:-3}
From the ready work, group tasks with size limit:
- Sub-batch 1: First MAX_PARALLEL ready tasks
- Sub-batch 2: Next MAX_PARALLEL ready tasks
- Continue until all ready tasks are batched
Why this matters: Each agent returns ~2-3K tokens. Running 8+ agents in parallel returns 16-24K tokens simultaneously, overwhelming context and preventing compaction.
Example with MAX_PARALLEL=3:
Ready now (8 tasks):
- bd-x7y8.1 [agent:sql]
- bd-x7y8.2 [agent:swift]
- bd-x7y8.3 [agent:typescript]
- bd-x7y8.4 [agent:typescript]
- bd-x7y8.5 [agent:sql]
- bd-x7y8.6 [agent:swift]
- bd-x7y8.7 [agent:typescript]
- bd-x7y8.8 [agent:test]
Split into sub-batches:
- Sub-batch 1: [.1, .2, .3] → execute, wait, collect telemetry
- Sub-batch 2: [.4, .5, .6] → execute, wait, collect telemetry
- Sub-batch 3: [.7, .8] → execute, wait, collect telemetry
Execution pattern:
- Spawn sub-batch agents in parallel
- Wait for ALL agents in sub-batch to complete
- Capture telemetry for each (see Step 4a)
- Proceed to next
Установить run-tasks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл run-tasks?
Orchestrate task execution via beads and sub-agents. Gets ready work from beads, spawns appropriate agents based on labels, monitors completion, and updates status. Use after /approve-spec has created tasks.
Как установить скилл run-tasks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл run-tasks запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic