Everything you need to go from zero to productive with Claude Code. Installation, first session, brain files, skills, agents, memory, and the commands that tie it all together. Written for developers, not marketers.
Claude Code is an agentic coding tool that runs in your terminal. It reads your codebase, edits files, runs commands, manages git, and builds features autonomously. Unlike chat-based assistants where you copy-paste snippets back and forth, Claude Code operates directly on your file system. You describe what you want. It does the work.
Think of it as a senior developer sitting next to you. It can read every file in your project, understand the relationships between modules, run your test suite, check linting errors, and make changes across multiple files in a single pass. When it edits a file, the changes appear on disk immediately — there is no copy-paste step.
Claude Code is built by Anthropic and powered by Claude. It supports multiple model tiers — Haiku for fast, low-cost operations, Sonnet for balanced everyday work, and Opus for deep reasoning on complex tasks. You pick the tier that matches the task, or let the system route automatically.
This tutorial walks through the entire setup and workflow from a fresh install to a fully configured system with persistent memory, auto-loading skills, and multi-agent orchestration. If you have never touched Claude Code before, start here. If you have used it casually and want the production setup, skip ahead to the CLAUDE.md Brain section.
Claude Code requires Node.js 18 or later. If you do not have Node installed, grab it from nodejs.org or use a version manager like nvm. Then install Claude Code globally:
npm install -g @anthropic-ai/claude-codeVerify the installation:
claude --versionOn first launch, Claude Code will prompt you to authenticate with your Anthropic account. You need an active API key or a Claude Max subscription. The tool stores your credentials locally — nothing is sent anywhere except the Anthropic API.
System requirements:
If you are on Windows, use WSL2. Claude Code shells out to bash for file operations and git commands, so a Unix-like environment is required. Native Windows support may come later, but WSL2 works perfectly today.
Navigate to your project directory and start Claude Code:
cd ~/projects/my-app
claudeClaude reads your project files and builds an internal map of your codebase. You will see a prompt where you can type natural language instructions. Try something simple first:
> What is the tech stack in this project?Claude will read your package.json, scan your source files, and give you an accurate summary. It is not guessing — it is reading your actual code.
Now try an edit:
> Add a health check endpoint at /api/health that returns { status: "ok" }Claude will create the file, write the handler, and show you what it did. Check your file system — the file is already there. No clipboard involved.
Permission prompts
Claude Code asks for permission before writing files, running commands, or executing destructive operations. Read the prompts carefully during your first few sessions. You can configure allowlists in .claude/settings.json to reduce prompts for trusted operations later.
Spend 30 minutes doing simple tasks — reading files, making small edits, running tests. Get comfortable with the loop: you describe, Claude executes, you verify. Once that loop feels natural, move on to building a proper brain.
Here is where casual usage ends and professional usage begins. CLAUDE.md is a markdown file at your project root that Claude reads automatically at the start of every session. It is the single most important file in your setup because it defines the operating context for everything Claude does in your project.
Without it, Claude starts every session fresh. It does not know your conventions. It does not know your architecture. It does not know your rules. You spend the first five minutes of every session re-explaining context that should be permanent.
With a well-structured CLAUDE.md, Claude reads your rules on startup and behaves like a teammate who has been on the project for months. Here is the structure that works:
# CLAUDE.md
## Identity
You are a Senior TypeScript Developer working on [project name].
You speak in direct technical language. No filler.
## Tech Stack
- Framework: Next.js 16 App Router
- Styling: Tailwind CSS v4
- Database: PostgreSQL via Prisma
- Auth: NextAuth.js v5
- Testing: Vitest + Playwright
## Rules (Non-Negotiable)
- Always use TypeScript strict mode — never plain JS.
- Never use the `any` type — define proper interfaces.
- All imports use the @/ path alias.
- Components go in src/components/, one per file.
- Keep components under 150 lines.
- Use server components by default. Only add 'use client'
when interactivity is required.
## Architecture Decisions
- [ADR-001] Using server actions for mutations
- [ADR-002] Zod for runtime validation
- [ADR-003] Repository pattern for data access
## Git Conventions
- Commit format: type: short description
- Types: feat, fix, refactor, style, docs, chore, test
- Feature branches from main
## Known Issues
- JWT fallback secret in auth.ts — env var required in prod
- Cold start delay on first DB query (~800ms)Keep this file under 200 lines. Claude reads it at session start, so every line consumes context tokens. Put only the information that applies to every session. Transient state goes elsewhere (more on that below).
You can also create a CLAUDE.local.md for personal overrides that are gitignored. This is where you put your personal preferences, local API keys (as references, not values), and workflow tweaks that only apply to your machine.
A skill is a markdown instruction file that tells Claude how to do a specific type of work. Instead of hoping the model remembers best practices for React testing or Tailwind patterns, you give it explicit instructions that load when the task matches.
Skills live in ~/.claude/skills/ as SKILL.md files. Each one has a trigger pattern, step-by-step instructions, and quality standards. When a pre-task hook detects a matching task, the skill loads into context automatically. You do not manually select skills — the system routes them based on task classification.
Example skill loading:
testing/SKILL.md and playwright/SKILL.mdAgents take this further. An agent is a persona with a specific role — coder, reviewer, tester, researcher, security auditor, debugger. Each agent has its own memory file and skill assignments. When you need a code review, the reviewer agent loads with review-specific skills and evaluates the code against your project standards, not generic rules.
For complex tasks, multiple agents work together. A build squad might include a coder, a tester, and a reviewer working in sequence. The coder implements, the tester writes tests, and the reviewer audits both outputs. This is not theoretical — it is how the agent teams system works in practice.
Browse the full ecosystem catalog to see all available skills and agents. The AI Brain Pro package ships with 1,700+ skills and 109 pre-configured agents ready to use on day one.
Claude Code sessions are ephemeral by default. When you close the terminal, everything from that session is gone. The memory system fixes this by layering different types of persistence on top of the session.
The architecture has multiple tiers, each with a different lifespan:
What is happening right now — current task, recent decisions, active blockers. Pruned weekly to stay under 100 lines.
Permanent lessons learned from failures and successes. This file only grows. When something breaks and you figure out why, it goes here.
Per-agent persistent state. The coder agent remembers which patterns worked. The reviewer remembers common issues. Each specialist builds its own history.
Chronological session logs. What was done, what decisions were made, what was deployed. Useful for auditing and onboarding new team members.
The key insight is separation. Working memory changes every session. The knowledge base accumulates over months. Agent memory is scoped per role. Daily archives provide a complete audit trail. If you put all of this in one file, it becomes unreadable within a week. If you skip memory entirely, every session starts from scratch.
The self-improvement loop ties it together. After every task, the system evaluates what worked and what did not. Successful patterns get promoted to the knowledge base. Failures get documented as rules. Over weeks, the brain accumulates institutional knowledge that makes Claude measurably better at your project. See more in our second brains directory for real-world configurations.
Claude Code supports slash commands — custom scripts defined in .claude/commands/ that automate common workflows. You type the command, Claude executes the instructions in the markdown file. Here are the ones you will use daily:
/startRun at session startLoads memory.md, creates a daily note, searches for relevant skills based on your current task, and restores full project context. This is how Claude picks up where you left off instead of starting from zero.
/syncRun mid-sessionUpdates memory.md with the current state of your work. Processes any notes from the scratchpad. Refreshes context if the session has been running long enough to drift. Think of it as a manual save point.
/wrap-upRun at session endArchives the session, updates the knowledge base with new lessons, commits memory changes to git, and clears transient state. Tomorrow's /start picks up from where /wrap-up left off.
/auditRun after finishing a featureReviews recent work for quality issues, security concerns, and deviation from project standards. Rates output on a 1-10 scale across correctness, completeness, efficiency, and security. Catches problems before they ship.
/unstickRun when stuckBreaks out of retry loops. When you have hit the same error three times, this command forces a step back — diagnoses the root cause, considers alternative approaches, and either solves it or escalates with a clear explanation of what is blocking progress.
You can create your own commands by adding markdown files to .claude/commands/. Each file defines instructions that execute when you type the corresponding slash command. The AI Brain Pro ships with 15+ pre-built commands covering development, review, deployment, and maintenance workflows.
After hundreds of hours using Claude Code in production across multiple projects, these are the patterns that make the biggest difference:
"Fix the bug" gives Claude nothing to work with. "The checkout form submits twice when clicking the pay button — add a loading state to the submit handler in CheckoutForm.tsx" gives it everything. More context in the prompt means fewer correction cycles. Point to specific files when you can.
Break every task into units that can be completed and verified in under 15 minutes. "Build the entire authentication system" is a multi-hour task that will produce mediocre results. "Create the login API route with JWT token generation" followed by "Create the login form component with error handling" produces better output because each unit is small enough to verify properly.
Claude Code shows you what it plans to do before executing. Read the diffs. Check the file paths. Verify the approach. Approving blindly is how you end up with unwanted package installations, wrong directory structures, or subtle bugs that compound. The review step takes 30 seconds and saves hours.
When your architecture changes, update CLAUDE.md immediately. Stale rules are worse than no rules because Claude will follow them confidently. If you switched from Prisma to Drizzle last week but CLAUDE.md still says Prisma, Claude will generate Prisma code and waste your time correcting it. Treat CLAUDE.md like documentation that must stay current.
Claude Code hooks run before and after specific events — file edits, bash commands, task completion. Use pre-task hooks to load relevant skills automatically. Use post-task hooks to update memory. Use pre-compact hooks to save state before context compaction. The goal is zero manual memory management. The system handles it.
Sessions have finite context windows. After 30+ tool calls or several large file reads, quality degrades. When you notice repetition or missed details, save your state and start a fresh session. A clean context with good memory files outperforms a bloated context every time. The /sync command exists for exactly this reason.
The AI Brain Pro includes everything from this tutorial — CLAUDE.md templates, memory architecture, 1,700+ skills, 109 agents, lifecycle commands, hooks, and the self-improvement loop. One download, drop it into your project, start working at full speed.
No subscription. No calls. No demos. Buy it, download it, use it.
Get AI Brain Pro — $97One-time purchase. Lifetime updates. Instant download.