From async-suite
Async workflow pipeline for use case preparation and implementation. Auto-invokes for feature planning and complex task preparation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/async-suite:async-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides background preparation and implementation workflows for use cases, features, and complex tasks.
This skill provides background preparation and implementation workflows for use cases, features, and complex tasks.
v2 Architecture: Replaced bash scripts with native Claude Code Task capabilities for improved reliability and cross-platform compatibility.
| Aspect | /todo | /bg |
|---|---|---|
| Preparation | ASYNC | ASYNC |
| Implementation | SYNC (user does it) | ASYNC (agent does it) |
| Review | ASYNC | ASYNC |
| Use case | User wants control | User trusts agent |
| MCP available | YES (user implements) | NO (background agent) |
AUTOMATICALLY INVOKE this skill when user mentions:
DO NOT INVOKE when:
/todo <request> [flags] - Async Prep, Sync ImplementationQueue a task for async preparation. User implements synchronously after prep completes.
Flags:
--fast - Use Haiku for all phases--deep - Use Sonnet/Opus (default)--tactical - Research-only lightweight modeClassification (Auto-Detected):
Workflow:
User → /todo "feature" → ASYNC prep → Todo added → User implements SYNC → ASYNC review
/bg <request> [flags] - Fully Fire-and-ForgetLaunch a task that runs entirely in the background. Agent implements automatically.
Flags:
--fast - Use Haiku for all phases--deep - Use Sonnet/Opus (default)Workflow:
User → /bg "feature" → ASYNC (prep + implement + review) → Notified when done
When to use /bg:
When to use /todo instead:
/todo-cleanup [--dry-run] - MaintenanceClean up abandoned and old tasks.
| Aspect | v1 (bash) | v2 (Task-native) |
|---|---|---|
| ID Generation | Python + xxd | python3 time + os.urandom |
| File Operations | bash cat/echo | Write tool (atomic) |
| Locking | mkdir-based | Not needed (Task handles) |
| Date Handling | macOS/Linux specific | JavaScript (universal) |
| JSON Operations | jq (external) | JSON.parse/stringify |
| Status Updates | async-utils.sh | Read/Write JSON |
| Error Handling | bash trap | Agent try/catch |
| Component | v1 Lines | v2 Lines | Reduction |
|---|---|---|---|
| async-utils.sh | 527 | 0 | -100% |
| todo-expansion-agent.md | 500 | 0 | -100% (uses built-in agents) |
| Command files | 0 | ~300 | New |
| Total | ~1,200 | ~500 | -58% |
All 13 edge cases from the original test suite are handled:
| # | Edge Case | v2 Solution |
|---|---|---|
| 1 | Empty/Invalid Task ID | Regex validation |
| 2 | Path Traversal Attack | Reject .. and / + startsWith containment |
| 3 | ID Collision | python3 os.urandom() |
| 4 | Invalid Date Parsing | Number.isNaN() check (not || Infinity) |
| 5 | Meta.json Corruption | try/catch + skip |
| 6 | Large Content (>100KB) | Write tool (no limits) |
| 7 | File Descriptor Leak | No FDs (Task manages) |
| 8 | Concurrent Generation | TaskCreate atomic |
| 9 | Invalid jq Filter | No jq in command files (hook requires jq, checks at startup) |
| 10 | Symbolic Link Safety | Read tool validation |
| 11 | Cross-Platform Dates | JavaScript Date |
| 12 | Lock Stale/Timeout | Not needed for commands (hook ops use file-level atomicity) |
| 13 | Crashed RUNNING Tasks | RUNNING status + 1hr grace period in cleanup |
During expansion, the agent validates with 5 key questions:
Outcomes: PROCEED | FLAG_FOR_CLARIFICATION | HALT
After implementation, review runs with 5 questions:
If issues found, agent fixes and re-reviews (max 3 iterations).
User → /todo "feature" [--fast|--deep|--tactical]
│
├── Parse flags → Classify request
├── Generate task ID → Write meta.json
│
└── Background agent:
├── Phase 0: Set status → RUNNING
├── Phase 1: Expand use cases → expansion.md
├── Phase 1.5: Validation gate (PROCEED/FLAG/HALT)
├── Phase 2: Research codebase (Glob/Grep)
├── Phase 3: Create implementation plan → plan.md
├── Phase 4: Write checklist → checklist.md
└── Phase 5: Set status → READY
↓
User reads checklist.md → Implements (MCP available)
↓
Marks "Run quality review" → Hook detects → User/LLM runs review
User → /bg "feature" [--fast|--deep]
│
├── Parse flags
├── Generate task ID → Write meta.json
│
└── Background agent:
├── Phase 0: Set status → RUNNING
├── Phase 1: Expand use cases → expansion.md
├── Phase 1.5: Validation gate (PROCEED/FLAG/HALT)
├── Phase 2: Research codebase
├── Phase 3: Plan implementation → plan.md
├── Phase 4: IMPLEMENT (Edit files)
├── Phase 5: Quality review (max 3 iterations) → review.md
├── Phase 6: Write completion summary → checklist.md
└── Phase 7: Set status → COMPLETED
PENDING → RUNNING → READY (/todo: prep complete, user implements)
→ COMPLETED (/bg: agent finished implementation)
→ NEEDS_USER_ACTION (/bg: MCP tools required)
→ FAILED (any unrecoverable error)
→ FLAG_FOR_CLARIFICATION (ambiguous request)
→ HALT (destructive/dangerous request)
Any status → ABANDONED (via /todo-cleanup after 7-day timeout)
ABANDONED → [deleted] (via /todo-cleanup after 30-day cleanup_at)
Tasks stored in ~/.claude/async-prep/{task-id}/:
| File | Description |
|---|---|
meta.json | Task metadata (status, timestamps) — written by agent |
.hook-state.json | TodoWrite content tracking — written by hook only |
expansion.md | Use cases, edge cases, acceptance criteria |
plan.md | Implementation steps, patterns, risks |
checklist.md | Implementation checklist (/todo) or completion summary (/bg) |
implementation.log | Step-by-step progress log (/bg only) |
review.md | Post-implementation review (/bg only) |
error.log | Error details (if failed) |
Background agents (spawned with run_in_background: true) have constraints:
| Phase | Execution | MCP Available? |
|---|---|---|
| Expansion | Background agent | No |
| User Implementation | Foreground (user) | Yes |
| Quality Review | Main conversation | Yes |
Instead of slash commands, use natural language:
| Request | Action |
|---|---|
| "show me the full plan for [task-id]" | Read .md files from task directory |
| "what's the status of my async tasks?" | List tasks from ~/.claude/async-prep/ |
| "retry task [task-id]" | Check failed phase, relaunch |
| "clean up old async tasks" | Run /todo-cleanup |
| "review my implementation" | Launch review manually |
The hook (detect-quality-review.sh) monitors TodoWrite for the "Run quality review" checkbox:
afterToolCallThe hook does NOT automatically launch a review agent. It outputs instructions that the LLM should follow to run the review.
v2 replaced all bash infrastructure (async-utils.sh, agents/ directory, test scripts) with Task-native command files. See CLEANUP_GUIDE.md for migration details.
npx claudepluginhub whichguy/claude-craft --plugin async-suiteCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.