CLAUDE.md Coding Discipline Rules
Writes or merges a CLAUDE.md that stops Claude Code from over-engineering, rewriting files, and claiming unverified work is done.
Before & after
Same prompt, same agent — the only difference is the skill.
That's a common frustration. Generally, you want to think before coding, make surgical edits instead of rewriting files, focus on the specific problem at hand, and avoid gold-plating. Being more deliberate about scoping your changes helps. You might try defining the exact change before you code, reviewing diffs carefully, and staying goal-driven.
Installs a one-file markdown that upgrades Claude Code default behavior: THINK FIRST: reasoning before code, SURGICAL EDITS: targeted replacements, not rewrites, GOAL-DRIVEN WORK: solve the stated problem, skip nice-to-haves, ALTITUDE CHECK: is this at the right layer, SIMPLICITY BIAS: fewer lines win, ASSUMPTION AUDIT: verify before coding, and CHANGE MINIMALISM: edit one file, make one change. The rules are always-on once installed, unlike triggered skills. Merges cleanly with existing CLAUDE.md files. Side-by-side tests show cleaner diffs and more focused edits. Pairs well with other coding disciplines. For any Claude Code user.
About this skill
Claude Code rewrites whole files to change one line, adds features you never asked for, and says "tests pass" when it never ran them. Pasting a generic rule list into CLAUDE.md rarely helps, because rules like "write simple code" are virtues the model already thinks it follows. This skill turns each annoyance into a concrete trigger-and-action rule and merges it into your existing file without losing your project notes.
What it does
- Maps your specific complaints (sprawling diffs, unrequested refactors, fake "done") to short behavioral rules Claude can actually check itself against
- Merges into your existing CLAUDE.md, keeping build commands and architecture notes verbatim and listing what was cut and why
- Finds contradictions ("refactor freely" vs "keep diffs minimal") and resolves them with an explicit precedence line
- Keeps the file lean so rules stay obeyed, moving detail to subdirectory files or imports when it grows
- Flags rules that need real enforcement and suggests hooks or permissions for them, because CLAUDE.md is guidance, not a guarantee
- Uses placeholders for your test, lint, and typecheck commands instead of guessing them
What you get
A ready-to-paste CLAUDE.md working-rules block or a merged file, with a short change log, a placement note (user vs project vs subdirectory), and any hook recommendations.
Best for
Claude Code users and teams whose AI-generated diffs are too big to review, or who keep re-typing the same corrections every session.
SKILL.md preview
---
name: claude-md-coding-discipline-rules
description: Writes or merges an always-on CLAUDE.md that makes Claude Code think before coding, keep changes minimal and surgical, and prove work is done. Each rule is phrased as a concrete, checkable behavior instead of a virtue, and the file is kept short enough to stay obeyed. Use when the user says "write a CLAUDE.md for this repo", "add coding rules to my CLAUDE.md", "Claude keeps rewriting whole files", "it adds features I never asked for", "my diffs are huge and unreviewable", "it says done but the tests fail", or "make Claude stop over-engineering".
---
# CLAUDE.md Coding Discipline Rules
… (sign up to view the full skill)More development skills
View all Development skills →Performance Bottleneck Profiling: Node, Python, Go
Classifies a slowdown, gives exact profiler commands, reads the output, and proves the fix with same-conditions p95/p99 numbers.
Feature Scaffolding with Working Tests
Turn a short feature spec into code, runnable tests, and integration wiring that match your existing project.
Feature Flag Rollouts and Kill Switches
Design staged flag rollouts, verify rollback paths, and audit flag debt with explicit defaults, gates, and retirement plans.
Microcontroller Firmware and RTOS Engineering
Build and debug MCU firmware with bounded ISR/RTOS timing, safe DMA ownership, and measured power budgets.