Graphic tutorial: Equip Claude Code with Planning with Files and from today/clear will no longer clear your tasks图文教程:给 Claude Code 装上 Planning with Files,从今天起 /clear 不再清空你的任务
Then do it again: install the skill and → send a long task to → see it write out three plan documents → intentionally/clear to verify the recovery and → stop the door to release. About 15 minutes.
跟着做一遍:装技能 → 派一个长任务 → 亲眼看它写出三份计划文件 → 故意 /clear 验证恢复 → 看停止门放行。大约 15 分钟。

Step 1: Install Skills第一步:安装技能
Execute npx skills add OthmanAdi/planning-with-files --skill planning-with-files -g in the terminal, -g indicates that it is a global skill and can be used for all projects.
Claude Code users can also install through the plugin marketplace; the repository docs/installation.md has corresponding methods for other hosts such as Codex, Cursor, OpenCode, etc.
Restart the Claude Code session and the hooks will take effect - you don't need to memorize any new commands after that.
在终端执行 npx skills add OthmanAdi/planning-with-files --skill planning-with-files -g,-g 表示装成全局技能,所有项目都能用。
Claude Code 用户也可以走插件市场安装;仓库 docs/installation.md 里有 Codex、Cursor、OpenCode 等其他宿主的对应方式。
装完重启 Claude Code 会话,钩子随即生效——之后你不需要记任何新命令。

Step 2: Assign a task long enough第二步:派一个足够长的任务
Give it a job that will usually lose half the context, for example, "investigate the test coverage of this warehouse, write a phased plan for supplementary testing and implement it step by step".
Observe the agent's first reaction: it will create three files: task_plan.md (stage and check), findings.md (discovery and decision), and progress.md (operation flow) in the project root directory before starting work.
These three files are its external brain; you open them at any time and see the latest true state of the task, not the state of the agent's “verbal report.”
给它一个平时会做到一半丢上下文的活,例如「调研本仓库的测试覆盖情况,写出补测试的分阶段计划并逐步执行」。
观察代理的第一反应:它会先在项目根目录创建 task_plan.md(阶段与勾选)、findings.md(发现与决策)、progress.md(操作流水)三个文件,再开始干活。
这三个文件就是它的外置大脑;你在任何时刻打开它们,看到的就是任务的最新真实状态,而不是代理「口头汇报」的状态。

Step 3: Deliberately/clear, watch it get up on its own第三步:故意 /clear,看它自己爬起来
At halfway through the task, enter/clear to clear the context - this is the “amnesia moment” for the vast majority of proxy tools.
Then just say "continue with the task": the hook will re-inject the planned state on the disk into the context, the agent can read through the three files and then go to the current stage, no longer understand the project from scratch.
Control and feel the official benchmark: the repositioning after the reset drops from 13.3 rounds to 5.0 rounds, the longer the context and the more complex the task, the more obvious the gap.
任务进行到一半时,输入 /clear 把上下文清空——这是绝大多数代理工具的「失忆时刻」。
接着只说一句「继续刚才的任务」:钩子会把磁盘上的计划状态重新注入上下文,代理读一遍三个文件就能接着当前阶段干,不再从头理解项目。
对照感受一下官方基准:重置后的重新定位从 13.3 轮降到 5.0 轮,上下文越长、任务越复杂,差距越明显。

Step 4: Make good use of stop doors and manual editing第四步:用好停止门与手动编辑
In gated mode, agents are not allowed to announce the closing of work before each stage is completed: there are still unchecked stages in the plan, and stopping the hook will push it back to continue to do - curing the old problem of "saying it is done".
The plan file is ordinary Markdown: you can manually change the stage division and add constraints to the findings.md, and the agent will follow your version in the next round; it is recommended to submit the three files together to git, and the task history can be traced naturally.
Closing check: All tasks_plan.md are checked, and progress.md records are complete, indicating that this task is really closed loop; the next session can be quickly reviewed with/catchup.
门控模式(gated mode)下,代理在每个阶段完成前不允许宣布收工:计划里还有没打勾的阶段,停止钩子就会把它按回去继续干——治好了「嘴上说完事了」的老毛病。
计划文件是普通 Markdown:你可以手动改阶段划分、往 findings.md 里补约束,代理下一轮就以你的版本为准;建议把三个文件一起提交进 git,任务历史天然可追溯。
收尾检查:task_plan.md 全部打勾、progress.md 记录完整,说明这次任务真正闭环了;下个会话用 /catchup 还能快速回看。

Use reminder使用提醒
This article is compiled from public sources and ships with the matching resource. Product features and pricing are subject to the official page. Resources are for learning and exchange only — please respect the original license.
本文整理自公开资料并附上配套资源;涉及产品的功能与价格以官方页面为准。资源仅供学习交流,请遵循来源许可。
⬇ Download · 点击下载:教程配套:Planning with Files v3.25.1 npm 包(186KB)
官方 npm 包,含技能定义与钩子脚本,可按教程安装使用。
阅读与点赞数据保存在你的浏览器本地,欢迎留下你的想法。
今日正能量学一点,用一点;今天种下的种子,会长成明天的能力。去免费下载专区 →广告
评论 文明发言,让讨论更有价值