You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussion: What rules have YOU added to your CLAUDE.md?
I want to crowdsource the best rules this community has written. Drop yours below — we'll build a living reference that new SpecLock / Claude Code / Cursor users can copy from.
Format
For each rule, please share:
The rule (exact text from your CLAUDE.md)
Why you added it (what drift it prevents)
The category (architecture, tests, deps, process, security, etc.)
I'll start
Architecture
Rule: Always use the repository pattern for database access. Never call the ORM directly from route handlers or service layers — go through repositories/.
Why: Claude kept inlining raw Prisma calls into route handlers "because it's shorter." Six weeks later we had no consistent place to add query logging, caching, or tenant scoping.
Tests
Rule: Never delete a test. If a test is flaky, mark it with .skip and open an issue. Deleting tests is a human-only decision.
Why: AI tools love to delete "broken" tests as part of "cleanup." That's how bugs ship.
Dependencies
Rule: No new npm packages without explicit approval. If you need functionality that seems to require a new dep, explain the need first and wait for confirmation.
Why: Went from 94 deps to 127 in a month before I added this rule. Most were unnecessary.
Process
Rule: Minimal diffs only. If the user asks for a one-line fix, deliver a one-line fix. Do not refactor adjacent code, do not rename variables, do not "improve" unrelated sections.
Why: Scope creep is the #1 cause of merge conflicts and review fatigue on my solo projects.
Security
Rule: Never read from or write to .env, .env.*, secrets/, or any file matching *credentials*. If you need a new env var, tell me and I'll add it.
Why: Self-explanatory.
Style
Rule: Do not add emojis to code, comments, commit messages, or PR descriptions unless I explicitly ask for them.
Why: Personal preference but strongly held.
Your turn
Drop your rules below. The best ones will make it into a curated rule pack that ships with SpecLock in v5.6. Contributors will be credited in the changelog.
Some prompts to get you thinking:
What's a rule you added after getting burned by an AI?
What's a rule your team argues about?
What's a rule that seems obvious but isn't in anyone's CLAUDE.md?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion: What rules have YOU added to your CLAUDE.md?
I want to crowdsource the best rules this community has written. Drop yours below — we'll build a living reference that new SpecLock / Claude Code / Cursor users can copy from.
Format
For each rule, please share:
CLAUDE.md)I'll start
Architecture
Tests
Dependencies
Process
Security
Style
Your turn
Drop your rules below. The best ones will make it into a curated rule pack that ships with SpecLock in v5.6. Contributors will be credited in the changelog.
Some prompts to get you thinking:
CLAUDE.md?Let's build the canonical list.
Beta Was this translation helpful? Give feedback.
All reactions