Claude Code: The Complete Guide to Getting More Done

Claude Code is one of the most capable AI developer tools available, but most people using it are only scratching the surface. This guide covers installation, the features that actually matter, and the techniques that make the difference between a slow AI assistant and a genuinely fast development workflow.

What Is Claude Code?

Claude Code is a CLI (command-line interface) tool built by Anthropic that lets Claude operate as an agent inside your development environment. Unlike chat interfaces where you copy-paste code back and forth, Claude Code runs in your terminal, reads your project files directly, edits them, runs commands, and iterates — like a developer you’ve briefed on your codebase.

It’s built on the Anthropic API, billed per token, and works alongside any editor.

Installation

You need Node.js 18+ and an Anthropic API key.

npm install -g @anthropic-ai/claude-code

Set your API key:

export ANTHROPIC_API_KEY=sk-ant-your-key-here

Or add it to your shell profile (~/.zshrc or ~/.bashrc) so it persists.

Then just run:

claude

From any project directory to start a session.

The CLAUDE.md File — The Most Important Feature

If you only do one thing from this guide, do this: create a CLAUDE.md file in your project root.

Claude Code reads this file at the start of every session as project-specific instructions. It’s how you give Claude persistent context about your codebase without repeating yourself every time:

# My Project

## Stack
- Node.js 20, Express 5, TypeScript
- PostgreSQL via Prisma ORM
- Tests: Vitest

## Key Files
- `src/api/` — REST endpoints
- `src/services/` — Business logic
- `prisma/schema.prisma` — Database schema

## Rules
- Always add JSDoc comments to new functions
- Use British English in user-facing strings
- Run `npm test` before declaring any task done
- Never hardcode credentials — use environment variables

With this file in place, Claude starts every session knowing your stack, conventions, and rules. You stop re-explaining context and it stops making the same mistakes twice.

Slash Commands

Claude Code has built-in slash commands that are genuinely useful:

/help — List all available commands and shortcuts

/compact — Summarises the current conversation to free up context window. Use this on long sessions before the context gets full.

/clear — Starts a fresh session. Useful when switching between unrelated tasks.

/cost — Shows the API cost of the current session. Essential for keeping track of spend.

/review — Asks Claude to review the changes it’s made in the current session and summarise what was done.

MCP Integration — Claude Code’s Superpower

Claude Code supports MCP (Model Context Protocol) servers, which dramatically expand what it can do. Configure them in ~/.claude/settings.json:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your_token" }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    }
  }
}

With the GitHub MCP, Claude can check what’s merged, create issues, and read PRs. With the Postgres MCP, it can query your database directly to understand the actual data state while building features.

Skills — Reusable Project Instructions

Claude Code supports a skills system: markdown files in a .claude/skills/ directory that Claude can be told to read before specific tasks. Think of them as detailed SOPs for recurring work types.

Example: create .claude/skills/api-endpoint.md containing your standard pattern for building REST endpoints — authentication requirements, error handling conventions, test structure. When you start a task involving a new endpoint, reference the skill: “Use the api-endpoint skill to add a POST /users route.”

Claude reads the skill file, applies all your conventions, and you get consistent code without having to re-specify your standards every time.

Practical Tips for Getting More Done

Be specific about scope. “Refactor the auth module” is vague and expensive. “Extract the JWT validation logic from auth.ts into a new validateToken() function, update all callers, and add unit tests” gives Claude a clear bounded task.

Use /compact proactively. Don’t wait for Claude to tell you the context is full. After a major task completes, run /compact to summarise and free up space for the next task.

Check costs with /cost. Develop a sense of what tasks cost. Typical costs: quick question = 1–3p, medium refactor = 10–30p, large feature = 50p–£2.

Let it run tests. If your test suite runs quickly, tell Claude to run tests after every change. “Make the change and run npm test until it’s green” turns it into a proper TDD loop.

Use it for documentation. “Read the entire src/ directory and write a comprehensive README explaining the architecture” is something Claude does very well and developers almost never have time for.

Key Takeaways

  • Claude Code is a terminal-based AI agent that reads and edits your actual codebase — not a chat where you copy-paste
  • The CLAUDE.md file is essential — it’s persistent context that makes every session immediately productive
  • MCP integration (GitHub, Postgres, etc.) expands what Claude can see and do while working on your project
  • The skills system lets you codify your conventions and apply them consistently across every task
  • Typical developer API spend is Ā£20–60/month; use /cost regularly to stay aware of session spend

AI Maestro specialises in practical guides for Claude tools and AI development workflows.

Stay ahead of AI. Get the most important stories delivered to your inbox — no spam, no noise.

[newsletter_form]
Scroll to Top