Claude Code 101 Basics
10 examples to get you started with Claude Code 101 - 7 basic and 3 intermediate.
Search across all documentation pages
10 examples to get you started with Claude Code 101 - 7 basic and 3 intermediate.
Install Claude Code from your terminal before doing anything else.
npm install -g @anthropic-ai/claude-codenpm is not your preferred package manager, check platform.claude.com/docs for the current install options.Related: Installing Claude Code and Connecting Your First Project - the full walkthrough this example summarizes.
Confirm the CLI installed correctly and see which version you are running.
claude --versionclaude command is on your PATH.PATH likely needs to include the global npm bin directory.Start an interactive Claude Code session inside the project you want help with.
cd ~/projects/my-app
claudecd into the project first.Related: Navigating the Claude Code REPL: Prompts and Slash Commands - what you can type once the session is open.
Type a plain-English instruction at the prompt instead of writing code yourself.
> Add a README.md that explains what this project doesSee what Claude Code wants to change before it happens.
# Claude Code shows a diff-style preview of the edit
# you approve, edit the request, or reject itRelated: Permission Modes Explained: Auto-Accept vs Ask-Every-Time - controls whether you see this preview for every action.
Trigger built-in behavior with a leading slash instead of a natural-language request.
> /init/ signals a built-in action./init is a common first command in a new project, since it lets Claude Code build up context about the codebase.End your Claude Code session when you are done.
> /exitclaude from the same directory to pick up where you left off.Choose whether Claude Code asks before each action or proceeds on its own.
claude --permission-mode ask-every-timeask-every-time prompts for approval before each file edit or shell command.ask-every-time until you trust the agent's plans in that codebase.Related: Permission Modes Explained: Auto-Accept vs Ask-Every-Time - the full comparison of both modes.
Let Claude Code investigate a risky or unfamiliar change before it touches any files.
> /plan
> Investigate why the checkout flow fails intermittently and propose a fixRelated: Switching Between Plan Mode and Execution Mode - the full workflow for moving from research to real edits.
Give Claude Code one instruction that requires touching several files and running a command.
> Rename getUserData to fetchUserProfile everywhere it's used, then run the test suiteRelated: The Claude Code Mental Model: Agent, Not Autocomplete - why one instruction can safely trigger a multi-step plan like this.
Stack versions: Written against the Claude model lineup current as of ~June 2026 - Claude Fable 5, Claude Opus 4.8, Claude Sonnet 5 (the default), and Claude Haiku 4.5. Model names, pricing, and product features move quickly - verify current specifics at platform.claude.com/docs before relying on them.
Reviewed by Chris St. John·Last updated Jul 18, 2026