Skip to content

Task Management

The /tasks skill and its backing CLI (.claude/tools/tasks.py) provide persistent task tracking inside a documentation project. Tasks, projects, tags, and logs live in a SQLite database at .claude/tasks.db, surviving across conversations.

/tasks <action> [details]

The skill parses free-form text and dispatches to one of four sub-agents:

IntentSub-agentModelExamples
Create tasks or projectstask-creatorhaiku”add a bug for broken links”
View or querytask-viewerhaiku”show the agenda”, “list priority A tasks”
Update state, tags, logstask-updaterhaiku”mark task 5 done”, “tag task 3 with frontend”
Break down featuresproject-plannersonnet”plan the authentication feature”

All sub-agents call the same CLI:

Terminal window
uv run --script .claude/tools/tasks.py <command> [args] [options]

The tool requires Python 3.11+ and typer. uv run --script handles dependency installation automatically.

Create a task.

Terminal window
uv run --script .claude/tools/tasks.py add "Fix broken sidebar links" \
--priority A \
--project docs-cleanup \
--tags "bug,frontend" \
--deadline 2026-03-25
OptionShortDescription
--body-bTask body or description
--state-sInitial state (default: TODO)
--priority-pA, B, or C
--projectProject name (auto-creates if missing)
--parentParent task ID for subtasks
--effortEffort estimate (30m, 2h, 1d)
--scheduledScheduled date (YYYY-MM-DD)
--deadlineDeadline date (YYYY-MM-DD)
--tags-tComma-separated tag names

The project is created automatically if it does not exist. Tags are also auto-created. The initial state change is logged.

Retrieve a task with its tags, properties, subtasks, and recent log entries.

Terminal window
uv run --script .claude/tools/tasks.py get 5

Returns the full task object including up to 10 recent log entries.

Modify task fields. State changes are logged automatically.

Terminal window
uv run --script .claude/tools/tasks.py update 5 --state DONE
uv run --script .claude/tools/tasks.py update 5 --priority A --deadline 2026-04-01

Accepts the same options as add (except --tags). When state changes to DONE or CANCELLED, the closed_at timestamp is set. Reopening a closed task clears closed_at.

Delete a task and cascade to its subtasks, tags, properties, and log entries.

Terminal window
uv run --script .claude/tools/tasks.py delete 5

Query tasks with filters.

Terminal window
uv run --script .claude/tools/tasks.py list --project docs-cleanup --priority A
uv run --script .claude/tools/tasks.py list --tag bug --state TODO
uv run --script .claude/tools/tasks.py list --deadline-before 2026-04-01 --include-done
OptionShortDescription
--state-sFilter by state
--priority-pFilter by priority
--projectFilter by project name
--tagFilter by tag name
--parentFilter by parent task ID
--scheduled-beforeTasks scheduled on or before date
--deadline-beforeTasks due on or before date
--limit-nMax results (default: 50)
--include-doneInclude DONE/CANCELLED tasks

Results are ordered by priority (A first), then by creation date descending. DONE and CANCELLED tasks are excluded by default.

Tasks move through these states:

TODO → NEXT → IN_PROGRESS → DONE
→ CANCELLED
WAITING ←→ (any active state)

Valid states: TODO, NEXT, IN_PROGRESS, WAITING, DONE, CANCELLED.

Every state change is recorded in the task log with the transition (e.g., TODO -> IN_PROGRESS). Setting state to DONE or CANCELLED writes a closed_at timestamp.

Terminal window
uv run --script .claude/tools/tasks.py tag 5 frontend
uv run --script .claude/tools/tasks.py untag 5 frontend

Tags are created on first use. Removing a tag that does not exist is a no-op.

List all tags with their task counts.

Terminal window
uv run --script .claude/tools/tasks.py tags
Terminal window
uv run --script .claude/tools/tasks.py project-add "docs-cleanup" --description "Fix documentation issues"

Fails if the project name already exists.

Lists all projects with task counts grouped by state.

Terminal window
uv run --script .claude/tools/tasks.py project-list

Deletes a project. Tasks in the project become unassigned (they are not deleted).

Terminal window
uv run --script .claude/tools/tasks.py project-delete "docs-cleanup"

Arbitrary key-value pairs on tasks. Useful for metadata that does not fit the standard fields.

Terminal window
uv run --script .claude/tools/tasks.py prop-set 5 assignee "ryan"
uv run --script .claude/tools/tasks.py prop-del 5 assignee

Properties use upsert semantics — setting a key that exists overwrites the value.

Each task has a log of timestamped entries. State changes are logged automatically. You can also add notes manually.

Terminal window
uv run --script .claude/tools/tasks.py log 5 "Investigated — root cause is stale cache"
uv run --script .claude/tools/tasks.py log-list 5 --limit 10

Log entry types: state_change, note, clock.

Five read-only views provide org-mode-style overviews.

Overdue items plus upcoming deadlines and scheduled tasks within a date range.

Terminal window
uv run --script .claude/tools/tasks.py agenda --days 14

Returns tasks grouped by date, with each task marked as overdue or upcoming.

Unscheduled TODO and NEXT tasks, grouped by priority. These are tasks with no scheduled or deadline date.

Terminal window
uv run --script .claude/tools/tasks.py backlog --project docs-cleanup

All tasks in the NEXT state — the GTD “next actions” list.

Terminal window
uv run --script .claude/tools/tasks.py next --limit 10

Projects that have TODO tasks but no NEXT or IN_PROGRESS tasks. These projects need attention to move work forward.

Terminal window
uv run --script .claude/tools/tasks.py stuck

Dashboard with counts by state, priority, overdue count, and tasks due this week.

Terminal window
uv run --script .claude/tools/tasks.py summary

The SQLite database lives at .claude/tasks.db relative to the git root. It uses WAL journal mode and foreign keys.

Six tables:

TablePurpose
projectsNamed project containers
tasksCore task records with state, priority, dates
tagsTag name registry
task_tagsMany-to-many task-tag associations
task_propertiesKey-value properties per task
task_logTimestamped log entries per task

The schema is created automatically on first use. Indexes cover state, priority, project_id, parent_id, deadline, scheduled, and task_id on the log table.

Deleting a task cascades to its subtasks, tag associations, properties, and log entries. Deleting a project sets project_id to null on its tasks — the tasks survive.