
Claude Code Tutorial for Beginners: Install, First Task and Good Habits
By Suraj Kamdev ยท 2026-10-16 ยท 4 min read
Claude Code is Anthropic's coding agent that runs in your terminal. You describe what you want, and it explores your project, edits files, runs commands such as tests, and reports back. It ranks near the top of our Coding agents category. This tutorial gets you from zero to a productive first session. Commands and options evolve, so check Anthropic's official Claude Code documentation for the current install steps.
What you need
- A computer with a terminal (macOS, Linux, or Windows, with options described in the official docs).
- Access to Claude Code: it is included with Claude's paid plans (see the official site for current plans), or you can use API billing.
- A project folder, ideally a git repository. If you do not have one, create a tiny practice project.
- Basic terminal comfort: changing directories and running a command.
Step 1: Install
Anthropic provides official installation methods, including an npm package (npm install -g @anthropic-ai/claude-code, which needs Node.js) and native installers. Follow the docs for your operating system. Then open a terminal in your project folder and run claude. The first run walks you through signing in.
Step 2: Let it learn your project
Start by asking questions rather than making changes:
- "Give me an overview of this project's structure."
- "How do I run this project and its tests?"
- "Where is user authentication handled?"
This builds confidence in what it understands and often teaches you something about your own codebase.
Step 3: Create a CLAUDE.md file
Claude Code reads a CLAUDE.md file in your project as persistent memory. Put in it what you would tell a new teammate: the stack, how to run tests and lint, code style, folder conventions and things to avoid. The /init command can generate a starting version by analysing your project; review and edit it. Keep it short and accurate, and update it when you notice the agent repeating a mistake.
Step 4: Your first real task
Commit your work first so you can undo anything. Then give a small, specific task:
"Add input validation to the signup form: email must be valid and password at least 8 characters. Show inline error messages. Run the tests when done."
Claude Code will propose and make edits and may ask permission to run commands. Read what it plans before approving. When it finishes, review the changes with git diff or in your editor. If you like the result, commit it; if not, discard it and try a clearer prompt.
Understanding permissions
By default Claude Code asks before actions such as editing files or running shell commands. You can allow specific safe commands (like your test command) so it does not ask every time. As a beginner, keep approvals on and read each request; it is the best way to learn what the agent does. Be wary of any setting that skips approvals entirely, especially on a machine with access to sensitive systems.
Useful built-in commands
Inside a session, slash commands control Claude Code. Commonly used ones include /help (list commands), /init (create CLAUDE.md) and /clear (start a fresh conversation when context gets muddled). Type /help to see the list for your version.
Habits that get better results
- Ask for a plan first on anything bigger than a small fix.
- One task at a time, committing between tasks.
- Make tests runnable with one command and tell it to run them.
- Paste exact errors when something breaks.
- Start fresh when stuck.
/clearand a clearer prompt beat a long, confused thread. - Review every diff like a pull request from a teammate.
More in prompt tips for coding agents.
Using it with your editor
Claude Code does not replace your editor. Many people run it in the integrated terminal of VS Code or Cursor, letting Claude Code handle larger tasks while they review in the editor. Official IDE integrations exist; see the docs. Compare options in Cursor vs Claude Code and Claude Code vs Codex.
Extending it with MCP
Claude Code can connect to MCP servers for GitHub, databases, browsers and more. See MCP explained and best MCP servers for Cursor; many of the same servers work in both tools.
Troubleshooting
- It changed too much: scope tasks smaller and say what not to touch.
- It does not know how to run your project: add the commands to CLAUDE.md.
- Usage limits: usage depends on your plan; long sessions with large context use more. Clear context between unrelated tasks.
A sample first week
Day one, ask questions and write CLAUDE.md. Day two, fix a small bug. Day three, add a small feature with tests. Day four, try a refactor with a plan-first prompt. Day five, connect one MCP server, such as GitHub, and implement an issue end to end. By the end of the week you will know where it shines in your workflow.
FAQ
Is Claude Code free?
It is included with Claude's paid plans and can also be used with API billing. See Anthropic's site for current options.
Do I need to be a developer to use Claude Code?
You should be comfortable with a terminal and able to review code. Complete beginners may prefer an app builder like Lovable or Replit first.
What is CLAUDE.md?
A project file Claude Code reads for persistent instructions: your stack, commands, conventions and things to avoid.