task-system
npx machina-cli add skill zircote/claude-team-orchestration/task-system --openclawTask System
Manage shared work items with dependencies, ownership, and status tracking across agent teams.
Related skills:
- Orchestrating - Primitives overview and quick reference
- Team Management - Creating and managing teams
- Messaging - Communicating about task progress
- Orchestration Patterns - Patterns that use tasks effectively
- Error Handling - Handling task failures
TaskCreate - Create Work Items
TaskCreate({
subject: "Review authentication module",
description: "Review all files in app/services/auth/ for security vulnerabilities",
activeForm: "Reviewing auth module..." // Shown in spinner when in_progress
})
Fields:
subject- Brief, actionable title in imperative form (e.g., "Fix authentication bug")description- Detailed description with context and acceptance criteriaactiveForm- Present continuous form shown while task is in_progress (e.g., "Fixing authentication bug")
All tasks are created with status pending and no owner.
TaskList - See All Tasks
TaskList()
Returns summary of each task:
#1 [completed] Analyze codebase structure
#2 [in_progress] Review authentication module (owner: security-reviewer)
#3 [pending] Generate summary report [blocked by #2]
Fields returned:
id- Task identifiersubject- Brief descriptionstatus-pending,in_progress, orcompletedowner- Agent name if assigned, empty if availableblockedBy- List of task IDs that must complete first
When to check: After completing a task, to find newly unblocked work. Prefer tasks in ID order (lowest first) when multiple are available.
TaskGet - Get Task Details
TaskGet({ taskId: "2" })
Returns full task with description, status, blockedBy, blocks, etc.
TaskUpdate - Update Task Status
// Claim a task
TaskUpdate({ taskId: "2", owner: "security-reviewer" })
// Start working
TaskUpdate({ taskId: "2", status: "in_progress" })
// Mark complete
TaskUpdate({ taskId: "2", status: "completed" })
// Set up dependencies
TaskUpdate({ taskId: "3", addBlockedBy: ["1", "2"] })
// Delete a task
TaskUpdate({ taskId: "4", status: "deleted" })
Status workflow: pending -> in_progress -> completed
Use deleted to permanently remove a task.
Task Dependencies
When a blocking task is completed, blocked tasks are automatically unblocked:
// Create pipeline
TaskCreate({ subject: "Step 1: Research" }) // #1
TaskCreate({ subject: "Step 2: Implement" }) // #2
TaskCreate({ subject: "Step 3: Test" }) // #3
TaskCreate({ subject: "Step 4: Deploy" }) // #4
// Set up dependencies
TaskUpdate({ taskId: "2", addBlockedBy: ["1"] }) // #2 waits for #1
TaskUpdate({ taskId: "3", addBlockedBy: ["2"] }) // #3 waits for #2
TaskUpdate({ taskId: "4", addBlockedBy: ["3"] }) // #4 waits for #3
// When #1 completes, #2 auto-unblocks
// When #2 completes, #3 auto-unblocks
// etc.
Fan-in dependencies (multiple blockers):
TaskUpdate({ taskId: "5", addBlockedBy: ["3", "4"] }) // #5 waits for BOTH #3 AND #4
Task Claiming and File Locking
Task claiming uses file locking to prevent race conditions when multiple teammates try to claim the same task simultaneously. This is handled automatically by TaskUpdate.
Self-claim workflow:
- Call
TaskList()to see available tasks - Find a task with status
pending, no owner, and emptyblockedBy - Claim it:
TaskUpdate({ taskId: "X", owner: "your-name" }) - Start it:
TaskUpdate({ taskId: "X", status: "in_progress" }) - Do the work
- Complete it:
TaskUpdate({ taskId: "X", status: "completed" })
If two teammates try to claim the same task simultaneously, one will succeed and the other will see the task is already owned.
Task Status Lag
Known limitation: Teammates sometimes fail to mark tasks as completed, which blocks dependent tasks. If a task appears stuck, check whether the work is actually done and update the task status manually, or tell the lead to nudge the teammate.
Task File Structure
~/.claude/tasks/{team-name}/1.json:
{
"id": "1",
"subject": "Review authentication module",
"description": "Review all files in app/services/auth/...",
"status": "in_progress",
"owner": "security-reviewer",
"activeForm": "Reviewing auth module...",
"blockedBy": [],
"blocks": ["3"],
"createdAt": 1706000000000,
"updatedAt": 1706000001000
}
Task Sizing Best Practices
- Too small: coordination overhead exceeds the benefit
- Too large: teammates work too long without check-ins, increasing risk of wasted effort
- Just right: self-contained units that produce a clear deliverable (a function, a test file, a review)
Tip: Having 5-6 tasks per teammate keeps everyone productive and lets the lead reassign work if someone gets stuck.
Source
git clone https://github.com/zircote/claude-team-orchestration/blob/main/skills/task-system/SKILL.mdView on GitHub Overview
Task system manages shared work items with dependencies, ownership, and status tracking across agent teams. It supports creating work items, building task pipelines, coordinating ownership, and managing task dependencies to keep work flowing smoothly.
How This Skill Works
Create tasks with TaskCreate (subject, description, activeForm). Tasks start as pending with no owner. Use TaskList to view tasks and TaskGet for full details. Use TaskUpdate to claim (owner), move to in_progress, complete, or addBlockedBy to define dependencies. When blockers finish, dependent tasks auto-unblock, and file locking prevents race conditions during claims.
When to Use It
- Planning a new feature that requires multiple hands on different components and clear ownership.
- Coordinating an incident response or outage recovery with cross-team task assignments and blockers.
- Building a sequential deployment or data-pipeline with steps that must run in order.
- Managing a task that has a fan-in dependency, requiring multiple preceding tasks to finish first.
- Reassigning or reorganizing work streams mid-project and tracking updated ownership and status.
Quick Start
- Step 1: TaskList() to view available tasks.
- Step 2: TaskUpdate({ taskId: "2", owner: "your-name" }) to claim a task.
- Step 3: TaskUpdate({ taskId: "2", status: "in_progress" }) to start work (or later status: "completed").
Best Practices
- Write task subjects in imperative form and provide a clear, actionable description with acceptance criteria.
- Define dependencies explicitly with addBlockedBy to create reliable pipelines.
- Regularly check TaskList in ID order when multiple tasks are available to avoid starvation.
- Always claim a task before starting work to leverage automatic file-locking and prevent race conditions.
- Keep task statuses and ownership up to date (pending → in_progress → completed) and document blockers clearly.
Example Use Cases
- Create a 4-step deployment pipeline: Step 1 Research (#1), Step 2 Implement (#2) blocked by #1, Step 3 Test (#3) blocked by #2, Step 4 Deploy (#4) blocked by #3, with auto-unblocking on completion.
- Assign a security review task to security-reviewer as owner and monitor its progress from pending to in_progress and finally completed.
- After finishing task #1, observe #2 auto-unblock and appear as in_progress or pending-ready in TaskList.
- Final QA task waits on both development and testing tasks (fan-in: addBlockedBy: [3,4]), ensuring QA only starts when both are done.
- Two teammates attempt to claim the same task; file locking via TaskUpdate prevents a race, ensuring only one owner is assigned.