yavruetre/posts/series

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

  1. 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"

    Share on X

  2. 02

    Generate CLAUDE.md with /init

    The first command in a new project is /init. Claude scans the code and writes a CLAUDE.md at the root, and every session starts by reading that file. Always read the draft it writes and fix any commands it guessed wrong.

    /init

    Share on X

  3. 03

    Something weird? Run doctor first

    In the terminal, claude doctor reads your install and the settings files in the folder and lists the problems. If you type /doctor inside a session, it also tries to fix what it finds.

    claude doctor

    Share on X

  4. 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

    Share on X

  5. 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

    Share on X

  6. 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-dir at launch, or type /add-dir in the middle of a session.

    claude --add-dir ../ortak

    Share on X

Context and memory

  1. 07

    Keep CLAUDE.md short

    CLAUDE.md is 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.

    Share on X

  2. 08

    Link long docs with @

    If you write a file path inside CLAUDE.md with 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

    Share on X

  3. 09

    There are three separate CLAUDE.md files

    ~/.claude/CLAUDE.md applies to all your projects, the CLAUDE.md in the project applies to that repo, and CLAUDE.local.md is 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.

    Share on X

  4. 10

    See which files got loaded with /memory

    /memory shows the CLAUDE.md files that were loaded, and you can pick one and edit it. The memory settings are on the same screen.

    /memory

    Share on X

  5. 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.

    Share on X

  6. 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

    Share on X

  7. 13

    /context shows how full the context is

    /context draws 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

    Share on X

  8. 14

    Say what to keep when you type /compact

    When the conversation gets long, /compact summarizes 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

    Share on X

  9. 15

    New topic? /clear

    When you move to a new task, start with an empty context using /clear so 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

    Share on X

  10. 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

    Share on X

Modes and permissions

  1. 17

    Switch modes with Shift+Tab

    Shift+Tab cycles through the permission modes, and the bottom line shows which mode you’re in. On some Windows setups this shortcut is Alt+M.

    Share on X

  2. 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 /plan opens the same mode.

    claude --permission-mode plan

    Share on X

  3. 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

    Share on X

  4. 20

    Don’t use the flag that turns off permissions on your own computer

    --dangerously-skip-permissions turns 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.

    Share on X

  5. 21

    Don’t grant the same permission every time, write a rule

    /permissions opens 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

    Share on X

  6. 22

    Rules live in settings.json

    Project rules sit in .claude/settings.json and can be shared along with the repo. A rule like Bash(git *) allows commands that start with git. Block reading secret files with the deny list.

    "permissions": { "allow": ["Bash(npm test *)"], "deny": ["Read(**/.env)"] }

    Share on X

  7. 23

    Personal settings go in the local file

    Put permissions and preferences that are only yours in .claude/settings.local.json. That way the settings.json file the team shares stays clean.

    Share on X

  8. 24

    Permission for a single run

    --allowedTools sets which tools run without asking in that run, and --disallowedTools does the opposite. Handy in scripts, and it leaves no permanent setting behind.

    claude -p "testleri çalıştır" --allowedTools "Bash(npm test *)" Read

    Share on X

Commands and shortcuts

  1. 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

    Share on X

  2. 26

    Going the wrong way? Esc

    Esc stops 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.

    Share on X

  3. 27

    Press Esc twice to rewind

    Pressing Esc twice or typing /rewind lets 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

    Share on X

  4. 28

    Go back to the last conversation with --continue

    You closed the terminal and want to pick up where you left off. claude -c opens the most recent conversation in that folder.

    claude -c

    Share on X

  5. 29

    Find an old session with --resume

    claude --resume opens a list of old sessions, and if you add a word after it, it filters by that word. Inside a session /resume does the same.

    claude --resume render

    Share on X

  6. 30

    Give the session a name

    The name you give with -n shows 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ğı"

    Share on X

  7. 31

    Branch a new session off an old one

    If you pass --fork-session along with --resume or --continue, the old conversation opens with a new session ID. Handy for trying two different paths from the same point.

    claude -c --fork-session

    Share on X

  8. 32

    Find an old prompt with Ctrl+R

    Ctrl+R opens a search through the prompts you’ve typed before. The up arrow key also brings back the previous prompt.

    Share on X

  9. 33

    Write long prompts in your own editor

    Ctrl+G opens 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’s Ctrl+J.

    Share on X

  10. 34

    Paste the screenshot

    You can paste an image straight into the prompt box. Alt+V on Windows, Ctrl+V on macOS and Linux. Much faster than trying to describe a page that looks broken.

    Share on X

  11. 35

    See what it’s doing behind the scenes with Ctrl+O

    Ctrl+O opens a detailed log showing which tool was called with which input. Ctrl+T shows and hides the to-do list.

    Share on X

  12. 36

    Switch models

    You can switch models in the middle of a session with /model. At launch --model also takes short names like opus, sonnet or fable, and a short name goes to the newest model in that family.

    claude --model sonnet

    Share on X

  13. 37

    Set how much it thinks

    /effort sets 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

    Share on X

  14. 38

    Track spending with /usage

    /usage shows the session cost, plan usage and activity stats. Typing /cost brings you here too.

    /usage

    Share on X

  15. 39

    Export the conversation

    /export saves the conversation to a file or the clipboard. Handy for remembering later how a problem got solved.

    /export cozum.md

    Share on X

Automation

  1. 40

    Run it non-interactively with -p

    With -p Claude 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"

    Share on X

  2. 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ı"

    Share on X

  3. 42

    Ask for JSON if a program will read it

    --output-format json gives a single JSON result, and stream-json streams 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

    Share on X

  4. 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"}}}'

    Share on X

  5. 44

    Put a spending cap on headless runs

    --max-budget-usd sets 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

    Share on X

  6. 45

    Start a session in the background

    --bg starts the session in the background, returns right away and prints an ID. claude agents lists the running ones, claude attach gets you into one, and claude logs shows the latest output.

    claude --bg "bütün testleri çalıştır, kırılanları raporla"

    Share on X

  7. 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

    Share on X

Extending

  1. 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 a duzelt.md file becomes the /duzelt command. If $ARGUMENTS appears in the text, everything you type after the command goes there.

    /duzelt 1234

    Share on X

  2. 48

    A skill is an instruction that loads when it’s needed

    .claude/skills/ad/SKILL.md is 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

    Share on X

  3. 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

    Share on X

  4. 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 /agents menu was removed in this version, so the easiest way is to have Claude write the file.

    Share on X

  5. 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 --agents flag. If you like it, turn it into a file later.

    claude --agents '{"denetci": {"description": "Kodu denetler", "prompt": "Sen bir kod denetçisisin"}}'

    Share on X

  6. 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. /hooks shows which ones are defined.

    /hooks

    Share on X

  7. 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.

    Share on X

  8. 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, and claude mcp list shows the ones you’ve added and their health.

    claude mcp add --transport http sentry https://mcp.sentry.dev/mcp

    Share on X

  9. 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.json file 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

    Share on X

  10. 56

    Turn off the MCP servers you don’t use

    Inside a session /mcp shows 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

    Share on X

  11. 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 details tells you what’s inside a plugin and how much room it will take in the context.

    claude plugin list

    Share on X

  12. 58

    Set up the bottom line your way

    /statusline asks 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

    Share on X

Habits

  1. 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.

    Share on X

  2. 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.

    Share on X

  3. 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.

    Share on X

  4. 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 @.

    Share on X

  5. 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.

    Share on X

  6. 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.

    Share on X

  7. 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.

    Share on X

  8. 66

    A security pass before merging

    /security-review goes 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

    Share on X

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.

Ad

Last edited 5 December 2026 · If you spot a mistake, tell me on X. I'll fix it and leave a note here.

Newsletter

New guides come out in the newsletter. One email a week. New guides, short notes and what I tried that week.

Which emails do you want

I only use your address for the newsletter. Privacy