r/ClaudeAI • u/Regular_Camera9203 • 4h ago
Claude Code Workflow The rules file I use with Claude Code, and why each rule is there
I'm a paramedic who builds Apple apps and automations on days off. My building time comes in short pieces, so I couldn't keep reading long answers. I put my preferences in ~/.claude/CLAUDE.md.
The rules that changed the most:
"Lead with the action. No preamble, recap, filler, praise or hedging." The first line is now the answer.
"About 8 short bullets max. Plain words a smart 15-year-old gets." A limit you can check works. "Be concise" did nothing for me.
"Do it, don't tell me how. Only ask before deleting, sending, publishing or spending." This turned it from an advisor into a builder, with a safety line around the things that are hard to undo.
"Verify in the real app before saying done." No more "this should work."
"When I correct you, save it to memory right then." I stopped repeating myself.
What I learned: short files get followed better than long ones, rules with a reason work better than bare rules, and every rule should fix something that actually annoyed you.
A 4-line starter:
- Lead with the answer. No preamble, praise or recap.
- 8 short bullets max, plain words.
- Do the task instead of explaining it, unless it deletes, sends, publishes or spends.
- Test it before you say it's done.
Full file and the story behind each rule (my own article, member-only on Medium):
https://medium.com/@juanalejandre/the-22-line-file-that-made-claude-code-work-the-way-i-do-a24b080f8450
What's the one rule in yours that made the biggest difference?
•
u/floodassistant 4h ago
Hi /u/Regular_Camera9203! Thanks for posting to /r/ClaudeAI. To prevent flooding, we only allow one post every hour per user. Check a little later whether your prior post has been approved already. Thanks!
2
u/CandidSystem6155 3h ago
Rule 4 is the one I'd harden. When the check is a test, the agent can make "done" true by editing the test instead of the code. We have a hook that counts assertions before and after each edit and asks me if the number drops, but it only watches the edit tool and never sees a sed in the shell, so the check we actually trust is a look at the git diff before anything is accepted.
1
u/notarshzzz 4h ago
mine's embarrassingly simple — i made it tell me what it changed in one line before it runs anything. i kept approving stuff i hadn't actually read and then spending an hour unpicking it. one line, plain english, no diff dump. took me like a week of getting burned to finally add it lol
1
u/Unusual-Albatross43 3h ago
Mine is three short paragraphs. The line I'd keep if I had to delete the rest: "Push back when I'm wrong. Established practice beats agreeing with me." Without something like that you get a builder that builds the bad ideas too.
Your rule 5, same here, with two things I added over time. Every saved correction gets a date and one line of why. And once a week a job goes over the file and merges or drops lines. "Save it right then" only ever adds, and you said it yourself, short files get followed better.
Rule 4 I had to make narrower. Mine now says prove it on the path I'll actually use, and until then say only what you checked. I use most of this from my phone, so "works on the machine" wasn't the thing I needed to know.
1
u/DevilishFriend 3h ago
rule 5 needs a scope, learned that the hard way. a correction saved to the global file follows you into every repo, and mine started dragging one project's conventions into another where they made no sense. now anything about the codebase goes in a CLAUDE.md i commit with that repo, and only stuff about how i like to work stays in ~/.claude. the bleed basically stopped once i split it.