Use when Tier 2+ tasks, multi-step projects, or when tracking/recovery is needed and plan files must persist across sessions.
Ships in core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Work like Manus: Use persistent markdown files as your "working memory on disk" while leveraging TodoWrite for live session tracking.
For Tier 2+ engineering work, create or update the plan file as soon as task intent is understood. Do not wait until planning is "done." The plan file is live working memory during both planning and implementation.
If the current session already has an active plan file from pi-plan-auto or another planning tool, use that file as the single source of truth. Do not create task_plan.md, notes files, or fallback plan files unless no active plan file exists or the user explicitly asks for a separate artifact.
Apply this skill's structure and sync discipline to the existing active plan file:
set_plan; never write or duplicate it with file tools.Default behavior:
set_plan early with a skeleton in the active plan file, then refresh it after every material change.set_plan is unavailable.| Tool | Purpose | Persistence | TUI Visible |
|---|---|---|---|
| TodoWrite | Live step tracking | Session only | Yes |
| active plan file | Phases, goals, errors, learnings | Permanent | No |
| notes.md | Research findings, only when no active plan already covers them | Permanent | No |
Prefer the active plan file path provided by the current planning tool or implementation prefill. In Pi, this is usually the .plan.md file created by pi-plan-auto and maintained through set_plan during Plan mode.
Only if no active plan path exists, use the current environment's durable plan directory:
{planDir}/
├── {project}_{id}_task_plan.md # Main plan (id = sessionID if available, else uuid)
├── {project}_{id}_notes.md # Research (Tier 3+)
└── archive/ # Optional auto-archive location
Suggested planDir by environment:
.plan.md path from set_plan / plan-mode prefill.~/.pi/plans/~/.config/opencode/plans/Every new task MUST have a unique identifier (id) used in filenames.
Preferred: use the current environment's session ID and project slug if available.
taskPlanPath / notesPath, use those exact paths.{planDir}/{projectSlug}_{sessionID}_task_plan.md{planDir}/{projectSlug}_{sessionID}_notes.mdprojectSlug is unavailable, use a short project name (e.g., cwd basename)Fallback only if sessionID is unavailable/empty:
uuidgen | cut -c1-8
Never use:
notifications_fix)20260104)| Tier | Active plan file | notes.md | TodoWrite | Re-read |
|---|---|---|---|---|
| T1 | Optional | Skip | Mandatory | Skip |
| T2 | Mandatory | If research and not covered in active plan | Mandatory | Before major decisions |
| T3+ | Mandatory | If research needs separate artifact | Mandatory | Before EVERY decision |
Plan mode bootstrap:
set_plan before launching broad exploration or asking non-blocking questions.After every TodoWrite update:
After every material planning change:
set_plan with the full latest plan while in Plan modeDuring implementation:
At phase boundaries:
Before /clear or session end:
On session resume:
If write/edit tools are not available:
set_plan for the active plan file instead of shell/file writes.apply_patch is available, use it to add or update the fallback file with full content.cat <<'EOF' > /absolute/path/to/task_plan.md
[template contents]
EOF
echo or partial writes for multi-line files.# Task Plan: [Brief Description]
## Goal
[One sentence describing to end state]
## Phases
- [ ] Phase 1: Plan and setup
- [ ] Phase 2: Research/gather information
- [ ] Phase 3: Execute/build
- [ ] Phase 4: Review and deliver
## Key Questions
1. [Question to answer]
## Decisions Made
- [Decision]: [Rationale]
## Delegation Summary
Include only when subagents are dispatched.
- [agent-name]: [objective] - [key finding or status]
## Errors Encountered
- [Timestamp] [Error]: [Resolution]
## Learnings for Graphiti
- [Procedure/Preference/Fact]: [Learning to store after task]
## Status
**Currently in Phase X** - [What I'm doing now]
**TodoWrite sync:** [Last synced step]
# Notes: [Task Brief]
## Research Findings
### Source 1: [Name]
- URL: [link]
- Key points:
- [Finding]
### Source 2: [Name]
...
## Synthesized Insights
- [Category]: [Insight]
## Open Questions
- [Question still to resolve]
Keep the active plan file Status current. This enables recovery after context reset.
In Plan mode, set_plan is mandatory after material changes. In implementation mode, update the plan file directly with normal file edit tools. Material changes include new requirements, decisions, delegated findings, phase transitions, blockers, errors, verification results, and scope changes.
Read the active plan file before major decisions to bring goals into attention window.
Every error goes in the active plan file. TodoWrite doesn't track error history.
At task end, extract learnings from the active plan file to store in Graphiti memory.
If any subagent was dispatched, add a Delegation Summary section to the active plan file with the selected agents, objectives, and key findings. If no delegation happened for a qualifying task, note the skip rationale in the plan status or decisions section.
Context reset or /clear happens...
1. Read the active plan file
→ Status: "Currently in Phase 2 - Implementing auth middleware"
→ TodoWrite sync: "Completed JWT validation, working on user service"
2. Restore TodoWrite:
- [x] Create auth middleware file
- [x] Add JWT validation logic
- [in_progress] Connect to user service
- [pending] Add error handling
3. Continue from exact position
| Problem | TodoWrite Alone | With active plan file |
|---|---|---|
| Context reset | Lost | Recoverable |
| 50+ tool calls | Goal drift | Re-read refreshes goals |
| Error patterns | Not tracked | Logged for learning |
| Cross-session | Must restart | Resume exactly |
| Graphiti sync | Manual | "Learnings" section |
What SKILL.md sets; muted values are Claude Code's defaults
/core:planning-with-filesfrom core
npx claudepluginhub dxta/claude-code-skills --plugin core23 skills in this plugin
/agent-selectionSelect Pi agents from compact local agent index./anti-patternsCommon mistakes to avoid with explanations and correct alternatives/clean-codeApply Robert C. Martin Clean Code principles and the clean-code-skills rule catalog when code quality is explicit or when an agent is reviewing, simplifying, refactoring, or cleaning touched code. Use for clean code, code smells, maintainability, readability, naming, small functions, comments/docstrings, DRY, duplication, magic numbers, boundary conditions, Boy Scout cleanup, refactor review, PR review, code quality review, test readability, boundary test coverage, test maintainability, pytest monkeypatch rejection, fixture/conftest cleanup, or requests like "make this cleaner", "review for maintainability", "is this clean code", "simplify this", "remove code smells", "rename this", "split this function", "clean up comments", "clean up tests", or "review tests for clarity". For Python or TypeScript, load only the matching language reference file for files in active scope.Other plugins' skills for the same job