VillaAula
Log in
← AI Coding Wiki

COMMANDS

Claude Code: the commands worth knowing

Install it, start it, and the handful of slash commands you'll actually use. Plus the one file that makes every future session smarter.

claude-codecommandscheatsheet

These tools change fast. Treat this page as a starting map, and treat /help inside the tool as the truth — it's always current, and this page never will be.

The two-minute setup

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

cd my-project

claude

Sign in the first time, and that's the whole installation. It needs Node.js to be installed first — check with node --version.

The file that pays for itself: CLAUDE.md

Run /init and Claude Code will read your project and write a CLAUDE.md — a description of what the project is, how to run it, and how to test it. From then on, it reads that file at the start of every session.

Edit it by hand. Add the things you'd tell a new teammate: run the tests with `npm test`; user-facing text is in Spanish; never touch `legacy/`. Every rule you write there once is a rule you never repeat again. Codex has the same idea, in a file called `AGENTS.md`.

Slash commands

Typed inside Claude Code. They talk to the tool, not to the AI.

CommandWhat it doesWhen you'd reach for it
/helpList the available commandsAny time you're unsure — start here
/clearWipe the conversation, start freshBetween two unrelated tasks
/initWrite a CLAUDE.md describing the projectOnce, on a new project
/modelSwitch which Claude model is usedA harder task deserves a stronger model
/reviewReview the code changes you've madeBefore you commit

Watch out — /clear matters more than it looks. A long conversation full of an old task makes the next answer worse — the agent keeps reasoning about things you've moved on from.

Terminal commands (typed before you start it)

CommandWhat it does
npm install -g @anthropic-ai/claude-codeInstall it once, for the whole computer
claudeStart it in the current folder
cd my-projectMove into the project first — the folder you start in is what it can see
node --versionCheck that Node.js is installed (a prerequisite)

The habits that matter more than the commands

HabitWhy
Work in a Git repoAny change it makes can be undone. This is the safety net
Ask for the plan firstCatch a wrong direction before it becomes eleven wrong files
/clear between tasksStale context makes the next answer worse
Keep CLAUDE.md honestIt's read every session — a wrong line there is wrong forever

Used in these lessons

Related

Saved on this device