Task Forest
Track project tasks, subtasks, and dependencies as an interactive graph.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/task-forest-dongshuyan/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Maintains a repo-local task forest or task DAG for the current workspace. Use when the user asks to initialize, update, close a session, summarize evolving project tasks, decide whether a new request is a global task or subtask, track task progress/history/deviations/todos, export a task graph HTML, or provide task data for gap-router/local-agent-control-room. Do not use for executing the tasks themselves.
What this skill does
Task Forest
Language Policy
Write skill instructions in English. When interacting with the user or generating task titles, node fields, proposals, reports, or exported user-facing content, use the user's language. Default to Chinese when the user's language is unknown.
Role
Maintain repo-local task structure. Record long-running goals, subtasks, dependencies, progress, deviations, todos, and session history under the current workspace. Export an offline HTML view of the task graph.
Portability
Resolve paths from the directory that contains this SKILL.md. Use the available Python command on the host (python3, python, or py -3). The scripts are intended for macOS, Windows, and Linux with Python 3 and the standard library. In portable builds, agents may set COMPASS_AGENT_NAME or AGENT_NAME when they want graph history to record the calling agent.
Core Principles
- Write task-forest data only through
scripts/task_forest.py; never edit files under.agent-workbench/task-forest/directly. - The internal model is a DAG. The default presentation is a forest: one primary
child_ofparent per node,contributes_tofor secondary ownership, anddepends_onfor execution prerequisites. - If user intent is unclear, apply
$task-clarifierbefore task graph work. If intent is clear enough, present a proposal and wait for confirmation before applying it. - Keep unconfirmed assumptions in proposals. Write formal graph changes only after confirmation.
- When execution diverges from the user's requirement, record a deviation and move related tasks to
review_neededor wait for user confirmation. - Store canonical data in the current workspace at
.agent-workbench/task-forest/. Store only lightweight registry data in the global SQLite index. - In concurrent sessions, read and write through the CLI so locking and stale-hash checks can run.
- Treat HTML export as a primary product surface. Changes to the HTML template must satisfy
references/html-visualization-contract.mdand passscripts/validate_task_forest_export.py.
CLI
Resolve <skill-dir> to the directory that contains this SKILL.md. Use the available Python command for the host (python3, python, or py -3). Examples use python3; adapt only the Python executable name when needed.
python3 <skill-dir>/scripts/task_forest.py --help
The default workspace is the current working directory. To target a specific workspace:
python3 <skill-dir>/scripts/task_forest.py init \
--workspace /path/to/repo
Common commands:
python3 <skill-dir>/scripts/task_forest.py init
python3 <skill-dir>/scripts/task_forest.py add-node \
--kind global_task \
--title "Maintain the local agent workbench" \
--requirement "Task data stays inside the workspace" \
--acceptance "The task graph can be exported to HTML"
python3 <skill-dir>/scripts/task_forest.py add-node \
--title "Implement task graph HTML export" \
--parent TF-0001 \
--estimate 120 \
--difficulty medium
python3 <skill-dir>/scripts/task_forest.py todo
python3 <skill-dir>/scripts/task_forest.py export
python3 <skill-dir>/scripts/task_forest.py validate
Session Close Workflow
When the user asks to update the task forest, close the current session, or maintain the task list from the conversation:
- Run
initto ensure the data directory exists. - Run
list --jsonandtodo --jsonto read current nodes and open work. - Analyze the session and create candidate changes only: new nodes, node updates, edges, deprecations, deviations, or questions.
- If the session goal is unclear, ask which goal this conversation mainly served.
- If the goal is clear enough, show the proposal: where each new node goes, how it relates to existing tasks, and which fields would change.
- Save the candidate changes as a proposal. Apply with
proposal-apply --yesonly after user confirmation. - After applying, run
validateandexport, inspect the HTML againstreferences/html-visualization-contract.md, and tell the user the HTML path.
Proposal JSON fields and invariants live in references/schema.md. Complex session-close reasoning lives in references/session-close-workflow.md.
Read references/goal-alignment.md when judging how a task serves a global goal, whether it can achieve the user's purpose, or which candidate task plan to offer. Clarification methods come from $task-clarifier; task-forest owns graph meaning, candidate task structure, and proposal writes.
Read references/node-types.md only when adding or classifying nodes.
Concurrency and multi-session rules live in references/concurrency.md. Proposals store base_graph_hash; application rejects stale proposals by default. Use --allow-stale only after manual conflict review.
Outputs And Integration
Exports are fixed at:
.agent-workbench/task-forest/exports/task-forest.graph.json
.agent-workbench/task-forest/exports/task-forest.todos.json
.agent-workbench/task-forest/exports/task-forest.timeline.json
.agent-workbench/task-forest/exports/task-forest.html
gap-router and local-agent-control-room read these exports. They must leave canonical task-forest data unchanged. Field contracts live in references/integration-contract.md.
The CLI updates a lightweight global registry when possible during init, export, validate, proposal-save, and proposal-apply:
~/.agent-workbench/agent-workbench.sqlite3
The registry stores workspace paths, task-forest paths, export paths, export hashes, node/edge/status counts, command status, and error summaries. It omits node bodies, edge bodies, history snapshots, HTML, proposal content, and full conversation summaries. Use AGENT_WORKBENCH_DB to set another registry path. Set TASK_FOREST_DISABLE_GLOBAL_REGISTRY=1 to disable the global registry.
Full rebuild regression:
python3 <skill-dir>/scripts/validate_task_forest_export.py --skill-dir <skill-dir>
The validator creates a temporary workspace, initializes task-forest, builds a sample DAG with multiple states and edge types, runs validate/export, and checks exported JSON and HTML behavior.
Boundaries
- Explicit invocation is the reliable way to run this skill at session end.
- Low-confidence goal inference must become a question or stay in a proposal.
- Prefer
deprecatedfor removed tasks so history remains reviewable. - Estimates must include confidence. Use
unknownor low confidence when evidence is thin.
Related skills
App Store Listing Audit
coreyhaines31
Analyze your app listing against best practices and get a prioritized optimization plan.
Co-Marketing Partnerships
coreyhaines31
Find ideal partners and plan joint marketing campaigns with other companies.
Cold Email Writer
coreyhaines31
Write B2B cold emails and follow-up sequences designed to get replies.
Community-Led Growth
coreyhaines31
Build and grow online communities to drive product adoption and customer loyalty.