The 4 Basics of Claude Code — CLAUDE.md, Skills, Context, and Tools
In the last post you installed Claude Code and opened your first session. Now for the four ideas everything else is built on. Get these straight and the advanced stuff — subagents, hooks, MCP, scaling — stops feeling like magic. All of it is checked against the official docs.
1. CLAUDE.md — the project memory
Every session starts with a fresh, empty memory. CLAUDE.md is how you carry your project knowledge across sessions. It is a plain markdown file you write, and Claude reads it at the start of every session. Put the things you would otherwise re-explain every time.
# My Project
- Build: npm run build
- Test: npm test before every commit
- API handlers live in src/api/handlers/
- Use 2-space indentationKeep it short (the docs suggest under ~200 lines) and specific — "use 2-space indentation" beats "format code nicely." It can live at the project root (./CLAUDE.md or ./.claude/CLAUDE.md), in your home folder for personal rules (~/.claude/CLAUDE.md), or org-wide. Rather not write one by hand? Run /init and Claude drafts one from your codebase.
2. Skills — reusable instructions, on demand
A skill is a folder with a SKILL.md file that packs a repeatable task or checklist. Straight from the docs: create a SKILL.md file with instructions, and Claude adds it to its toolkit — Claude uses skills when relevant, or you invoke one directly with /skill-name. The key difference from CLAUDE.md: a skill loads its body only when it is used, so long procedures cost almost nothing until you need them.
.claude/skills/deploy/SKILL.md -> run it with /deploy3. Context — what Claude can see right now
Context is everything Claude currently has in view: your CLAUDE.md, the files it has read, and the conversation so far. It is finite. When it fills up, replies get slower and cost more — so managing it is a real skill. Three commands do most of the work: /clear wipes the context when a task is finished, /compact shrinks a long session but keeps the important parts, and /context shows exactly what is loaded right now.
# wipe the context when a task is finished
/clear
# shrink a long session but keep the important parts
/compact
# see exactly what is loaded right now
/context4. Tools — how Claude actually does things
Talking is not enough — an agent has to act. Tools are the actions Claude can take on your machine.
- Read / Write / Edit — work with your files.
- Bash — run shell commands (tests, builds, git).
- Search — grep across your codebase.
- Web — fetch a page when it needs to.
Every tool runs through a permission system you control — allow, ask, and deny rules. You can pre-approve safe commands (like npm test) and block risky ones (like reading .env), so the agent stays fast where it is safe and asks where it matters.
Next post: the building block that adds real power — subagents.