| name | task-management |
| description | Create, update, list, prioritize, and triage tasks. TRIGGER when: user says "add task", "todo", "what are my tasks", "mark done", "triage", "prioritize", or manages any work item tracking.
|
| argument-hint | [add|list|done|triage|delete] [task description or ID] |
| user-invocable | true |
Task Management
A structured, file-based task tracking system. Each task is an individual markdown file with YAML frontmatter, indexed in a central manifest.
First-Run Setup
Before any operation, ensure the task system exists:
- Check if
~/.claude/tasks/ exists — if not, create with mkdir -p ~/.claude/tasks/
- Check if
~/.claude/tasks/TASKS.md exists — if not, create:
# Task Index
<!-- Auto-maintained. Do not edit manually. -->
## In Progress
## To Do
## Blocked
## Done
Task Schema
Each task is a file at ~/.claude/tasks/TASK-{NNN}.md:
---
id: TASK-001
title: "Short imperative description (max 80 chars)"
status: todo | in-progress | done | blocked
priority: critical | high | medium | low
created: 2026-04-08
updated: 2026-04-08
due: 2026-04-15
completed: null
tags: [feature, backend]
blocked-by: TASK-003
source: "gh#45"
---
Detailed description of what needs to be done and why.
- [ ] Criterion 1
- [ ] Criterion 2
- YYYY-MM-DD: Progress note or context update
Operations
Add — $ARGUMENTS starts with "add" or user describes a new task
- Parse input: Extract title, priority, due date, tags from the user's description. Infer what you can; ask only for what's ambiguous.
- Generate ID: Read existing task files to find the highest ID, increment by 1. Pad to 3 digits (e.g.,
TASK-001).
- Normalize dates: Convert relative dates to absolute ISO format. Use today's date as reference.
- Default values:
status: todo, priority: medium, created: today, updated: today.
- Write task file: Create
~/.claude/tasks/TASK-{NNN}.md with full schema.
- Update index: Add entry to the appropriate section in
TASKS.md:
- [TASK-{NNN}](TASK-{NNN}.md) — {title} ({priority}, due {date})
- Confirm: Show the created task with its ID.
List — $ARGUMENTS starts with "list" or user asks to see tasks
- Read
TASKS.md and present grouped by status.
- Filtering: Support filters from
$ARGUMENTS:
list high — filter by priority
list blocked — filter by status
list backend — filter by tag
list overdue — due date < today and status != done
- Sorting: Within each status group, sort by: priority (critical > high > medium > low), then due date (soonest first), then creation date.
- Output format:
## Tasks (5 total: 1 in-progress, 3 todo, 1 blocked)
### In Progress
- TASK-005: Migrate user table (high, due tomorrow)
### To Do
- TASK-007: Write API docs (medium, no due date)
- TASK-008: Add rate limiting (medium, due 2026-04-20)
- TASK-009: Update onboarding flow (low)
### Blocked
- TASK-006: Deploy auth service — blocked by TASK-005
Done — $ARGUMENTS starts with "done" or user marks a task complete
- Find the task by ID or keyword match. If ambiguous, present options and ask.
- Update the task file:
- Set
status: done
- Set
completed: {today}
- Set
updated: {today}
- Move the entry in
TASKS.md from its current section to ## Done.
- If the completed task was blocking other tasks (
blocked-by references), notify the user and offer to unblock them.
- Confirm completion.
Update — user wants to change a task's priority, due date, description, or status
- Find the task by ID or keyword.
- Apply the requested changes to the task file frontmatter and/or body.
- Always set
updated: {today}.
- Add a timestamped note under
## Notes describing the change.
- Update
TASKS.md if the status, priority, or title changed.
- Confirm what was updated.
Triage — $ARGUMENTS starts with "triage" or user asks to review tasks
Triage walks through tasks that need attention:
- Identify candidates:
- Overdue:
due < today and status != done
- Stale:
updated > 7 days ago and status is todo or in-progress
- Unestimated: no
due date and priority is high or critical
- Long-running:
in-progress for > 14 days
- Present each with context and ask the user to choose an action:
- Reprioritize: change priority
- Reschedule: set or update due date
- Close: mark as done or remove
- Skip: leave as-is for now
- Apply changes as the user decides.
- Summary: After triage, show counts of actions taken.
Delete — $ARGUMENTS starts with "delete" or "remove"
- Find the task by ID or keyword.
- Require explicit confirmation — show the full task before deleting.
- Remove the task file.
- Remove the entry from
TASKS.md.
- Check if any other tasks have
blocked-by referencing this task. If so, warn the user.
- Confirm deletion.
Integrity Rules
- Single source of truth: Task files are authoritative.
TASKS.md is a derived index.
- Index repair: If
TASKS.md is out of sync with task files (missing entries, wrong status), rebuild it from the task files.
- No duplicates: Before creating, search existing tasks for similar titles. Warn if a near-duplicate exists.
- ID immutability: Once assigned, a task ID never changes. Deleted IDs are not reused.
- Audit trail: Every status change gets a timestamped note in the task file.
- Atomic updates: Always update both the task file AND
TASKS.md in the same operation. Never leave them inconsistent.
Quality Checklist
Edge Cases
- If input data is incomplete, state assumptions explicitly and flag gaps
- For time-sensitive situations, prioritize speed over comprehensiveness
- If multiple stakeholders have conflicting needs, document the tradeoffs
- For first-time use, start with a simplified version and iterate
- Adapt the depth and detail to the audience's expertise level