Quick reference
Common commands and prompt patterns for Claude Code, Gemini CLI, and Codex CLI.
Installation
npm install -g @anthropic-ai/claude-code
Verify: claude --version
npm install -g @google/gemini-cli
Verify: gemini --version
npm install -g @openai/codex
Verify: codex --version
Requires Node.js 20+ and Git. Check with node --version and git --version.
Context files
| TOOL | FILE | PURPOSE |
|---|---|---|
| Claude Code | CLAUDE.md | Project instructions, style rules, beat context |
| Gemini CLI | GEMINI.md | Project instructions for Gemini |
| Codex CLI | AGENTS.md | Project instructions for Codex |
Place these files in your project root. Claude Code merges context from parent directories automatically.
Claude Code slash commands
| COMMAND | PURPOSE |
|---|---|
| /help | Show all available commands |
| /plan | Enter planning mode (review approach before execution) |
| /clear | Clear conversation history |
| /compact | Compress context to free up token space |
| /model | Change model mid-session |
| /cost | Show token usage and cost |
| /config | View or edit settings |
| /doctor | Check installation health |
Claude Code flags
| FLAG | PURPOSE |
|---|---|
| --model MODEL | Specify model (e.g. claude-sonnet-4-20250514) |
| --continue | Continue last session |
| --resume | Resume a specific session |
| Non-interactive mode (single prompt, then exit) | |
| --output-format json | Get JSON output (useful in pipelines) |
| --max-turns N | Limit conversation turns |
| --verbose | Show debug info |
Prompt patterns
Always use /plan before describing a task. Review the plan before letting the tool execute.
Catches misunderstandings before code is written.
Test automation on material you've already read and verified. Don't start with fresh documents.
Lets you spot pipeline problems vs. hard-to-process content.
Read each line of your context file: "If I removed this, would AI behave differently?" If not, delete it.
Remove generic instructions like "be accurate" that don't change behavior.
Ask the CLI tool to handle Git: "Initialize a repo," "commit my changes," "show status." No need to memorize commands.
Tell the tool what you want, not how to do it.
Pipeline patterns
cat article.txt | gemini "summarize this"
claude --print "Read press-release.md and extract quotes"
claude --print --output-format json "List sources in article.md"
Skills
Inside Claude Code:
/install-github-plugin https://github.com/USER/REPO.git
Skills are stored at:
~/.claude/commands/[skill-name]/SKILL.md
Invoke with /skill-name in Claude Code.
For full details, see the course modules. This page covers the most-used commands and patterns.