claudecodeguide.dev

Foundations

Claude Code Basics: The Quick Reference

Eight terms you'll hit in your first hour. Explained fast, in plain English, so the rest of the docs actually make sense.

On this page (9 sections)

Start Here

There are eight things you'll hear about constantly when using Claude Code. This page explains all of them fast.

Not everything needs a deep dive. This is the cheat sheet.

terms you'll encounter in your first session

What is CLAUDE.md?

Your project's instruction manual. Like a README, except Claude actually reads it at the start of every session.

Without a CLAUDE.md, Claude Code is guessing. Your stack, your style, your rules, what mistakes to avoid. It has to infer all of it every single time. With a good one, it's like a team member who actually read the onboarding docs.

Put things in CLAUDE.md that you'd otherwise repeat every conversation. Coding style, tech stack, what Claude keeps getting wrong. It lives at the root of your project. Run /init anytime to get a starter version generated from your codebase.

# CLAUDE.md

## Stack
Next.js 15, TypeScript, Tailwind CSS, Supabase

## Coding Rules
- Never use `any` types in TypeScript
- Always write a test before implementing a feature
- Prefer server components unless the user needs interactivity

## Tone
This is a children's education app. Keep copy friendly and age-appropriate.

Learn more: Full CLAUDE.md Guide


What are Slash Commands?

Shortcuts you type directly into Claude Code. Start with /, trigger a built-in action instantly.

the most useful slash commands

The ones to know on day one:

  • /help: see everything available
  • /clear: fresh start (loses conversation history)
  • /compact: compress context without losing understanding (use this before /clear)
  • /cost: check what your session has spent
  • /model opus / /model sonnet / /model haiku: switch AI models mid-session
  • /init: auto-generate a CLAUDE.md for your project
  • /rewind: undo the last conversation turn

Learn more: Complete Command Cheatsheet


What are Skills?

Custom slash commands you create with a Markdown file. No code required.

A Skill is a .md file that describes a workflow. Drop it in ~/.claude/skills/ and it becomes a /skill-name command in every session. Put it in your project's .claude/skills/ folder and it stays project-specific.

Minimal example. Create a file called commit.md:

# Commit

Stage all changes, write a conventional commit message based on the diff,
and commit. Always include a short summary of what changed and why.

Now type /commit in any session and Claude runs that workflow without you explaining it from scratch. Every time.

Skills are the difference between "using AI" and "having a system." One-time setup, repeatable forever.

Learn more: Building Your First Skill


What are Hooks?

Shell commands that run automatically before or after Claude does things. Like git hooks, but for Claude Code actions.

You configure them in .claude/settings.json. They fire without you remembering to do anything.

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Write",
      "command": "prettier --write $FILE_PATH"
    }],
    "PreToolUse": [{
      "matcher": "Bash",
      "command": "bash .claude/hooks/check-alerts.sh"
    }]
  }
}

Four moments you can hook into:

  • PreToolUse: before Claude calls a tool (Read, Write, Bash, etc.)
  • PostToolUse: after a tool completes
  • SessionStart: when a new session opens
  • SessionEnd: when the session closes

Common uses: auto-format files after Claude writes them, run a security scan before commits, log what Claude does in CI.

Learn more: Hooks Guide


What is MCP?

How Claude connects to tools outside your local files. MCP stands for Model Context Protocol. It's a standard that lets Claude talk to GitHub, Slack, Jira, databases, and dozens of other services.

MCP connecting Claude to GitHub

You configure MCP servers in .mcp.json. Each server gives Claude a set of capabilities: read GitHub PRs, post Slack messages, query your database. Claude picks the right one based on what you ask.

Learn more: MCP Setup Guide


What is the Context Window?

How much Claude can "see" at once. Working memory. Every file Claude reads, every message you send, every output it generates: all of it sits inside the context window during your session.

Current models support up to 1 million tokens (roughly 750,000 words). That sounds enormous, and it is. But long sessions with many files fill up faster than you'd expect.

watching context fill up

When context fills, Claude Code compresses the conversation automatically. Or you can do it manually with /compact. It keeps the important parts and summarizes the rest. Use /status to check where you are.

Learn more: Context Window Deep Dive


What is a Model?

The actual AI brain doing the work. Claude Code runs on three models with different speed, capability, and cost.

ModelSpeedBest for
Opus 4.6SlowerComplex decisions, architecture, cross-file refactors
Sonnet 4.6Fast80% of daily work. The default.
Haiku 4.5FastestQuick edits, simple questions, linting

Start with Sonnet (the default). Switch to Opus when the problem is genuinely hard. Switch to Haiku when the task is trivial and speed matters more than depth.

/model opus     # Big task? Bring in the senior model.
/model sonnet   # Back to the daily driver.
/model haiku    # Just checking a typo? Use the fast one.

You can switch mid-session anytime. The conversation continues uninterrupted.

Learn more: Which Claude Model Should I Use?


What is the Memory System?

How Claude remembers things across sessions. By default, every session starts completely blank. The memory system fixes that.

Memory in Claude Code is file-based: plain Markdown files that Claude reads at the start of sessions. Two levels:

Project memory (CLAUDE.md and files in .claude/): what Claude knows about this specific project. Tech stack, rules, current state.

User memory (~/.claude/MEMORY.md): what Claude knows about you across all projects. Preferences, writing style, corrections you've made before.

memory at work

Without memory, you repeat yourself every session. With it, Claude Code compounds: it gets more useful the longer you use it.

Learn more: Memory System Guide

New guides, when they ship

One email, roughly weekly. CLAUDE.md templates, workflows I actually use, and the cut-for-length stuff that does not make the public guides. One-click unsubscribe.

Or follow on Substack