Agent skill · Planning with Files
/planning-with-files Keep agent plans on disk so long tasks survive /clear
planning-with-files treats the context window as volatile memory and the filesystem as durable storage. The agent writes a phased task_plan.md, a findings.md for research and a progress.md log, and hooks bring the selected plan back into context each turn. Optional autonomous and gated modes add hash-checked plans, a ledger and a stop gate for unattended runs.
Works with
- Claude Code
- Any Agent Skills agent
- npm
- Pi Coding Agent
- Hermes Agent
- OpenCode
- DeepSeek Harness
Used forPlanning and specs
When to use it
- A task will take many tool calls or span more than one session.
- You keep losing track of where the agent was after /clear or compaction.
- Several agents or terminals work on separate tasks in the same repository.
How it works
- 1Restore before creating
The agent resolves the plan directory for this task, reads the three files and checks git diff for changes not yet recorded.
- 2Initialise with the script
For new work it runs the bundled init script and keeps each phase as a heading with exactly one pending, in-progress or complete status line, then validates the format.
- 3Write as you go
Findings are saved after every two viewing or search actions, progress is logged throughout, and the next step is refreshed whenever a phase changes.
- 4Handle errors in three strikes
Each failure is recorded; the agent fixes, then tries a different method, then rethinks, and after three failures explains what it tried and asks you.
- 5Finish against the plan
Completion is judged from the plan file, and in gated mode the stop is held only while a phase is still marked in progress.
What it steers the agent away from
- Relying on an in-context to-do list that disappears on reset
- Retrying the same failing action without changing approach
- Copying untrusted web content into the plan file that hooks re-inject
Install this skill
It installs with the Planning with Files pack.
Claude Code (plugin)Ships the skill, all hooks and the slash commands such as /plan and /plan-doctor.
/plugin marketplace add OthmanAdi/planning-with-files
/plugin install planning-with-files@planning-with-filesAny Agent Skills agentOne line for 60+ agents; slash commands are not included and hooks depend on the host.
npx skills add OthmanAdi/planning-with-files --skill planning-with-files -gnpmPins a version into a project; it does not register hooks by itself.
npm install planning-with-filesPi Coding AgentAdds the skill plus a Pi extension with its own commands and status bar.
pi install npm:planning-with-filesHermes AgentInstalls the skill bundle and the native plugin for CLI and Desktop.
hermes skills install OthmanAdi/planning-with-files/.hermes/skills/planning-with-files --yes
hermes plugins install OthmanAdi/planning-with-files/.hermes/plugins/planning-with-files
hermes plugins enable planning-with-filesOpenCodeAdd this to opencode.json alongside the npx skill install; OpenCode fetches the plugin on next start.
{ "plugin": ["opencode-planning-with-files"] }DeepSeek HarnessRestart dsh web afterwards; the same command works for other profiles.
dsh plugin --profile web add dsh-planning-with-filesCommands come from the author’s README; check it for changes before you run them.
Questions
Can two agents work on different tasks in one repo?
Yes. Each task gets its own named plan under .planning/, and you pin each agent to it with the PLAN_ID variable or use separate worktrees.
What stops a tampered plan from steering the agent?
Plan content is wrapped in data delimiters, and you can lock the approved plan with a SHA-256 attestation so hooks refuse to inject a changed body. The skill notes this is tamper detection, not a full defence against prompt injection.
Summary by trendhub. The skill itself lives in OthmanAdi/planning-with-files/skills/planning-with-files by Ahmad-Othman Adi (MIT); read the full, current text there.