Skip to content
SlashClone

Dev prod parity rule

@slashclone/dev-prod-parity-rule

A CLAUDE.md rule that keeps development and production behaving the same: prefer explicit environment flags over NODE_ENV checks, and write down every unavoidable difference in the deploy guide in the same change.

CLAUDE.mdDevOpsv0.1.0 (latest)
Activity
New: be the first to try it

How this works

  1. It is a CLAUDE.md file: standing instructions Claude reads at the start of every session in a project.
  2. While it works, it reads and changes files in the places it lists, nowhere else.
  3. Nothing runs until you choose to use it, and you can remove it any time.

SKILL.md

Dev and production parity rule

  1. Read the project's CLAUDE.md (create it at the repo root if there is none).
  2. Add the "Dev and production parity" section from this kit's CLAUDE.md, unless an equivalent rule is already there.
  3. If the project has a deploy guide, add an empty "Dev and production differences" table to it (what differs, why, how to run the production behavior locally), and fill in any differences you can see today, such as NODE_ENV checks.
  4. Show the person the change before saving it.

CLAUDE.md

Dev and production parity

  • Development and production behave the same. Bugs that only happen in production are the expensive kind.
  • Prefer an explicit environment flag (for example FEATURE_X=off) over checking NODE_ENV, so a behavior can be turned on or off the same way everywhere.
  • When a difference cannot be avoided (local file storage, a test mail sink, relaxed rate limits), document it in the deploy guide, in a "Dev and production differences" table: what differs, why, and how to run the production behavior locally. Do it in the same change that adds the difference.
  • Before finishing a task that touches configuration, search for new NODE_ENV checks and either replace them with a flag or add them to the table.

Files

  • CLAUDE.md
  • SKILL.md
  • kit.json

Did it work?

0worked for them0did not work

Sign in to say whether it worked for you.

Nobody has said yet. Tried it? Tell the next person.