planning-with-files
Persistent markdown files as working memory for complex multi-phase tasks.
Best use case
planning-with-files is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Persistent markdown files as working memory for complex multi-phase tasks.
Teams using planning-with-files should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/planning-with-files/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How planning-with-files Compares
| Feature / Agent | planning-with-files | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Persistent markdown files as working memory for complex multi-phase tasks.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Planning with Files Skill ## Overview This skill uses persistent markdown files as external memory to execute complex, multi-phase tasks without context drift. Files serve as the single source of truth for goals, progress, and decisions. Re-read files before major decisions to ground work in written commitments rather than fallible working memory. The workflow consists of four phases: 1. **CREATE PLAN** — Write goals and phases before executing 2. **RESEARCH AND GATHER** — Collect information, store findings, update plan 3. **EXECUTE** — Build deliverable using gathered information 4. **VERIFY AND DELIVER** — Confirm completeness, clean up temporary files This skill is mandatory for tasks with 3+ phases, research requirements, or risk of context drift after many tool calls. --- ## Instructions ### Phase 1: CREATE PLAN **Goal**: Establish written plan before any execution begins. **Step 1: Assess complexity** Determine if planning is needed: - 3+ steps or phases required → Plan needed - Research or information gathering involved → Plan needed - Task spans multiple files or systems → Plan needed - Simple lookup or single edit → Skip planning **Why this matters**: Creating a plan takes 30 seconds but saves hours in rework. Plans prevent mid-task goal drift by anchoring decisions to written commitment. Skip this step only for single-file edits or lookups answerable in one response. **Step 2: Create `task_plan.md`** ```markdown # Task Plan: [Brief Description] ## Goal [One sentence describing the end state] ## Phases - [ ] Phase 1: [First phase] - [ ] Phase 2: [Second phase] - [ ] Phase 3: [Third phase] - [ ] Phase 4: [Review and deliver] ## Key Questions 1. [Question to answer before proceeding] ## Decisions Made - [Decision]: [Rationale] ## Errors Encountered - [Error]: [Resolution] ## Status **Currently in Phase 1** - Creating plan ``` **Gate**: `task_plan.md` exists with goal, phases, and key questions defined. Proceed only when gate passes. ### Phase 2: RESEARCH AND GATHER **Goal**: Collect all information needed before execution. **Step 1: Re-read plan** Open `task_plan.md` and read it completely. This is mandatory, not optional. **Why this matters**: After ~50 tool calls, memory degrades. Re-reading restores focus and prevents drift. Claims like "I remember the goal, no need to re-read" are the primary cause of failed complex tasks. **Step 2: Gather information** Search, read, explore. Store all findings in `notes.md`: ```markdown # Notes: [Topic] ## Sources ### Source 1: [Name] - Key points: - [Finding] - [Finding] ## Synthesized Findings ### [Category] - [Finding with context] ``` **Why separate files**: Context window is ephemeral. Files are persistent. Writing findings to `notes.md` immediately ensures they survive context compression. Reference the file by section header when needed rather than keeping all content in working memory. **Step 3: Update plan** Mark Phase 2 complete. Log any decisions made. Update status line. **Gate**: All key questions from Phase 1 answered. Findings stored in `notes.md`. Proceed only when gate passes. ### Phase 3: EXECUTE **Goal**: Build the deliverable using gathered information. **Step 1: Re-read plan and notes** Read `task_plan.md` first, then `notes.md`. Both reads are mandatory before generating output. **Why this matters**: Phase transitions are high-risk points for context drift. Two reads ground execution in both original goals and current findings, preventing divergence from the stated intent. **Step 2: Create deliverable** Build the output artifact. Reference notes for accuracy. Write to the deliverable file. **Step 3: Update plan** Mark Phase 3 complete. Log any errors encountered during execution. **Gate**: Deliverable file exists and addresses the goal stated in the plan. Proceed only when gate passes. ### Phase 4: VERIFY AND DELIVER **Goal**: Confirm deliverable meets the plan's stated goal. **Step 1: Re-read plan one final time** Compare deliverable against original goal and key questions. Every question should be addressed. **Step 2: Verify completeness** Check all verification criteria: - All phases marked `[x]` - All key questions answered - Deliverable matches stated goal - Errors section documents any issues encountered **Why this matters**: "Done" is often an assumption, not a fact. This checklist is a defense-in-depth verification gate. Marks complete only when all criteria pass, not when work "feels done" or "should be done." **Step 3: Deliver and clean up** Present the deliverable. Remove temporary scratch files. Keep `task_plan.md` and deliverable as artifacts. **Gate**: All verification checks pass. Deliverable is complete. --- ## Examples ### Example 1: Research Task User says: "Research morning exercise benefits and write a summary" **Phase 1**: Create `task_plan.md` with goal and 4 phases - Goal: Produce a summary of morning exercise benefits backed by research **Phase 2**: Search sources, store findings in `notes.md` - Create notes.md with "Sources" section (studies, articles) - Create "Synthesized Findings" with categories: mental health, physical health, productivity **Phase 3**: Re-read notes, write `morning_exercise_summary.md` - Reference findings for accuracy **Phase 4**: Verify summary covers all key questions, deliver - Result: Structured summary grounded in documented research ### Example 2: Multi-File Refactoring Plan User says: "Plan the migration from REST to GraphQL" **Phase 1**: Create `task_plan.md` with migration phases - Phase 1: Inventory endpoints and dependencies - Phase 2: Design GraphQL schema - Phase 3: Implement resolvers - Phase 4: Migrate clients - Phase 5: Decommission REST endpoints **Phase 2**: Inventory endpoints, dependencies, store in `notes.md` - Document endpoint mapping to GraphQL queries/mutations - Identify clients and their endpoint usage **Phase 3**: Write `migration_plan.md` with ordered steps - Step 1: Build GraphQL service alongside REST - Step 2: Migrate internal clients first **Phase 4**: Verify all endpoints covered, deliver plan - Result: Actionable migration plan with nothing missed --- ## Error Handling ### Error: "Context Drift — Forgot Original Goal" **Cause**: Too many tool calls without re-reading the plan **Solution**: 1. Immediately read `task_plan.md` 2. Compare current work against stated goal 3. Correct course if diverged 4. Increase re-read frequency for remainder of task ### Error: "Plan Becomes Stale or Inaccurate" **Cause**: New information invalidates original phases or decisions **Solution**: 1. Update plan with new information and revised phases 2. Log the change in Decisions Made with rationale 3. Continue from updated plan ### Error: "Notes File Too Large for Context" **Cause**: Research phase produced more content than fits in attention window **Solution**: 1. Add a "Summary" section at top of `notes.md` with key takeaways 2. Reference specific sections by heading when needed 3. Read only relevant sections, not entire file ### Error: "Task Becomes Unstuck Midway" **Cause**: Required information is missing or deliverable is off-track **Solution**: 1. Stop forward execution 2. Re-read plan to clarify original goal 3. Update plan with new discovery 4. Decide: continue with modified goal, or gather more information 5. Log decision and rationale in plan --- ## References **Standard File Names**: Plans use `task_plan.md`, research notes use `notes.md`, deliverables use domain-specific names (e.g., `migration_plan.md`, `research_summary.md`) **Required Elements**: Every plan must contain Goal (one sentence), Phases (with [ ] checkboxes), Key Questions, and Status line. Without these, the plan provides zero value. **Phase Gate Enforcement**: Never advance to next phase until current phase gate passes. Gates are designed to catch problems early. "Mostly done" phases cause downstream errors. Enforce gates strictly.
Related Skills
pre-planning-discussion
Resolve implementation ambiguities before planning begins.
x-api
Post tweets, build threads, upload media via the X API.
worktree-agent
Mandatory rules for agents in git worktree isolation.
workflow
Structured multi-phase workflows: review, debug, refactor, deploy, create, research, and more.
workflow-help
Interactive guide to workflow system: agents, skills, routing, execution patterns.
wordpress-uploader
WordPress REST API integration for posts and media uploads.
wordpress-live-validation
Validate published WordPress posts in browser via Playwright.
with-anti-rationalization
Anti-rationalization enforcement for maximum-rigor task execution.
voice-writer
Unified voice content generation pipeline with mandatory validation and joy-check. 8-phase pipeline: LOAD, GROUND, GENERATE, VALIDATE, REFINE, JOY-CHECK, OUTPUT, CLEANUP. Use when writing articles, blog posts, or any content that uses a voice profile. Use for "write article", "blog post", "write in voice", "generate content", "draft article", "write about".
voice-validator
Critique-and-rewrite loop for voice fidelity validation.
vitest-runner
Run Vitest tests and parse results into actionable output.
video-editing
Video editing pipeline: cut footage, assemble clips via FFmpeg and Remotion.