The Claude Code Setup Guide: From Installation to Your First AI Agent System
Claude Code is Anthropic’s agentic coding tool. It lives in your terminal, reads your entire codebase, edits files, runs commands, creates commits, and connects to external services - all through natural language. It is the tool I use to run multiple multi-agent systems across my businesses - from operations to content to client delivery.
This guide takes you from zero to a working Claude Code setup in one sitting. You will install it, understand how it works, and configure it for real work - CLAUDE.md, skills, MCP servers, hooks, memory, and subagents. By the end, you will have a system ready to build anything from a marketing team to an analytics department to a full business operations stack.
No coding experience required. If you can open a terminal and edit a text file, you can do this.
When you finish this guide, the natural next step is the Obsidian Setup Guide - the reading environment that pairs with Claude Code to turn your project folder into a living knowledge vault.
Part 1: Install Claude Code
System Requirements
Claude Code runs on macOS, Windows, and Linux. Check that your machine qualifies:
- macOS: Version 13 (Ventura) or later. Works on both Apple Silicon and Intel Macs.
- Windows: Windows 10 (version 1809+) or later. Runs natively from PowerShell, CMD, or Git Bash.
- Linux: Ubuntu 20.04+, Debian 10+, or Alpine Linux 3.19+.
You also need:
- 4 GB of RAM (minimum)
- An internet connection (always required - Claude Code connects to Anthropic’s servers)
- A Claude subscription - Pro ($20/month) at minimum. There is no free tier for Claude Code.
Pricing
Claude Code requires a paid plan. Here are your options:
| Plan | Price | What You Get |
|---|---|---|
| Pro | $20/month | Access to Sonnet 4.6 and Opus 4.6. Standard usage limits. |
| Max 5x | $100/month | 5x Pro usage. Recommended for daily use. |
| Max 20x | $200/month | 20x Pro usage. Rate limits rarely a concern. |
| API | Pay-per-token | No monthly commitment. You pay for what you use. |
Start with Pro. If you hit rate limits regularly, upgrade to Max. The API option is for developers who want fine-grained cost control.
Install
No dependencies required. No package managers, no Node.js, no setup wizards.
macOS or Linux:
curl -fsSL https://claude.ai/install.sh | bash
Windows (PowerShell):
irm https://claude.ai/install.ps1 | iex
That is it. One command.
First Launch
Open your terminal, navigate to any project folder, and type:
claude
On first launch, it opens a browser window to sign in with your Claude account. If the browser does not open, press c to copy the login URL and paste it manually.
Once authenticated, you are inside Claude Code. You will see a prompt where you can type natural language instructions. Try something simple: “What files are in this directory?” Claude will read the folder and respond.
Tip: If you use VS Code, install the Claude Code extension from the marketplace. It embeds Claude Code directly in your editor with inline diffs, drag-and-drop file references, and a side panel. A JetBrains plugin is also available for IntelliJ, PyCharm, WebStorm, and other JetBrains IDEs.
Part 2: Understand the Interface
Claude Code is not an IDE. It is an agent that works alongside whatever editor you already use. You talk to it in the terminal (or through an IDE extension), and it acts on your project.
What Claude Code Can Do
When you give Claude Code a task, it has access to built-in tools:
- Read - reads any file in your project
- Edit - makes precise changes to specific lines in a file
- Write - creates new files
- Bash - runs shell commands (builds, tests, git, anything)
- Grep - searches file contents across your codebase
- Glob - finds files by name pattern
Every action goes through a permission system. You approve or deny each tool call, so nothing happens without your knowledge.
The Permission System
This is the most important concept to understand early. Claude Code asks your permission before taking actions. You control how much autonomy it gets by switching between permission modes.
Press Shift+Tab to cycle through modes:
| Mode | What It Does |
|---|---|
| Default | File reads are automatic. Edits and commands require your approval. Start here. |
| Accept Edits | Reads and file edits are automatic. Only shell commands need approval. |
| Plan | Read-only. Claude explores and plans but does not change anything. |
There are additional modes for advanced use (auto, bypassPermissions), but the three above cover everything you need to get started.
When Claude proposes an action, you will see what it wants to do. Press y to approve, n to deny, or type feedback to redirect it. This is not a chatbot that disappears into a black box. You see every move.
Key Shortcuts
| Shortcut | What It Does |
|---|---|
Shift+Tab | Cycle permission modes |
Ctrl+C | Cancel current generation |
Ctrl+D | Exit session |
Alt+P / Option+P | Switch model (Sonnet, Opus) |
Alt+T / Option+T | Toggle extended thinking |
Esc then Esc | Rewind or summarize conversation |
!command | Run a shell command directly without Claude interpreting it |
@filename | Reference a specific file in your message |
/ | Open the command and skill menu |
Launching Variations
You do not always need an interactive session. Claude Code supports several launch modes:
claude # Interactive session
claude "build a login page" # Start with an initial prompt
claude -c # Continue your most recent conversation
claude -p "explain this log" # Print mode - runs, outputs, exits
Print mode (-p) is powerful for scripting. You can pipe content into it:
cat error.log | claude -p "What went wrong here?"
git diff | claude -p "Write a commit message for this change"
Part 3: CLAUDE.md - The Brain File
CLAUDE.md is the single most important file in your setup. It is a plain markdown file that tells Claude who it is, what it is working on, and how it should behave. Claude reads it automatically at the start of every conversation.
The Configuration Hierarchy
Claude Code loads CLAUDE.md files from multiple locations and combines them:
Global (applies to every project):
~/.claude/CLAUDE.md
Project root (applies to one project):
your-project/CLAUDE.md
Subdirectory (applies when working in that folder):
your-project/src/api/CLAUDE.md
These are additive, not overriding. Claude reads all of them, starting from the global file and working down to the most specific directory. This means your global file can contain your universal preferences while each project adds its own context.
What Goes in CLAUDE.md
Here is a starter CLAUDE.md for a business project:
# Project Configuration
## Business Context
- Company: [Your company name]
- Industry: [Your industry]
- What we do: [One sentence]
- Key tools: [The platforms and services you use]
## How to Work
- Be direct. No filler. Every output must be actionable.
- When uncertain, say so. Never fabricate data.
- Cite sources when making claims.
- Ask clarifying questions before starting complex tasks.
## Code Standards
- Language: TypeScript (strict mode)
- Framework: [Your framework]
- Style: Follow existing patterns in the codebase
- Tests: Write tests for new functionality
Keep it concise - aim for under 200 lines per file. Write it in plain language. Update it as your project evolves. You will rewrite this file several times in the first month - that is normal and expected.
Tip: You do not have to write CLAUDE.md from scratch. Ask Claude Code to draft or improve it based on your project. It already understands your codebase. Just type: “Read this project and write a CLAUDE.md that captures the key patterns and conventions.”
Part 4: Skills - Teaching Claude New Capabilities
Skills are reusable instruction sets that extend what Claude can do. A skill is a folder containing a SKILL.md file that Claude follows when working on specific types of tasks.
Why Skills Matter
Without skills, Claude uses its general knowledge for every task. That is like hiring a generalist for every role in your company. Skills let you create specialists - a researcher who knows your competitive landscape, a copywriter who matches your brand voice, an analyst who follows your reporting framework.
The system I use to run Ravenopus - 27 agents, zero employees - is built on skills. They are the difference between a chatbot and an operations layer.
Creating a Skill
Skills live in .claude/skills/ inside your project. Each skill gets its own folder with a SKILL.md file inside.
.claude/skills/
researcher/
SKILL.md
strategist/
SKILL.md
copywriter/
SKILL.md
The SKILL.md Format
Every SKILL.md starts with YAML frontmatter:
---
name: researcher
description: "Conducts competitive intelligence and market research.
Produces structured research briefs with sourced findings
and strategic implications."
---
# Market Researcher
## Role
You are a market research analyst. You gather, synthesize,
and structure information into actionable research briefs.
## How You Work
- Every claim must include a source or be labeled as inference
- Organize findings by theme, not by source
- Include a "So What" section: what do these findings mean
for our next move?
## Output Format
1. Executive Summary (3-5 sentences)
2. Key Findings (organized by theme)
3. Strategic Implications
The description field is what Claude reads to decide whether to activate the skill. When a task matches the description, Claude loads the full SKILL.md and follows its instructions. You can also invoke a skill manually by typing /skill-name in the chat.
What Makes a Good Skill
Keep it focused. One skill, one job. A “researcher” skill and a “copywriter” skill are better than a “do everything” skill.
Write a clear description. Be specific: “Conducts competitive analysis for SaaS companies using LinkedIn, G2, and Crunchbase data” is better than “Does research.”
Include quality standards. “Every claim must include a source” is a quality standard. “Do good research” is not.
Add examples. If the skill produces a specific type of output, include an example of what the finished product looks like. Examples beat instructions every time.
Additional Skill Resources
A skill folder can contain supporting files:
.claude/skills/researcher/
SKILL.md # Main instructions (required)
examples/ # Reference outputs to learn from
resources/ # Templates, data files, reference material
Claude can read these files when following the skill’s instructions.
Tip: You do not have to write skills from scratch. Describe the role you want and ask Claude Code to create the SKILL.md for you. It will generate the frontmatter, instructions, and output format - then you refine from there.
Part 5: MCP - Connecting External Tools
MCP (Model Context Protocol) lets Claude Code connect to external services - databases, APIs, project management tools, cloud platforms, and more. This is what turns Claude Code from a code assistant into a full operations platform.
How MCP Works
An MCP server is a small program that exposes a service’s capabilities to Claude. When connected, Claude can interact with that service directly - creating GitHub issues, querying your database, sending Slack messages, all from the conversation.
Configuring MCP Servers
MCP configuration lives in .mcp.json at your project root:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your-token"
}
}
}
}
For servers you want available across all projects, add them to ~/.claude.json instead.
Claude Code also includes a CLI command for adding servers:
claude mcp add github -e GITHUB_TOKEN=your-token -- npx -y @modelcontextprotocol/server-github
Common MCP Servers
Popular integrations include:
- Development: GitHub, GitLab, Supabase, Firebase
- Project management: Linear, Notion, Jira
- Communication: Slack, Gmail
- Cloud: AWS, Google Cloud, Vercel, Netlify
- Data: PostgreSQL, MongoDB, Redis
- Search: Brave Search, Perplexity
- Payments: Stripe
The MCP ecosystem is open and growing. If a service has an API, there is likely an MCP server for it.
Tip: Never paste real API keys directly into config files. Use environment variables or a
.envfile to keep your secrets out of your project files and version control.
Part 6: Hooks - Automating the Agent’s Behavior
Hooks let you run custom scripts automatically when Claude Code performs specific actions. They are the automation layer - the difference between a tool you use and a system that runs itself.
What Hooks Do
A hook fires at a specific point in Claude’s workflow:
| Hook | When It Fires |
|---|---|
| PreToolUse | Before Claude uses a tool (read, edit, bash, etc.). Can block or modify the action. |
| PostToolUse | After a tool completes. Can react to results. |
| SessionStart | When a conversation begins. |
| TaskCompleted | When Claude finishes a task. |
| PreCompact | Before context compression happens. |
Configuring Hooks
Hooks are defined in your settings file (.claude/settings.json for project-level, ~/.claude/settings.json for global):
{
"hooks": {
"PostToolUse": [
{
"if": "Write",
"hooks": [
{
"type": "command",
"command": "npx prettier --write $CLAUDE_PROJECT_DIR"
}
]
}
]
}
}
This example runs Prettier after every file Claude creates, ensuring consistent formatting without you ever having to ask. The "if" field filters which tool triggers the hook.
Practical Hook Ideas
- Auto-format code after every edit (Prettier, Black, gofmt)
- Run linting after file changes to catch issues immediately
- Block dangerous commands (prevent
rm -rf, force pushes, etc.) with PreToolUse hooks - Log all actions to a file for audit trails
- Run tests automatically after code changes
Hooks are what turn Claude Code from a conversational tool into an automated system with guardrails.
Part 7: Memory - How Claude Remembers
Every new Claude Code conversation starts fresh - it does not automatically recall what you discussed yesterday. Memory is how you make context persist.
CLAUDE.md as Manual Memory
Your CLAUDE.md file is the primary memory mechanism. Anything written there is loaded at the start of every conversation. This is where architectural decisions, conventions, business context, and preferences live.
When you make an important decision during a session - “we chose Postgres over MongoDB because…” - add it to CLAUDE.md so future sessions know.
Auto Memory
Claude Code also has an automatic memory system. When you tell it to remember something, or when it identifies important patterns, it writes memory files to:
~/.claude/projects/<project-hash>/memory/
A MEMORY.md index file tracks all stored memories. The first 200 lines load automatically at the start of each session. You do not need to manage this manually - Claude handles it. But you can review, edit, or delete memories anytime by reading the files directly.
Context Compression
Claude Code has a limited context window. During long sessions, it automatically compresses earlier parts of the conversation to make room for new content. This means very long sessions may lose some detail from the beginning. If something is important enough to survive compression, put it in CLAUDE.md.
Part 8: Subagents - Building a Team
This is where Claude Code becomes a system, not just a tool. Subagents let Claude spawn separate instances of itself - each with its own context, model, and permissions - to handle subtasks in parallel.
How Subagents Work
When Claude encounters a complex task, it can delegate parts of it to subagents. Each subagent:
- Runs in its own isolated context window
- Can use a different model (Opus for complex work, Haiku for quick lookups)
- Has its own tool permissions
- Can access its own MCP servers
- Returns results to the parent agent
Built-in Subagent Types
Claude Code includes three built-in subagent types:
| Type | Model | Purpose |
|---|---|---|
| Explore | Haiku (fast) | Quick codebase searches and file lookups. Read-only. |
| Plan | Inherited | Architectural planning and design. Read-only. |
| General-purpose | Inherited | Full capability. Can read, write, and execute. |
Custom Subagents
You can define custom subagents in your CLAUDE.md with specific roles, models, and tool access. This is how you build a team of specialists from a single tool:
- A research subagent that searches the web and summarizes findings
- A testing subagent that runs your test suite and reports failures
- A documentation subagent that updates docs after code changes
- A review subagent that checks code quality before commits
Agent Teams
For larger operations, Claude Code supports agent teams - multiple Claude Code sessions running in parallel, coordinated through shared context. This feature is currently experimental and must be enabled separately, but it is the architecture behind production systems that replace entire departments.
Part 9: Putting It All Together
Here is what a well-configured Claude Code project looks like:
my-project/
├── .claude/
│ ├── settings.json # Permissions, hooks, preferences
│ └── skills/
│ ├── researcher/
│ │ └── SKILL.md # Market research specialist
│ ├── strategist/
│ │ └── SKILL.md # Strategy and planning
│ ├── copywriter/
│ │ └── SKILL.md # Content creation
│ └── analyst/
│ └── SKILL.md # Data analysis
├── .mcp.json # MCP server connections
├── CLAUDE.md # Project brain file
├── src/ # Your application code
├── docs/ # Documentation
└── outputs/ # Agent-produced deliverables
The system:
- CLAUDE.md tells the agent the business context, conventions, and rules
- Skills create specialist roles the agent can activate on demand
- MCP connections give the agent access to your external tools
- Hooks automate formatting, linting, and safety guardrails
- Memory accumulates over time, making the agent smarter about your project
- Subagents handle parallel tasks, turning one agent into a team
This is not a toy setup. This is the same architectural pattern behind production systems that replace entire departments - research teams, analytics teams, content teams, operations teams. The difference between a chatbot and a system that runs your business is the quality of the configuration layer you build around it.
What Comes Next
You now have a working Claude Code installation with a clear understanding of every major concept. The next step is to build something real.
If you want to see what a production-grade AI system looks like - one that runs an actual agency with 27 agents and zero employees - I share the full architectures, templates, and live builds inside the Built, Not Hired community.
Join Built, Not Hired - $49/month, founding member pricing.
Or if you want a ready-to-deploy system you can install today, browse the AI Blueprint Templates - complete agent configurations, skills, automation workflows, and setup guides for specific business niches.