When a price, name or claim is missing, Claude asks a short question instead of inventing one.
2
Step 2: Keep passwords and keys out of chats and shared files
Every key your tools use lives in one hidden file, never in a chat message.
A key works like a password for a service you pay for. Anyone who finds it can run up your bill or read your data. A key pasted into a chat or saved in a public project is already out.
Steps to copy
Know the words. An API key is a password a service gives your software.
The .env file holds those keys.
.gitignore lists the files git never saves or uploads.
Ask Claude to create the .env file, move every key into it and add .env to .gitignore. The prompt below does this in one go.
When a service shows you a key, paste it into the .env file yourself, never into the chat.
If a key ever lands in a chat or a public project, make a new one at the service and delete the old one. Deleting the message is not enough.
In Claude Code
A hook can block a commit that holds a key, whatever Claude decides in the moment.
Also worth a rule
A key never goes in any file except .env, and never in a reply.
Set up this project so no password or API key can leak.
1. Create a file named .env in the project root for every key and password, one per line as NAME=value, and tell me which values you need from me.
2. Add .env to .gitignore so git never saves it, and check that it is not already in a past commit.
3. Change the code so it reads keys from .env instead of holding them in files.
4. Search every file for anything that looks like a key or password and list the file names, without printing the values.
5. Add a check that runs before every commit and blocks it when a file holds a key.
3
Step 3: Ask for every answer in the same shape
Make Claude open with the result, then what needs you, then what comes next.
You see at once whether the work landed, and you never hunt through a long reply for your part.
Steps to copy
Add a rule: every reply opens with the outcome.
Name three labelled blocks after it: Info, Needs you and Next.
Ask for decisions as a numbered list, one decision per number, with the recommended option marked.
When a reply breaks the shape, point at the rule and ask again.
Tip
With numbered decisions you answer "1 yes, 2 B" instead of writing a paragraph.
Also worth a rule
Answers and warnings sit on their own marked lines above the decisions.
4
Step 4: One task at a time in your Claude Code workflow
Finish one project before the next one starts, and approve a plan before any job with three or more steps.
Fixing a plan is cheaper than fixing finished work.
Steps to copy
Keep a ranked list of projects and work only the top one until it is closed.
Paste long notes as background, ask for a short phased list back, then set the order yourself.
Ask for a plan first and read it before anything changes.
When the results start to drift, say stop and ask for a new plan.
In Claude Code
Press Shift+Tab until plan mode shows, or type /plan, and approve the plan before Claude edits anything.
Also worth a rule
New ideas that come up mid task go on the list as their own task, never into the current one.
5
Step 5: Watch the chat limit with three Claude Code commands
Start a fresh chat before a long one gets heavy, and carry the work over in a saved handoff file.
Long chats get summarized, and details you needed can go with the summary.
Steps to copy
Type /context now and then to see how full the current chat is.
At your own threshold, finish the item and ask for a dated handoff file.
Type /clear for an empty chat and send one line: read the handoff file first.
In Claude Code
When a chat nears its limit, Claude Code compacts it into a summary, and full tool outputs and earlier reasoning are gone.
Also worth a rule
Clear the chat between unrelated tasks to stop sending old context with every later message.
6
Step 6: Let the strong model judge and cheaper helpers do the routine work
Plans and final judgment stay with the strongest model. Searches, edits and checks go to helpers on cheaper models.
You pay top rates only for the work that needs judgment.
Steps to copy
List the jobs that need judgment: plans, final reviews and anything a customer will see.
Give each helper one task and a cap on its answer, such as "reply in at most ten lines".
Write helper instructions for someone with zero context: exact files, exact steps, how to decide edge cases.
Before you act, have the main chat recheck the one finding your decision rests on.
In Claude Code
These helpers are called subagents. Anthropic suggests Sonnet for most work, Opus for complex decisions and Haiku for simple helper tasks.
Also worth a rule
Scan every result for your own instruction words printed by mistake.
7
Step 7: Never accept done without a check you can see
Done means the checks ran and passed, with their output in the reply.
An AI saying done often means the text exists and no check has run.
Steps to copy
Before work starts, list what done means as items you can tick.
Ask for the check output in every reply that says done. No output means not done.
When something breaks, ask for the cause first, then fix the cause.
Close every review finding before you publish, or write down why it stays open.
In Claude Code
Anthropic's documentation agrees: give Claude tests, screenshots or the expected result to check against.
Also worth a rule
Publishing, deleting, spending money and changing a live web address always need your yes in that message.
8
Step 8: Turn every mistake into a rule and every task into a brief
Log each mistake as a dated rule the same day, and link every task to a brief.
The same mistake rarely costs you twice.
Steps to copy
After any correction, have Claude add one dated line to a lessons file: what went wrong and the new rule.
Keep one line per task, each linked to a brief with goal, reason and evidence.
Give every parked item a trigger to come back: a date, a number or an event.
Open and close every session the same way: read the list, work the top item, update the list.
Tip
A brief is ready when Claude could run it from start to finish while you only review and approve.
Also worth a rule
Read the lessons file once a month and retire the rules that no longer bite.
04
Claude Code tips you can copy: three files
Copy each file in one click or download it, then fill in the parts in angle brackets.
# Project rules
## Who I am and what we are building
- I run a small business: <what you sell, and to whom>.
- This project: <one line goal>. Key facts live in <facts file>, dated.
## How to answer me
- Line one: the result. No warm up.
- Then three blocks: Info, Needs you (numbered, or "nothing"), Next.
- Mark your recommended option on every either/or question.
- Never say done without showing the check that proves it.
## When to ask
- Facts, prices, names or claims you do not have: ask, never invent.
- Anything with three or more steps: show me a plan first.
- New idea mid task: add it to the list, do not act on it.
## What never to do
- Publish, delete, spend money or change a live address without my yes.
- Write a password or API key into any file except .env, or into a reply.
- Start a second project before the current one is finished.
- Reuse my notes or instructions as finished text.
Reply format
Paste it under "How to answer me" in the rules file.
<one line: what happened, or the answer>
INFO
- <short point>
- <short point>
π‘ ANSWER: <direct answer to my question, if I asked one>
β οΈ IMPORTANT: <one line, only when something needs my attention>
π¨ CRITICAL: <one line, only when something is urgent or risky>
NEEDS YOU
1. <decision> (recommended: <option>)
or: Needs you: nothing
NEXT
DONE / STILL WORKING / WAITING ON YOU: <one line>
Session handoff
Ask Claude to fill it in before you clear the chat.
# Handoff <date>
Start the next chat with: "read <this file> first".
## Current project
<name>, brief: <link to brief>
## State
<what is finished, what is half done, with the check output>
## Next items, in order
1. <item>
2. <item>
## Waiting on me
- <question> (recommended: <option>)
## Parked, with triggers
- <item>: back when <date, number or event>
## Lessons from this session
- <date>: <what went wrong> => <new rule>
05
Add free skills when a job repeats
A skill packs one repeated job into a folder Claude Code loads by name.
You do not need to know which jobs to turn into skills. Ask Claude to find them for you with the prompt below.
Look at this project and at the kinds of requests I make most often.
List the jobs I ask for more than once that could become a skill.
For each one give: a short name, what it does, what it needs from me each time, and how often it would run.
Rank them by hours saved per month. Return at most eight, as a numbered list.
From our own use: one run of our free autocomplete skill returned 2,651 unique search suggestions from 693 requests.
Ours are free and MIT licensed: copy a skill folder into ~/.claude/skills/, restart Claude Code and ask for it.
Open your project folder in Claude Code and type /init to draft a rules file called CLAUDE.md. Trim it to who you are, how to answer you and what never to do, then approve a plan before the first file changes.
How does Claude Code work?
Claude Code is Anthropic's tool inside your project, and it reads your CLAUDE.md at the start of every session. You describe the result, it edits the files, runs the commands and shows what changed.
Is Claude Code good for beginners?
Yes, when you set rules before the first big job and use plan mode to see the approach before anything changes. The steps above show how to use Claude Code safely when you have never written code.
What do I do with the code Claude writes?
Treat it as a draft until a check you can see has passed. Ask Claude to run the checks and paste their output, read the summary of what changed, and only then publish.
What should I put in the Claude Code rules file?
Your CLAUDE.md needs four short parts, starting with who you are, what you are building and how Claude should answer you. Then add when it must ask instead of guess, and what it must never do.