agentleFS
randommoniclerandommonicle/claude-skills/plan-first/SKILL.md

plan-first

Skill27 starsChanged 17 days agoApache-2.0View on GitHub

State the file list, test list, and out-of-scope items before writing code on any non-trivial commit. Triggers on requests to implement a feature, add a schema-touching change, build a new module, or perform a multi-file refactor. Skip on trivial one-line fixes and doc typo corrections.

11 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 7

    Distinctive

    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:

    If unsure whether a commit qualifies, treat it as non-trivial and produce the plan.

    line 26
  2. Distinctive:

    New files: Every file that will be created, with its purpose in one line.

    line 30
  3. Distinctive:

    Modified files: Every existing file that will be touched, with what changes.

    line 31
  4. Distinctive:

    After producing the plan, stop.

    line 38
  5. Distinctive:

    If the project has additional plan-first requirements (migration verification queries, competitor-parity audits, UX rule enumeration, …

    line 40
  6. Distinctive:

    If the user proceeds without explicit confirmation language but with substantive feedback on the plan, treat that feedback as the go-ahead …

    line 42
  7. Distinctive:

    Surface the scope fork mid-build: When implementation reveals the spec's premise is shaky, stop and put the fork to the user.

    line 55

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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 code

On any non-trivial commit, state the plan explicitly before writing any code. Wait for the user's confirmation before touching files.

When this applies

This skill fires on:

  • New features
  • Schema-touching changes (migrations, type definitions)
  • Multi-file refactors
  • Any work that creates new files or modifies more than two existing files
  • Work where the right shape is not yet obvious from the user's request

This skill does not fire on:

  • One-line bug fixes
  • Doc typo corrections
  • Trivial config tweaks where the change is fully specified by the user's request

If unsure whether a commit qualifies, treat it as non-trivial and produce the plan. The cost of a plan-first gate on a small commit is one round-trip; the cost of skipping it on a large one is rework.

What the plan must contain

  1. New files. Every file that will be created, with its purpose in one line.
  2. Modified files. Every existing file that will be touched, with what changes.
  3. Out-of-scope items. Anything the user might reasonably expect to be in this commit but is deliberately deferred. Each deferred item should be flagged per the flag-deferred-items skill (plant a grep-able anchor at the future landing point).
  4. Test list. Concrete test names with one-line descriptions per test. Not categories; named tests.
  5. Decisions or rules to record. Any design call that should land in a DECISIONS file or equivalent. Cite the project's convention.

How to apply

After producing the plan, stop. Wait for explicit go-ahead before writing code.

If the project has additional plan-first requirements (migration verification queries, competitor-parity audits, UX rule enumeration, etc.), the project-level CLAUDE.md or project memory will name them. Read those before producing the plan so the plan contains everything the project requires.

If the user proceeds without explicit confirmation language but with substantive feedback on the plan, treat that feedback as the go-ahead conditional on the changes they named.

Why

Drift in long sessions is a dominant failure mode. Stating the plan upfront forces alignment before the cost of writing code is sunk, and lets the user redirect cheaply. The pattern compounds: a plan-first gate at commit boundaries also surfaces deferred items, naming conventions, and test shape before they get baked into code that has to be unpicked later.

Additions from cross-repo lessons (ratified 2026-07-23)

  • Plan step zero is a grep: does this already exist? A schema grep killed a full migration that duplicated live columns; a planned Edge Function turned out to be already-live RLS. Grep before designing, not just before writing SQL.
  • When an estimate exceeds a session, propose two or three concrete split strategies, not "should I split?" — the user picks a shape, not a yes/no.
  • Surface the scope fork mid-build. When implementation reveals the spec's premise is shaky, stop and put the fork to the user; never silently build around it.

Routes

  • The plan changes X "in A and B", adds a gate/constraint, or drops/renames anything → load blast-radius-grep before sizing.
  • The plan asserts an invariant in prose ("single source of truth", "never auto-X") → load enforce-invariants-in-build.
  • Anything is deferred or out of scope → flag-deferred-items (as already required above).
  • The plan adds anything recurring (a schedule, cron, poll, keep-warm, always-on compute, a paid tier) → load price-the-spend and put the monthly cost in the plan.
  • Structure is proposed for "flexibility", "future-proofing", or "best practice" rather than a present requirement, or the instruction is "simplify" → load earn-every-line.

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.