What is Claude Code?
Meet the AI coding agent built by Anthropic -- the same team behind Claude.
Claude Code is Anthropic's AI coding agent that lives right in your terminal. Instead of switching between your editor, browser, and an AI chatbot, Claude Code works alongside you in the command line -- reading your files, understanding your project, and writing production-quality code.
It's built by the same team that created Claude, one of the most capable AI assistants available today. Think of it as having a senior developer pair-programming with you, but one that never gets tired and can read your entire codebase in seconds.
- Deep codebase understanding -- Claude reads your entire project structure, not just the file you're looking at
- Multi-file editing -- it can create, modify, and refactor across multiple files in a single operation
- Context awareness -- it remembers your conversation, your project's patterns, and your preferences
- Autonomous task completion -- give it a task and it figures out the steps, creates files, installs dependencies, and runs tests
- Production-quality output -- writes clean, well-structured code following your project's existing patterns
Where You Can Use It
claudeMost AI coding tools work like autocomplete -- they suggest the next few lines. Claude Code is fundamentally different. It's an agent that can:
- Navigate your project -- it explores files, reads documentation, and understands architecture before writing code
- Execute commands -- it runs your tests, installs packages, starts servers, and checks for errors
- Iterate on its own work -- if a test fails, it reads the error, fixes the code, and re-runs it
- Handle complex tasks end-to-end -- "add authentication to this app" becomes a multi-step operation it handles autonomously
Think: other tools are like spell-check. Claude Code is like hiring a contractor who builds the whole room.
Getting Set Up
From zero to your first Claude Code session in under 5 minutes.
You need Node.js version 18 or higher installed on your machine. If you followed the main Teach Me Dev guide, you already have this.
Check your version:
npm install -g installs a package globally, meaning the claude command becomes available everywhere in your terminal, not just in one project folder. The @anthropic-ai/claude-code is the official package from Anthropic's npm organization.
claude for the first time opens your browser to authenticate. You can sign in with:
- Anthropic Console -- if you have an API key (for developers/teams)
- Claude Pro or Max subscription -- if you have a claude.ai subscription (includes Claude Code usage)
Once authenticated, your credentials are stored locally and you won't need to sign in again.
The CLAUDE.md file is a special file you can place in your project root. It gives Claude Code persistent context about your project -- things like coding conventions, architecture decisions, and important commands.
Think of it as onboarding documentation for your AI teammate. Here's what a good one looks like:
## Architecture
- Express backend in /server
- React frontend in /client
- PostgreSQL database
## Commands
- npm run dev -- starts both client and server
- npm test -- runs Jest test suite
- npm run lint -- ESLint check
## Conventions
- Use TypeScript for all new files
- Follow existing naming patterns
- Write tests for new features
If you prefer working in an IDE, install the Claude Code extension for VS Code or Cursor:
- Open VS Code / Cursor
- Go to Extensions (
Cmd+Shift+Xon Mac) - Search for "Claude Code" by Anthropic
- Click Install
- Use
Cmd+Shift+Pand type "Claude" to access commands
The extension embeds Claude Code directly into your editor with an integrated chat panel.
How to Use Claude Code
The conversation interface, slash commands, permissions, and real-world examples.
Just navigate to any project directory and run claude. Claude reads your project structure and is ready to help. You type in natural language -- no special syntax needed.
The conversation is multi-turn: Claude remembers everything you've discussed in the current session. Ask follow-up questions, request changes, or build on previous work.
Slash Commands
Type these during a session to control Claude Code's behavior:
| Command | What It Does |
|---|---|
| /help | Show all available commands and usage tips |
| /clear | Clear the conversation history and start fresh |
| /compact | Summarize the conversation to free up context window space |
| /model | Switch between available Claude models |
| /cost | Show how much the current session has cost so far |
Permission Modes
Claude Code asks for permission before modifying files or running commands. You can configure how much autonomy to give it:
One of Claude Code's most powerful features: it can read and modify multiple files at once. Ask it to "add a new API endpoint with tests and update the documentation" and it will edit your route file, create a test file, and update your README -- all in one operation.
Claude shows you a diff of every change before applying it (in Ask mode), so you can review exactly what's being modified.
Claude Code understands git natively. It can:
- Create commits with meaningful messages based on the changes it made
- Create pull requests with proper descriptions and summaries
- Handle branches -- create feature branches, switch between them
- Review diffs -- ask it "what changed in the last 5 commits?" or "review this PR"
Example Prompts
Here are real prompts you can type into Claude Code. Each one kicks off a multi-step task that Claude handles autonomously.
New projects: Create an empty folder, cd into it, and run claude. Tell Claude what you want to build and it will scaffold the entire project -- package.json, folder structure, initial code, everything.
Existing projects: Navigate to the project root and run claude. Claude reads your existing code and works within your established patterns. It's smart enough to match your code style, use your existing libraries, and follow your conventions.
Power User Tips
Level up your Claude Code workflow with these advanced techniques.
A well-crafted CLAUDE.md is the single biggest improvement to your Claude Code experience. Include:
- Project overview -- what this project does and who it's for
- Architecture notes -- how the code is organized, key design decisions
- Build and test commands -- so Claude can run your project
- Coding conventions -- your preferred style, patterns to follow or avoid
- Important files -- point Claude to key configuration or entry points
Claude reads this file at the start of every session. It's like giving your AI teammate a perfect onboarding document every time.
Claude Code has a context window -- a limit on how much conversation it can remember at once. Long sessions with lots of code reading can fill it up.
When you notice Claude getting slower or less accurate, type /compact. This tells Claude to summarize the conversation so far, freeing up space while preserving the important context. Think of it like taking notes and clearing the whiteboard.
Use claude -p "prompt" to run Claude Code without the interactive conversation interface. The output goes straight to stdout, making it perfect for scripting and automation.
.gitignore file.Line 2: Pipes the contents of
utils.js into Claude as input and gets an explanation back.Line 3: Asks Claude to generate a commit message and copies it to your clipboard (on macOS). These can be combined into shell scripts for powerful automation.
Don't try to put everything in one prompt. Start broad, then iterate:
- First: "Set up a new Express API with TypeScript"
- Then: "Add a users endpoint with CRUD operations"
- Then: "Add JWT authentication"
- Then: "Write tests for everything we've built"
- Finally: "Create a PR with all these changes"
Claude remembers everything from the session, so each prompt builds on the last. This iterative approach gives you more control and better results than one massive prompt.
Git worktrees let you check out multiple branches simultaneously in different directories. Combined with Claude Code, you can run multiple Claude sessions in parallel -- one building a feature, another fixing a bug, another writing tests.
Claude Cowork
Cowork brings Claude's agentic power to your desktop for knowledge work beyond coding — documents, research, file organization, and more.
What Is Cowork?
While Claude Code lives in your terminal for coding tasks, Cowork lives in the Claude Desktop app for everything else. Instead of responding to one prompt at a time, you describe an outcome, step away, and come back to finished work.
- Terminal-based
- Code editing & execution
- Git integration
- Developer workflows
- Desktop app
- File & document processing
- Research & synthesis
- Knowledge work
Requirements
- Claude Desktop app (macOS or Windows)
- Apple Silicon (M1 or later) for macOS
- Paid subscription — Pro ($20/mo), Max ($100–$200/mo), Team, or Enterprise
- Active internet connection
The 30-Minute Setup That Changes Everything
Out of the box, Cowork is mediocre. With proper context files, it becomes a different tool entirely. Create a dedicated workspace folder and add these files:
1. about-me.md
Who you are, what you do, your current priorities. This gives Claude the context to tailor every output to you.
I'm a product manager at a B2B SaaS startup. I manage a team of 5 engineers. My current focus is Q2 planning and our API launch. I prefer concise, direct communication.
2. voice-and-style.md
How you like things written — tone, formatting rules, examples of writing you like.
Tone: Professional but approachable. Use bullet points over paragraphs. Avoid jargon unless the audience is technical. Always include a TL;DR at the top of long documents.
⭐ What Cowork Is Great For
Sort hundreds of files into categorized folders, rename with consistent conventions, and get a log of every change. Drop a messy Downloads folder and get it organized.
Give Claude multiple documents and it reads them all simultaneously, connecting dots across sources rather than just summarizing each. Great for competitive analysis or literature reviews.
Create Excel spreadsheets with working formulas, PowerPoint decks, formatted reports, and SOPs. Outputs are real files, not just text.
Drop receipts in a folder and ask Claude to create a formatted expense report. It extracts amounts, dates, and vendors automatically.
Describe a pattern once and Cowork applies it to everything — rename 200 files, convert formats, extract data from PDFs. One prompt, hundreds of actions.
On Pro/Max plans, assign tasks from your phone and check in later. Start a research task before a meeting, come back to a finished brief.
Supercharge with Connectors
Cowork integrates with 50+ tools through connectors. Some highlights:
See the MCP Connectors page for a full list of integrations.
Fun Projects to Try
Ten project ideas to build with Claude Code -- from beginner to advanced. Each includes the exact prompt to get started.