planning-with-files

planning-with-files is a skill for Claude Code from XRenSiu/claude-code-forge. It costs 108 tokens per session (1,455 once invoked), scanned A, original, MIT.

A Markdown-based system for keeping plans, findings, progress, decisions, and errors in project files. It is designed for complex work that spans many steps, sources, or sessions.

In plain words
What is it for?
Use it to plan coding or research tasks, record discoveries and test results, track errors, and recover the project state in a later session.
Why use it?
It keeps important context on disk instead of relying on the agent's limited working memory. This makes it easier to resume work and avoid repeating mistakes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the pdforge plugin — 10 skills, 13 commands, 5 agents, 2 hooks shipped together

Good fit Use it to plan coding or research tasks, record discoveries and test results, track errors, and recover the project state in a later session.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xrensiu/claude-code-forge/planning-with-files
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add XRenSiu/claude-code-forge --skill planning-with-files
Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install pdforge, the plugin that ships this one along with the rest of its 10 skills, 13 commands, 5 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for planning-with-files

README.md
[![agentmods](https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/planning-with-files/github.svg)](https://agentmods.dev/skills/xrensiu/claude-code-forge/planning-with-files)
Your own site
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/planning-with-files"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/planning-with-files/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for planning-with-files

Your own site · 80×15
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/planning-with-files"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/planning-with-files.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,455 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01455
Opus 5.5 $0.00043 $0.00582
Sonnet 5.5 $0.00022 $0.00291
Haiku 4.5 $0.00011 $0.00145

Measured 1mo ago against content hash a22697eb2882, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

planning-with-files scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/check-complete.ps1, scripts/check-complete.sh, scripts/init-session.ps1, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pdforge/skills/planning-with-files/SKILL.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Planning with Files

核心原则

Context Window = RAM(易失、有限、昂贵)
Filesystem = Disk(持久、无限、便宜)

→ 重要信息写入磁盘,频繁重读保持注意力
→ 错误保留让模型学习,不要隐藏失败

三文件系统

文件 用途 更新时机
task_plan.md 目标、阶段、决策、错误 阶段完成时、做决策时、遇到错误时
findings.md 研究发现、技术笔记 每 2 次 view/browser 后必须更新
progress.md 会话日志、测试结果 开始/结束阶段时、运行测试后

流程

启动任务

  1. 判断任务类型,选择模板:

    • 研究型 → templates/task_plan_research.md
    • 编码型 → templates/task_plan_coding.md
    • 调试型 → templates/task_plan_debug.md
    • 通用型 → templates/task_plan.md
  2. 在项目目录创建三个文件(不是 skill 目录):

    cp ~/.claude/skills/planning-with-files/templates/task_plan.md ./task_plan.md
    cp ~/.claude/skills/planning-with-files/templates/findings.md ./findings.md
    cp ~/.claude/skills/planning-with-files/templates/progress.md ./progress.md
    
  3. 填写 task_plan.md 的 Goal 部分

执行中

5 次规则:每执行 5 次工具调用后,重读 task_plan.md

  • 将目标推到 context 末端,获得更多注意力
  • 防止「Lost in the Middle」效应

2-Action 规则:每 2 次 view/browser 操作后,保存到 findings.md

  • 防止信息只存在于 context 中然后丢失
  • 强制外部化发现

错误追踪:遇到错误立即记录到 task_plan.md 的 Errors 部分

  • 保留失败让模型「看到」
  • 避免重复同样错误

会话恢复(5 问检查)

当 context 被清空或新会话开始时,回答这 5 个问题:

  1. 我在做什么? → 读 task_plan.md 的 Goal
  2. 我做到哪了? → 读 task_plan.md 的 Phases(找 CURRENT 标记)
  3. 我学到了什么? → 读 findings.md
  4. 什么失败过? → 读 task_plan.md 的 Errors
  5. 下一步是什么? → 读 task_plan.md 的当前阶段

上下文压缩(当接近限制时)

  1. 将详细工具结果替换为文件路径
  2. 已完成阶段压缩为单行摘要
  3. 只保留最近 3 次工具结果的完整内容
  4. 其他信息确保已保存到三个文件中

完成任务

  1. 确认所有阶段标记为 [x]
  2. 确认 findings.md 包含所有重要发现
  3. 更新 progress.md 的最终状态
  4. Stop hook 会自动验证

反模式

坏行为 为什么失败 正确做法
不创建计划直接开始 50+ 调用后忘记目标 必须先创建 task_plan.md
信息只放 context context 清空后丢失 写入文件系统
删除/隐藏错误 模型会重复错误 保留错误记录
长时间不重读计划 目标漂移 每 5 次调用重读
研究后不保存发现 信息丢失 每 2 次操作保存
在 skill 目录创建文件 文件位置错误 在项目目录创建

你可能想跳过这个流程

借口 反驳
「任务很简单」 简单任务更容易忘记细节
「我记得目标」 50 次调用后你不会记得
「写文件太慢」 重做比多花 30 秒更慢
「这次是特例」 没有特例,规则就是规则
「用户很急」 目标漂移导致的返工更浪费时间

Read the full file on GitHub · 145 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 145 lines · 108 tokens per session scan A a22697eb2882

Subscribe to this mod's changes

planning-with-files is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 29d ago), licensed MIT. It adds 108 tokens to every session and 1,455 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.