Getting Started with Claude Code
Install Claude Code, configure your project, and run your first session.
Install Claude Code
Claude Code is a CLI tool that runs in your terminal. Install it with one command:
macOS / Linux (recommended):
curl -fsSL https://claude.ai/install.sh | bashWindows (PowerShell):
irm https://claude.ai/install.ps1 | iexVia npm (requires Node.js 18+):
npm install -g @anthropic-ai/claude-codeYou will need a Pro, Max, Team, Enterprise, or Console account to authenticate. The free Claude.ai plan does not include Claude Code. You can also bring your own provider via Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.
First Run
Navigate to any project directory and type claude to start an interactive session:
cd my-project
claudeClaude will open a browser window for authentication on first run. After that, it analyzes your project structure and begins an interactive conversation. Try these first commands:
give me an overview of this codebase
what does @src/index.ts do?Configure CLAUDE.md
Create a CLAUDE.md file in your project root to give Claude persistent context. You can auto-generate one:
/initOr create it manually with the essentials:
# Project: MyApp
## Build & Test
- npm run dev # start dev server
- npm test # run tests
- npm run lint # lint check
## Architecture
- React 18 + TypeScript frontend
- Express API at /api/v1
- PostgreSQL via Prisma ORM
## Conventions
- Functional components with hooks
- Named exports, kebab-case files
- Tests colocated in __tests__/Keep it concise. For every line, ask: if I remove this, will Claude make a mistake? If not, remove it. See the CLAUDE.md deep guide for advanced patterns.
Add Your First Skill
For reusable workflows, create a skill instead of growing CLAUDE.md:
---
name: review
description: Use when reviewing current changes before a commit or PR.
---
Review the current changes for:
- Potential bugs and edge cases
- Security vulnerabilities
- Performance issues
Suggest concrete fixes with file paths.Skills are auto-discovered and load only when relevant. See Skills for the full pattern.
Understand Permissions
Claude Code uses a layered permission system. Press Shift + Tab to cycle the default three modes:
- default — Claude asks before every write or shell command.
- acceptEdits — File edits and common filesystem commands run without prompting.
- plan — Claude explores via reads and shell, but won't edit your source.
Three more modes (auto, dontAsk, bypassPermissions) are opt-in — see Permissions & Security.
Launch directly in a mode:
claude --permission-mode plan # read-only exploration
claude --permission-mode acceptEdits # auto-approve editsSee Permissions & Security for the full picture including per-command allow/deny rules.
Session Naming & Resume
Name sessions you'll want to return to:
claude --name "auth-refactor" # set a name at launch (-n for short)Resume later by name or pick from a list:
claude --resume "auth-refactor" # resume by name (-r for short)
claude --continue # resume most recent (-c for short)Create an isolated parallel worktree when you want to experiment safely:
claude --worktreeUse /memory to inspect persistent context and /agents to manage subagents.
Want to try it yourself?
Why does CLAUDE.md matter so much?
Context configuration is a core agent-development skill. Understanding how LLMs handle the context window explains why a concise, well-structured CLAUDE.md dramatically improves output quality.
Related Reading
- Keyboard Shortcuts — Master the CLI shortcuts
- CLAUDE.md & Memory — Advanced context configuration
- Claude Code Architecture — Understand the full harness
- Plan Mode — Safe read-only exploration
Continue with practice
You have finished the core ideas of Getting Started with Claude Code.
If you want to turn the idea into something reusable, continue practicing on AgentWay.