跳到主要内容
知仓学习社ZHICANG

planning-with-files

>-

不碰外部(只输出文字)无严重或高危命中trailofbits/skills-curated

它会碰到什么

扫了多少4 个文本文件,13 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Planning with Files

Use persistent markdown files as working memory on disk.

Quick Start

  1. Create planning files -- use /plan or create manually from

[templates](references/templates.md)

  1. Create task_plan.md with goal, phases, and key questions
  2. Create findings.md for research and decisions
  3. Create progress.md for session logging
  4. Re-read the plan before decisions -- refreshes goals in attention
  5. Update after each phase -- mark status, log errors

When to Use

  • Multi-step tasks (3+ phases)
  • Research projects requiring many searches
  • Building or creating projects with multiple files
  • Tasks spanning many tool calls (>10)
  • Any work where losing track of goals would be costly
  • Tasks that may span multiple sessions

When NOT to Use

  • Simple questions or quick lookups
  • Single-file edits with obvious scope
  • Tasks completable in under 5 tool calls
  • Conversational exchanges without implementation

Core Pattern

Context Window = RAM (volatile, limited)
Filesystem     = Disk (persistent, unlimited)

Anything important gets written to disk.

After many tool calls, the original goal drifts out of the attention

window. Reading task_plan.md brings it back. This is the single

most important pattern in file-based planning.

File Purposes

| File | Purpose | When to Update |

|------|---------|----------------|

| task_plan.md | Phases, progress, decisions | After each phase completes |

| findings.md | Research, discoveries, decisions | After ANY discovery |

| progress.md | Session log, test results | Throughout the session |

All three files go in the project root, not the plugin directory.

Critical Rules

1. Create Plan First

Never start a complex task without task_plan.md. This is

non-negotiable. The plan is your persistent memory.

2. The 2-Action Rule

After every 2 search, browse, or read operations, immediately save

key findings to findings.md. Multimodal content (images, browser

results, PDF contents) does not persist in context -- capture it as

text before it is lost.

3. Read Before Decide

Before any major decision, re-read task_plan.md. This pushes

goals and context back into the recent attention window, counteracting

the "lost in the middle" effect that occurs after ~50 tool calls.

[Original goal -- far away in context, forgotten]
...many tool calls...
[Recently read task_plan.md -- gets ATTENTION]
→ Now make the decision with goals fresh in context

4. Update After Act

After completing any phase:

  • Mark phase status: in_progress -> complete
  • Log any errors encountered in the Errors table
  • Note files created or modified in progress.md

5. Log ALL Errors

Every error goes in task_plan.md. Include the attempt number and

resolution. This builds knowledge and prevents repeating failures.

## Errors Encountered
| Error | Attempt | Resolution |
|-------|---------|------------|
| FileNotFoundError | 1 | Created default config |
| API timeout | 2 | Added retry logic |

6. Never Repeat Failures

If an action failed, the next action must be different. Track what

you tried and mutate the approach.

if action_failed:
    next_action != same_action

3-Strike Error Protocol

ATTEMPT 1: Diagnose & Fix
  -> Read error carefully
  -> Identify root cause
  -> Apply targeted fix

ATTEMPT 2: Alternative Approach
  -> Same error? Try a different method
  -> Different tool? Different library?
  -> NEVER repeat the exact same failing action

ATTEMPT 3: Broader Rethink
  -> Question assumptions
  -> Search for solutions
  -> Consider updating the plan

AFTER 3 FAILURES: Escalate to User
  -> Explain what you tried (with attempt log)
  -> Share the specific error
  -> Ask for guidance

Read vs Write Decision Matrix

| Situation | Action | Reason |

|-----------|--------|--------|

| Just wrote a file | Don't read it | Content still in context |

| Viewed image/PDF | Write findings NOW | Multimodal content doesn't persist |

| Browser returned data | Write to file | Screenshots don't persist |

| Starting new phase | Read plan/findings | Re-orient if context is stale |

| Error occurred | Read relevant file | Need current state to fix |

| Resuming after gap | Read all planning files | Recover full state |

5-Question Reboot Test

If you can answer these from your planning files, context is solid:

| 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 |

Anti-Patterns

| Don't | Do Instead |

|-------|------------|

| State goals once and forget | Re-read plan before decisions |

| Hide errors and retry silently | Log every error to plan file |

| Stuff everything in context | Store large content in files |

| Start executing immediately | Create plan file FIRST |

| Repeat failed actions | Track attempts, mutate approach |

| Create files in plugin directory | Create files in project root |

References

  • [Templates](references/templates.md) -- starter templates for all

three planning files

  • [Principles](references/principles.md) -- context engineering

principles behind this approach

  • [Examples](references/examples.md) -- concrete examples and error

recovery patterns

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 503
本站分层T2
该仓技能数31
原文件路径plugins/planning-with-files/skills/planning-with-files/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 31 个技能