agentleFS
swestfall21swestfall21/claude-skills/plan-before-implementation/SKILL.md

plan-before-implementation

Skill0 starsChanged 4 months agoMITView on GitHub

Explore the code, write a short plan, and define verification before writing any code on a nontrivial task. Use when a task touches multiple files, unfamiliar code, or has more than one plausible approach.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the code the change will touch and the code that calls it.

    line 16
  2. Distinctive:

    Keep it short — a plan that takes longer to write than to obsolete is too long.

    line 22
  3. Distinctive:

    Before writing code, decide how you will prove it works: the command to run, the endpoint to hit, the test to add.

    line 31
  4. Distinctive:

    When implementation reveals the plan was wrong, update the plan — don't force the code to follow a broken map.

    line 35
  5. Distinctive:

    Don't gold-plate: the plan defines done.

    line 36
  6. Distinctive:

    Do not start a multi-file change without naming the files and the order.

    line 40
  7. Distinctive:

    Do not write the plan after the code as documentation theater.

    line 41
  8. Distinctive:

    Do not carry an invalidated plan forward silently.

    line 42
  9. Distinctive:

    Do not plan past the point of usefulness — the plan serves the change, not the reverse.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Plan before implementation

The most expensive code is code written before the problem was understood. A ten-minute plan routinely saves an hour of rework — but only for tasks that need one.

When to plan (and when not to)

Plan when the task touches multiple files, crosses a module boundary, has more than one plausible approach, or lives in code you haven't read. Skip the ritual for a one-file fix with an obvious shape — planning a trivial change is its own form of waste.

Explore before deciding

  • Read the code the change will touch and the code that calls it. The existing structure usually dictates the approach.
  • Find the analogous feature: how does this codebase already do the closest similar thing? That pattern is your default.
  • Identify what you don't know — an unfamiliar dependency, an unclear data flow — and resolve it by reading, not by assuming.

Write the plan down

Keep it short — a plan that takes longer to write than to obsolete is too long. It should name:

  • The approach in one or two sentences, and the main alternative you rejected.
  • The files to touch and roughly what changes in each.
  • The order of changes, if order matters (structural change first, behavior second).
  • The risks: what could this break, and where would that show up?

Define verification up front

Before writing code, decide how you will prove it works: the command to run, the endpoint to hit, the test to add. If you cannot name the verification, you do not yet understand the task. This is the single highest-value line in the plan.

Hold the plan loosely

  • When implementation reveals the plan was wrong, update the plan — don't force the code to follow a broken map. Say what changed and why.
  • Don't gold-plate: the plan defines done. Work beyond it is scope creep, however tempting.

Non-negotiables

  • Do not start a multi-file change without naming the files and the order.
  • Do not write the plan after the code as documentation theater.
  • Do not carry an invalidated plan forward silently.
  • Do not plan past the point of usefulness — the plan serves the change, not the reverse.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.