planning-with-files
Skill592 starsChanged 9 months agoMITView on GitHub
**USE THIS FOR COMPLEX TASKS.** Implements Manus-style file-based planning for multi-step tasks. Creates task_plan.md, findings.md, and progress.md in .agent_cache/<task-name>/. Use when: implementing multiple APIs, refactoring modules, research tasks, or ANY task requiring >5 tool calls.
We split this skill into the rules it gives an agent
10 rules. 3 are common, 4 are distinctive, and 3 are very specific to this project.
3
Common
Most of the 63 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
All planning files go in .agent_cache/<task-name>/:
- Very specific: line 55
Use lowercase with hyphens for <task-name>
- Very specific: line 90
Never start a complex task without task_plan.md.
- Common: line 98
Before major decisions, read the plan file.
- Common: line 101
After completing any phase:
- Common: line 107
Every error goes in the plan file.
- Distinctive: line 346
When implementing REST API wrappers, include in findings.md:
- Distinctive: line 394
After finishing all work:
- Distinctive: line 409
When resuming work, verify you can answer:
- Distinctive: line 419
If you can't answer these, read all 3 planning files before continuing.
“Common” is measured: kept by at least 6 in 10 of the 63 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Planning with Files
Work like Manus: Use persistent markdown files as your "working memory on disk." This skill helps you plan, track, and checkpoint complex tasks that span multiple files, APIs, or sessions.
WHEN TO USE THIS SKILL
ALWAYS use this skill when:
- Task involves 3+ phases or steps
- Implementing wrappers for multiple REST APIs
- Migrating or refactoring code across multiple files
- Research tasks requiring exploration
- Any task requiring >5 tool calls
- Work that may span multiple sessions
- Tasks with dependencies between components
Skip this skill for:
- Simple questions or quick lookups
- Single-file edits
- Tasks completable in 1-2 tool calls
The Core Principle
Context Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)
-> Anything important gets written to disk.
-> After ~50 tool calls, you FORGET original goals.
-> Re-reading plan files keeps goals in your attention window.File Structure
All planning files go in .agent_cache/<task-name>/:
.agent_cache/
└── <task-name>/
├── task_plan.md # Phases, progress, decisions (YOUR ROADMAP)
├── findings.md # Research, discoveries, technical decisions
└── progress.md # Session log, test results, files modifiedNaming Convention
- Use lowercase with hyphens for
<task-name> - Be descriptive but concise
- Examples:
.agent_cache/add-admin-apis/.agent_cache/migrate-lakehouse-module/.agent_cache/add-direct-lake-functions/
The 3-File Pattern
| File | Purpose | When to Update |
task_plan.md | Phases, progress, current status | After each phase completes |
findings.md | Research, discoveries, decisions | After ANY discovery |
progress.md | Session log, test results, errors | Throughout session |
Quick Start: Before ANY Complex Task
# 1. Create the planning directory
mkdir -p .agent_cache/<task-name>
# 2. Create all 3 files using templates below
# 3. Re-read plan before major decisions
# 4. Update after each phase completesCritical Rules
Rule 1: Create Plan FIRST
Never start a complex task without task_plan.md. Non-negotiable.
Rule 2: The 2-Action Rule
"After every 2 view/search/explore operations, IMMEDIATELY save key findings to files."
This prevents information from being lost as context grows.
Rule 3: Read Before Decide
Before major decisions, read the plan file. This pushes goals into your attention window.
Rule 4: Update After Act
After completing any phase:
- Mark phase status:
in_progress->complete - Log files created/modified
- Note any errors encountered
Rule 5: Log ALL Errors
Every error goes in the plan file. This builds knowledge and prevents repetition.
Rule 6: Never Repeat Failures
if action_failed:
next_action != same_actionTrack what you tried. Mutate the approach.
The 3-Strike Error Protocol
ATTEMPT 1: Diagnose & Fix
-> Read error carefully
-> Identify root cause
-> Apply targeted fix
ATTEMPT 2: Alternative Approach
-> Same error? Try different method
-> Different tool? Different pattern?
-> NEVER repeat exact same failing action
ATTEMPT 3: Broader Rethink
-> Question assumptions
-> Search for solutions (use github-repo-explore skill)
-> Consider updating the plan
AFTER 3 FAILURES: Escalate to User
-> Explain what you tried
-> Share the specific error
-> Ask for guidanceWorkflow: The Agent Loop
+--------------------------------------------+
| 1. READ PLAN |
| - cat .agent_cache/<task>/task_plan.md |
| - Understand current phase |
| - Review goals |
+--------------------------------------------+
| 2. ANALYZE |
| - What's the next task? |
| - Are there blockers? |
| - Do I have what I need? |
+--------------------------------------------+
| 3. EXECUTE |
| - Perform ONE logical action |
| - Write code to files |
| - Run tests |
+--------------------------------------------+
| 4. UPDATE FILES |
| - Log progress in progress.md |
| - Save discoveries in findings.md |
| - Update status in task_plan.md |
+--------------------------------------------+
| 5. REPEAT |
| - Read plan again before next phase |
+--------------------------------------------+Template: task_plan.md
# Task Plan: [Brief Description]
## Goal
[One clear sentence describing the end state]
## Current Phase
Phase 1
## Guidelines
<!-- Project-specific constraints and references -->
- Follow numpydoc style for docstrings
- Use `@log` decorator for all public functions
- Use `_base_api` helper for REST calls
- Reference: [add-function skill](../../.claude/skills/add-function/SKILL.md)
- Reference: [rest-api-patterns skill](../../.claude/skills/rest-api-patterns/SKILL.md)
---
## Phases
### Phase 1: Requirements & Discovery
- [ ] Understand user intent and scope
- [ ] Identify files/APIs involved
- [ ] Document findings in findings.md
- **Status:** in_progress
### Phase 2: Dependency Analysis
- [ ] Map dependencies between components
- [ ] Determine implementation order
- [ ] Update plan with detailed tasks
- **Status:** pending
### Phase 3: Implementation
- [ ] Implement each component in order
- [ ] Write code following project conventions
- [ ] Document decisions in findings.md
- **Status:** pending
### Phase 4: Testing
- [ ] Write unit tests (see write-tests skill)
- [ ] Run tests with `pytest -sv tests/ -k <test_name>`
- [ ] Document results in progress.md
- **Status:** pending
### Phase 5: Completion
- [ ] Run code style checks: `black src/sempy_labs tests && flake8 src/sempy_labs tests`
- [ ] Verify all checkboxes complete
- [ ] Mark directory as done
- **Status:** pending
---
## Errors Encountered
| Error | Attempt | Resolution |
|-------|---------|------------|
| | | |
---
## Decisions Made
| Decision | Rationale |
|----------|-----------|
| | |Template: findings.md
# Findings & Decisions
## Task
[Brief description of the task]
---
## Requirements
<!-- Captured from user request -->
-
## Research Findings
<!-- Key discoveries during exploration -->
<!-- UPDATE AFTER EVERY 2 SEARCH/EXPLORE OPERATIONS -->
-
## Code Patterns Found
<!-- Existing patterns in codebase to follow -->
| Pattern | Location | Usage |
|---------|----------|-------|
| | | |
## Technical Decisions
| Decision | Rationale |
|----------|-----------|
| | |
## Files to Modify
| File | Change |
|------|--------|
| | |
## API/Function Inventory
<!-- For API wrapper tasks -->
| Function | Source | Status |
|----------|--------|--------|
| | | |
## Issues Encountered
| Issue | Resolution |
|-------|------------|
| | |
## External References
<!-- Links to docs, GitHub repos, etc. -->
-Template: progress.md
# Progress Log
## Session: [DATE]
### Phase 1: [Title]
- **Status:** in_progress
- **Started:** [timestamp]
- Actions taken:
-
- Files created/modified:
-
### Phase 2: [Title]
- **Status:** pending
- Actions taken:
-
- Files created/modified:
-
---
## Test Results
| Test | Expected | Actual | Status |
|------|----------|--------|--------|
| | | | |
---
## Commands Run
```bash
# Useful commands executed during this sessionSession Notes
<!-- Any observations, blockers, or context for next session -->
---
## Project-Specific Patterns
### For Semantic Link Labs API Wrapper Tasks
When implementing REST API wrappers, include in findings.md:
```markdown
## API Analysis
| API | Fabric Path | Power BI Path | Notes |
|-----|-------------|---------------|-------|
| list_items | /v1/workspaces/{id}/items | /v1.0/myorg/groups/{id}/... | Paginated |
## Implementation Pattern
- Use `_base_api` helper for all REST calls
- Use `resolve_workspace_name_and_id` for workspace resolution
- Use `_create_dataframe` for empty DataFrame initialization
- Return `pandas.DataFrame` for list operations
## Required Decorator
- `@log` -- Enable logging and telemetry
## Function Naming
| Prefix | Use Case |
|--------|----------|
| `list_` | Retrieves a collection |
| `get_` | Retrieves a single item |
| `create_` | Creates a new resource |
| `update_` | Modifies existing resource |
| `delete_` | Removes a resource |For Test Writing Tasks
Include in findings.md:
## Test Structure
| Type | Location |
|------|----------|
| Unit tests | tests/ |
## Key Patterns
- Use `pytest.mark.parametrize` for multiple inputs
- Mock `_base_api` for API wrapper tests
- Use `_create_dataframe` to verify empty DataFrame structure
- See write-tests skill for full patternsCompletion Workflow
After finishing all work:
# 1. Verify all checkboxes are marked complete
grep -c "\[x\]" .agent_cache/<task-name>/task_plan.md
grep -c "\[ \]" .agent_cache/<task-name>/task_plan.md
# 2. Rename directory with [done] suffix
mv .agent_cache/<task-name> .agent_cache/<task-name>-[done]The 5-Question Reboot Test
When resuming work, verify you can answer:
| Question | Answer Source |
| Where am I? | Current phase in task_plan.md |
| Where am I going? | Remaining phases |
| What's the goal? | Goal statement in plan |
| What have I learned? | findings.md |
| What have I done? | progress.md |
If you can't answer these, read all 3 planning files before continuing.
Read vs Write Decision Matrix
| Situation | Action | Reason |
| Just wrote a file | DON'T read | Content still in context |
| After 2+ searches | Write findings NOW | Before info is lost |
| Starting new phase | Read plan/findings | Re-orient context |
| Error occurred | Read relevant file | Need current state |
| Resuming after gap | Read ALL planning files | Recover state |
| Before major decision | Read task_plan.md | Refresh goals |
Anti-Patterns
| Don't | Do Instead |
| Start executing immediately | Create plan file FIRST |
| State goals once and forget | Re-read plan before decisions |
| Hide errors and retry silently | Log errors to plan file |
| Stuff everything in context | Store large content in files |
| Repeat failed actions | Track attempts, mutate approach |
| Skip testing | Always include test tasks |
Example: Adding Admin API Wrappers
task_plan.md
# Task Plan: Add Admin Workspace APIs
## Goal
Implement wrapper functions for Fabric Admin Workspace APIs in the sempy_labs.admin module.
## Current Phase
Phase 3
## Guidelines
- Use `@log` decorator on all public functions
- Use `_base_api` helper for REST calls
- Reference: add-function skill, rest-api-patterns skill
---
## Phases
### Phase 1: Requirements & Discovery
- [x] Read Fabric Admin API documentation
- [x] Identify workspace-related endpoints
- [x] Document in findings.md
- **Status:** complete
### Phase 2: Dependency Analysis
- [x] Check existing workspace implementations
- [x] Create function inventory
- **Status:** complete
### Phase 3: Implementation
- [x] `list_workspaces`
- [x] `get_workspace`
- [ ] `list_workspace_access_details`
- [ ] `update_workspace`
- **Status:** in_progress
### Phase 4: Testing
- [ ] Write unit tests with mocks
- [ ] Run tests
- **Status:** pending
### Phase 5: Completion
- [ ] Run black, flake8
- [ ] Verify all tests pass
- **Status:** pending
---
## Errors Encountered
| Error | Attempt | Resolution |
|-------|---------|------------|
| Pagination not working | 1 | Need uses_pagination=True in _base_api |Related Skills
| Skill | When to Use |
| add-function | Adding new API wrapper functions |
| rest-api-patterns | REST API implementation patterns |
| write-tests | Writing unit tests |
| code-style | Running linters and formatters |
| run-tests | Running pytest locally |
| github-repo-explore | Finding reference implementations |
Other versions66 projects use a version of this.
Word for word · 0
None found.
Edited · 46
- OthmanAdi/planning-with-files★ 28k16% same
- Galaxy-Dawn/claude-scholar★ 5.9k11% same
- mxyhi/ok-skills★ 50619% same
- involvex/youtube-music-cli★ 46135% same
- xuzeyu91/WebCode★ 27812% same
- YYH211/Claude-meta-skill★ 27412% same
- junevm/splathash★ 20827% same
- xiaoyuge886/aigc★ 19829% same
- cohen-liel/hivemind★ 10826% same
- liangdabiao/lark-workflow-feishu-cli★ 6643% same
36 more not listed
Wrote their own version · 20
- cooragent/ClarityFinance★ 62same name
- georgekhananaev/claude-skills-vault★ 28same name
- Tairitsua/Monica★ 13same name
- sefaertunc/Worclaude★ 4same name
- idexal/idexal-skills★ 2same name
- andr-ca/agentharness★ 1same name
- daviszhen/agent-skills★ 1same name
- Dev-PGVAA/skills★ 1same name
- hmu332233/skills★ 1same name
- sefaertunc/anthropic-watch★ 1same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use context-management, react-best-practices and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
stateofthehartSkillcontext-management
This skill should be used when the conversation is getting long, context feels bloated, Claude mentions compaction or context limits, the user asks about "context", "pruning", "memory", "compaction", or when Claude notices tool outputs are very large. Also activate when resuming a session, starting a large task, or when the user says "clean up", "compress", or "prune".
Also in 3 projects that use this
OpenAISkillreact-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Also in 5 projects that use this
XIYBHKSkillhuashu-design
花叔Design(Huashu-Design)——用HTML做高保真原型、交互Demo、幻灯片、动画、设计变体探索+设计方向顾问+专家评审的一体化设计能力。HTML是工具不是媒介,根据任务embody不同专家(UX设计师/动画师/幻灯片设计师/原型师),避免web design tropes。触发词:做原型、设计Demo、交互原型、HTML演示、动画Demo、设计变体、hi-fi设计、UI mockup、prototype、设计探索、做个HTML页面、做个可视化、app原型、iOS原型、移动应用mockup、导出MP4、导出GIF、60fps视频、设计风格、设计方向、设计哲学、配色方案、视觉风格、推荐风格、选个风格、做个好看的、评审、好不好看、review this design。**主干能力**:Junior Designer工作流(先给假设+reasoning+placeholder再迭代)、反AI slop清单、React+Babel最佳实践、Tweaks变体切换、Speaker Notes演示、Starter Components(幻灯片外壳/变体画布/动画引擎/设备边框)、App原型专属守则(默认从Wikimedia/Met/Unsplash取真图、每台iPhone包AppPhone状态管理器可交互、交付前跑Playwright点击测试)、Playwright验证、HTML动画→MP4/GIF视频导出(25fps基础 + 60fps插帧 + palette优化GIF + 6首场景化BGM + 自动fade)。**需求模糊时的Fallback**:设计方向顾问模式——从5流派×20种设计哲学(Pentagram信息建筑/Field.io运动诗学/Kenya Hara东方极简/Sagmeister实验先锋等)推荐3个差异化方向,展示24个预制showcase(8场景×3风格),并行生成3个视觉Demo让用户选。**交付后可选**:专家级5维度评审(哲学一致性/视觉层级/细节执行/功能性/创新性各打10分+修复清单)。
Also in 3 projects that use this
JetBrainsSkillwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Also in 11 projects that use this
AnthropicSkillweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Also in 5 projects that use this
huangservaSkillhumanizer-zh
Also in 3 projects that use this
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-functionSkill
- build-docsSkill
- code-styleSkill
- dax-optimizationSkill
- direct-lake-operationsSkill
- github-repo-exploreSkill
- pr-review-commentsSkill
- query-builder-daxSkill
- rest-api-patternsSkill
- run-testsSkill
- sql_to_daxSkill
- tom-operationsSkill
- ui-stylingSkill
- write-testsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

