Claude Code tips for beginners: 12 habits that save hours
Twelve Claude Code tips for beginners from daily use and the official docs: CLAUDE.md, plan mode, checkpoints, context, skills, hooks, subagents and MCP.
Short answer: start every project with /init and a short CLAUDE.md, plan before you build (Shift+Tab into plan mode), give Claude a test it can run, and learn /rewind so mistakes are cheap to undo. Then watch your context with /context, and turn anything you type twice into a skill. The rest of this guide explains each one, plus six more.
I build AfterPrompt with Claude Code every day. These are the habits that made the biggest difference for me, each checked against the official docs on 25 Nov 2026. Claude Code ships updates often, so if a command looks different, check /help.
How do you get started with Claude Code?
Install it with one line: curl -fsSL https://claude.ai/install.sh | bash on macOS or Linux, brew install --cask claude-code with Homebrew, or irm https://claude.ai/install.ps1 | iex in PowerShell on Windows. Open a terminal in your project folder and type claude.
You need a paid Claude plan (Pro or higher), a Claude Console account, or a supported cloud provider. The free Claude plan does not include it. Our Claude Code vs Codex guide compares the prices.
1. Why run /init and keep CLAUDE.md short?
/init looks at your code and writes a CLAUDE.md file with build commands, test commands and conventions. Claude reads it at the start of every session.
The trap is letting it grow. Every line costs attention on every task. Keep only what Claude cannot guess: the test command, the gotchas, the decisions you do not want undone. Put personal notes in CLAUDE.local.md and keep it out of git. Your rules for all projects go in ~/.claude/CLAUDE.md.
2. How do you see what Claude remembers?
/memory opens your CLAUDE.md files and shows auto memory, the notes Claude keeps for itself across sessions. Look at it now and then. If something in there is wrong, Claude will keep acting on it until you fix it.
3. Why plan before you build?
Press Shift+Tab until you see plan mode, or type /plan followed by the task. In plan mode Claude reads code and proposes a plan but does not edit anything.
Read the plan. This is where you catch a wrong guess about your database or a file it should not touch. One warning from the docs: at the approval prompt, Shift+Tab approves the plan. Press Esc first if you want to keep talking.
4. Which permission mode should you use?
By default Claude asks before it edits files or runs commands. Shift+Tab cycles between default, accept edits (file edits without asking) and plan. There is also an auto mode with background safety checks. The mode that skips all checks is meant for isolated containers only, so do not use it on your own machine.
Use /permissions to allow commands you trust, like your test runner, so Claude stops asking about them.
5. How do you undo a change?
Every prompt creates a checkpoint. Press Esc twice with an empty prompt, or type /rewind, to go back. You can restore the code, the conversation or both.
Know the limits: files changed only by shell commands, edits by most subagents and edits outside Claude are not tracked. The docs say it plainly: checkpoints are not a replacement for version control. Commit often.
6. Why watch your context?
Claude has a limited working memory per session. /context shows how full it is. When it gets crowded, answers get worse.
/compact summarizes the session to free space, and you can tell it what to keep: /compact keep the database decisions. /clear starts fresh, which is best when you switch to an unrelated task. Claude also compacts automatically near the limit.
7. Which slash commands are worth learning?
Type / to see everything. The ones I use most: /model to switch models, /usage to see how much of your plan you have used, /resume to pick up an old session, and /btw to ask a quick side question that does not enter the main conversation. /doctor checks your install when something is off.
8. When should a prompt become a skill?
If you paste the same instructions twice, make a skill. A skill is a folder with a SKILL.md file: a short description, then the instructions. Put it in ~/.claude/skills/<name>/ for yourself or .claude/skills/<name>/ for the project. Claude uses it when it fits the task, or you call it with /name.
Custom slash commands are now part of skills, so old guides that talk about a commands folder are out of date. Our guide on what a Claude skill is goes deeper.
9. When do you need a hook?
Hooks run every time, unlike a CLAUDE.md rule, which Claude can miss. They are shell commands that run at fixed points, such as before a tool runs, after a file is edited, or when Claude stops. Common uses: run the formatter after every edit, block edits to a folder, or get a desktop notification when Claude is waiting for you. Set them in settings and check them with /hooks.
10. What are subagents good for?
A subagent works in its own context and hands back only a summary. That keeps your main session clean when a task needs a lot of reading, like "find every place we send email". Claude Code has built in ones such as Explore and Plan, and you can write your own as Markdown files in .claude/agents/. They use the same plan limits, so they are not free.
11. Why give Claude a check to run?
This is the tip I would keep if I could keep only one. The docs put it simply: give Claude something it can run that comes back pass or fail, and it can keep going on its own. A test, a type check, a build, a script that loads the page. Without a check, Claude can only tell you it thinks it worked.
Say it in the prompt: "add the reset page, then run the tests and fix anything red". Be specific in general, too. "Fix the login bug where users see a blank screen after a wrong password" beats "fix the bug".
12. How do you script Claude Code?
claude -p "explain what the auth module does" runs one task and prints the answer, with no chat. You can pipe things in: cat build-error.txt | claude -p "explain the root cause". Add --output-format json for scripts and --allowedTools to say which tools it may use. This is how people wire Claude Code into CI and small automations. Keep --allowedTools narrow there, do not allow every shell command, and never pipe untrusted text into a run that can edit files or run commands.
Bonus: how do you connect other tools?
MCP servers give Claude new tools, such as your issue tracker, your database or a website. Add one with claude mcp add --transport http <name> <url> and check it with /mcp. Only add servers you trust. Our guide on what an MCP server is explains how it works, with AfterPrompt's own server as the example: it lets you share a build from the terminal, with the prompt and what didn't work.
Frequently asked questions
Is Claude Code good for beginners?
Yes, if you are willing to read what it does. Start in plan mode, keep the default permissions so it asks before acting, and commit often. The vibe coding first app guide walks through a full first project.
How do I stop Claude Code from asking permission every time?
Allow the specific commands you trust with /permissions, or switch to accept edits mode with Shift+Tab for file edits. Avoid the mode that bypasses all checks unless you are in an isolated container.
How do I undo a change Claude Code made?
Press Esc twice with an empty prompt, or type /rewind, and pick a checkpoint. For changes made by shell commands, use git, because checkpoints do not track those.
Why does Claude Code get worse in long sessions?
The context fills up. Check it with /context, then use /compact with a note on what to keep, or /clear when you start a new task.
See the common vibe coding mistakes for the errors these tips prevent, and browse what people built with Claude Code on AfterPrompt, with the prompts they used.


