100 Claude Code tips
16 min readseriesskills, prompts and githublast checked Claude Code 2.1.281
What is Claude CodeClaude Code is Anthropic’s coding tool that runs in the terminal. It reads and edits the files in your folder and runs commands, and you tell it what to do by just talking to it.
I’m building this site with Claude Code. I’m collecting what I learn along the way in a series of 100 tips. There are 66 for now, and new ones will show up on this page as they’re added, until the series reaches 100.
The numbers never change. A new tip goes into its own group with the next number, so a link like #ipucu-12 always opens the same tip. Click the number next to any tip and its link goes into the address bar.
I checked all of them on Claude Code 2.1.281 on 28 November 2026, and verified the flags one by one against the claude --help output. The tool changes a lot, so if something is different on yours, the current help text is right.
Getting started
- 01
Start in the project folder, and put your first question right after
Claude Code treats whatever folder you open it in as the workspace. If you type a request in quotes, the session opens with that request. In a repo you don’t know, ask it to explain the code to you first.
claude "bu proje ne yapıyor, nereden başlamalıyım" - 02
Generate CLAUDE.md with /init
The first command in a new project is
/init. Claude scans the code and writes aCLAUDE.mdat the root, and every session starts by reading that file. Always read the draft it writes and fix any commands it guessed wrong./init - 03
Something weird? Run doctor first
In the terminal,
claude doctorreads your install and the settings files in the folder and lists the problems. If you type/doctorinside a session, it also tries to fix what it finds.claude doctor - 04
Stay up to date and read the help yourself
Claude Code gets updated very often, and commands and shortcuts can change from version to version. I checked everything on this page on version 2.1.281. If something doesn’t match, update first, then look at
claude --help.claude update - 05
/status tells you which model and account you’re on
Version, model, account and connection status on one screen. If something isn’t going the way you expect, this is the first place to look.
/status - 06
Need another folder too? Add it
Claude doesn’t leave the folder it started in on its own. If you need a shared library or a second repo, pass
--add-dirat launch, or type/add-dirin the middle of a session.claude --add-dir ../ortak
Context and memory
- 07
Keep CLAUDE.md short
CLAUDE.mdis read from the top in every session, so every line you write eats up context. Build and test commands, the folder layout and a few rules to follow are enough. Don’t paste long documents in here. - 08
Link long docs with @
If you write a file path inside
CLAUDE.mdwith an @ in front, that file gets pulled in too. Keep long or often changing info in a separate file, and when a rule changes you only fix it in one place.@docs/api.md - 09
There are three separate CLAUDE.md files
~/.claude/CLAUDE.mdapplies to all your projects, theCLAUDE.mdin the project applies to that repo, andCLAUDE.local.mdis only for you. Put notes you won’t share with the team in the local file and add it to.gitignore. My global file has two or three lines, the rest is in the project files. - 10
See which files got loaded with /memory
/memoryshows theCLAUDE.mdfiles that were loaded, and you can pick one and edit it. The memory settings are on the same screen./memory - 11
Correct it once, ask it to remember
If auto memory is on, Claude keeps its own notes and loads them in later sessions. When you correct something, just saying “remember this” is enough. I use these notes to keep track of which project must never be touched. The notes are plain markdown files, so you can fix them by hand too.
- 12
Don’t describe the file, mention it with @
Type @ in the prompt box and pick the file, and Claude reads it directly without searching. If you mention a folder with a slash at the end, you get the folder’s tree.
@src/auth.ts bu dosyadaki hata yakalamayı sadeleştir - 13
/context shows how full the context is
/contextdraws how much of the context is used as a colored grid. MCP servers that take up too much room and long memory files stand out right away here./context - 14
Say what to keep when you type /compact
When the conversation gets long,
/compactsummarizes everything so far and frees up room. If you write what to keep after it, the summary follows that./compact açık hataları ve verdiğimiz kararları tut - 15
New topic? /clear
When you move to a new task, start with an empty context using
/clearso the details of the old task don’t leak into the new one. The old session isn’t deleted, it stays on disk and you can go back to it with/resume./clear - 16
Ask a side question without interrupting the main task
If a small question pops into your head while Claude is doing a long task, ask it with
/btw. It answers on the side without breaking the main conversation./btw bu projede hangi node sürümü kullanılıyor
Modes and permissions
- 17
Switch modes with Shift+Tab
Shift+Tabcycles through the permission modes, and the bottom line shows which mode you’re in. On some Windows setups this shortcut isAlt+M. - 18
Plan mode before a big change
In plan mode Claude looks through the code and writes a plan, but it doesn’t touch any files. Once you approve the plan, it moves on to doing it. Inside a session
/planopens the same mode.claude --permission-mode plan - 19
Tired of approving every edit? Use acceptEdits
In this mode file edits are applied without asking. For shell commands it still asks for permission most of the time. It’s more comfortable in a folder tracked by git, since undoing is easy if you don’t like the result.
claude --permission-mode acceptEdits - 20
Don’t use the flag that turns off permissions on your own computer
--dangerously-skip-permissionsturns off every permission prompt. The help text only recommends it in a separate sandbox with no internet access. Don’t use it in a folder where your real files live. - 21
Don’t grant the same permission every time, write a rule
/permissionsopens the screen where you manage allowed and denied tool rules. If there’s a command you keep approving, make it a permanent rule from there./permissions - 22
Rules live in settings.json
Project rules sit in
.claude/settings.jsonand can be shared along with the repo. A rule likeBash(git *)allows commands that start with git. Block reading secret files with the deny list."permissions": { "allow": ["Bash(npm test *)"], "deny": ["Read(**/.env)"] } - 23
Personal settings go in the local file
Put permissions and preferences that are only yours in
.claude/settings.local.json. That way thesettings.jsonfile the team shares stays clean. - 24
Permission for a single run
--allowedToolssets which tools run without asking in that run, and--disallowedToolsdoes the opposite. Handy in scripts, and it leaves no permanent setting behind.claude -p "testleri çalıştır" --allowedTools "Bash(npm test *)" Read
Commands and shortcuts
- 25
Run a shell command with !
Put ! at the start of the line and what you type runs straight in the shell. The output is added to the conversation, so Claude sees it too. Running the test this way and showing it is faster than describing the error.
! npm test - 26
Going the wrong way? Esc
Escstops Claude right there. The conversation isn’t lost, you can type what you want done differently and keep going. Much cheaper than waiting for it to finish. - 27
Press Esc twice to rewind
Pressing
Esctwice or typing/rewindlets you go back to an earlier point. Claude takes a copy of the files before every edit, so you can roll back the code, the conversation or both. Still, keep making commits./rewind - 28
Go back to the last conversation with --continue
You closed the terminal and want to pick up where you left off.
claude -copens the most recent conversation in that folder.claude -c - 29
Find an old session with --resume
claude --resumeopens a list of old sessions, and if you add a word after it, it filters by that word. Inside a session/resumedoes the same.claude --resume render - 30
Give the session a name
The name you give with
-nshows up in the prompt box, the session picker and the terminal title. You can change it later with/rename. If you have several sessions open at once, it makes them easier to tell apart.claude -n "site taslağı" - 31
Branch a new session off an old one
If you pass
--fork-sessionalong with--resumeor--continue, the old conversation opens with a new session ID. Handy for trying two different paths from the same point.claude -c --fork-session - 32
Find an old prompt with Ctrl+R
Ctrl+Ropens a search through the prompts you’ve typed before. The up arrow key also brings back the previous prompt. - 33
Write long prompts in your own editor
Ctrl+Gopens the text in the prompt box in your own editor, and it comes back when you save and close. To start a new line inside the box there’sCtrl+J. - 34
Paste the screenshot
You can paste an image straight into the prompt box.
Alt+Von Windows,Ctrl+Von macOS and Linux. Much faster than trying to describe a page that looks broken. - 35
See what it’s doing behind the scenes with Ctrl+O
Ctrl+Oopens a detailed log showing which tool was called with which input.Ctrl+Tshows and hides the to-do list. - 36
Switch models
You can switch models in the middle of a session with
/model. At launch--modelalso takes short names like opus, sonnet or fable, and a short name goes to the newest model in that family.claude --model sonnet - 37
Set how much it thinks
/effortsets the thinking level. The levels are low, medium, high, xhigh and max. A low level is enough for simple work, go higher for a hard bug.claude --effort high - 38
Track spending with /usage
/usageshows the session cost, plan usage and activity stats. Typing/costbrings you here too./usage - 39
Export the conversation
/exportsaves the conversation to a file or the clipboard. Handy for remembering later how a problem got solved./export cozum.md
Automation
- 40
Run it non-interactively with -p
With
-pClaude prints the answer and exits, and that’s how it plugs into scripts and scheduled jobs. According to the help text the folder trust prompt is skipped in this mode, so only use it in folders you trust.claude -p "son commit değişikliklerini özetle" - 41
Pipe the output in
You can pipe a command’s output straight into Claude. A diff, an error log, test output, whatever you have.
git diff | claude -p "bu değişiklikte hata var mı" - 42
Ask for JSON if a program will read it
--output-format jsongives a single JSON result, andstream-jsonstreams events as they come. If another program will process the output, use these instead of plain text.claude -p "testleri özetle" --output-format json > sonuc.json - 43
Pin down the shape of the answer with a schema
If you pass a JSON schema with
--json-schema, the output is validated against that schema. Field names come back the same every time, so there are no surprises when you parse it.claude -p "package.json içindeki adı ver" --json-schema '{"type":"object","properties":{"ad":{"type":"string"}}}' - 44
Put a spending cap on headless runs
--max-budget-usdsets the most a run can spend, in dollars. It only works with-p. A good safety net for a script that runs overnight.claude -p "kırık testleri düzelt" --max-budget-usd 2 - 45
Start a session in the background
--bgstarts the session in the background, returns right away and prints an ID.claude agentslists the running ones,claude attachgets you into one, andclaude logsshows the latest output.claude --bg "bütün testleri çalıştır, kırılanları raporla" - 46
Worktrees for parallel work
To run two tasks in the same repo at once, open a separate git worktree for each session with
-w. The changes don’t get mixed up.claude -w yeni-ozellik
Extending
- 47
Turn a prompt you type often into a command
Put a markdown file in
.claude/commands/and the file name becomes the command name. For example aduzelt.mdfile becomes the/duzeltcommand. If$ARGUMENTSappears in the text, everything you type after the command goes there./duzelt 1234 - 48
A skill is an instruction that loads when it’s needed
.claude/skills/ad/SKILL.mdis a skill. Claude looks at the name and description lines at the top and decides on its own when it’s needed, and the full text only enters the context when it’s used. You can also call it yourself as/ad, using the folder name./skills - 49
Some skills only you should call
If you don’t want Claude to start a skill like publishing or deleting on its own, add this line to its header. It stays in the command list, but it only runs when you type it.
disable-model-invocation: true - 50
A subagent works in its own context
Every markdown file in
.claude/agents/is a subagent. It works in its own context and returns only the result, so the main conversation doesn’t bloat. The/agentsmenu was removed in this version, so the easiest way is to have Claude write the file. - 51
Pass a one-session agent as JSON
If you want to try it without creating a file, you can pass the agent definition as JSON to the
--agentsflag. If you like it, turn it into a file later.claude --agents '{"denetci": {"description": "Kodu denetler", "prompt": "Sen bir kod denetçisisin"}}' - 52
A hook runs your command at a set moment
Hooks are defined in the hooks section of
settings.json. PostToolUse fires after a tool runs, for example for a formatter after every edit. Stop fires when Claude finishes its answer, good for notifications./hooksshows which ones are defined./hooks - 53
PreToolUse for blocking
PreToolUse kicks in before a tool runs. If you want to log a command or stop it, this is the right place. There are other moments too, like SessionStart and UserPromptSubmit.
- 54
Add an MCP server
An MCP server gives Claude new tools, like a bug tracker or a database. You add one with
claude mcp add, andclaude mcp listshows the ones you’ve added and their health.claude mcp add --transport http sentry https://mcp.sentry.dev/mcp - 55
MCP shared with the team
The default scope is local, meaning the server is only for you and only in this project. If you add it with
-s project, it’s written to the.mcp.jsonfile in the repo. On a teammate’s machine these servers wait for approval the first time they open the project.claude mcp add -s project --transport http sentry https://mcp.sentry.dev/mcp - 56
Turn off the MCP servers you don’t use
Inside a session
/mcpshows the servers, reconnects the ones that dropped and turns off the ones you don’t want. Every server’s tool definitions take up room in the context, so don’t leave the ones you don’t need on./mcp disable sentry - 57
A plugin bundles it all into one package
A plugin packages skills, agents, hooks and MCP servers together. You install one with
claude plugin install.claude plugin detailstells you what’s inside a plugin and how much room it will take in the context.claude plugin list - 58
Set up the bottom line your way
/statuslineasks what you want to see on the bottom line and writes the setting itself. Things like the model, the folder or the git branch./statusline
Habits
- 59
Plan first, then code
On a big task don’t have it write code right away. First have it write out what it will do as a plan, read it, and fix whatever it misunderstood right there. Fixing things after the code is written takes longer.
- 60
Small steps, a commit at each one
Don’t ask for the whole feature in one prompt. One step, check, commit, then the next one. If something breaks, it’s easy to find which step broke it.
- 61
Write how to verify it in the prompt
Add the check at the end of the prompt too, like run this test, or open the page and take a screenshot. When Claude can test its own work, it leaves far fewer bugs.
- 62
Don’t describe the error, paste it
The full error text and what you did when it showed up are enough. If the text is long, save it to a file and point to it with @.
- 63
Say what counts as done
Instead of “make it faster”, say “this page should load in under two seconds”. With a measurable goal, Claude knows where to stop.
- 64
Have a second model review it
When the work is done, have another model or a fresh session with a clean context read it. The model that wrote the code can miss its own mistakes. I tried this on my own site, I wrote up the result here.
- 65
Put a limit on review rounds
For a while my video pipeline had every video critiqued for seven rounds. The videos weren’t getting better, they were just getting later. Now there are two rounds of fixes at most. There’s more on this in the render guide.
- 66
A security pass before merging
/security-reviewgoes over the pending changes on the branch from a security angle. Running it once before you merge the branch into main is a good habit./security-review
This info comes from the help text of Claude Code 2.1.281 installed on my machine. I left out shortcuts and commands I wasn’t sure about. If you see something wrong, write to me on X and I’ll fix it, keeping its number.