Claude Code Cheat Sheet: Commands & Context
Claude Code is an AI coding tool that can work with project files and development tools. This cheat sheet explains how to plan a change, maintain concise project instructions, use reusable skills and manage conversation context.
Start with four habits: plan the task, keep CLAUDE.md focused, check what is filling the context window, and summarize a long session when needed. Context capacity and usage allowance are different: /compact frees context space but does not reset your plan’s usage limits.
This guide covers Claude Code. Some tips about Projects and uploaded documents apply to Claude chat instead. Commands and features can differ by version, platform, account and installed plugins, so type / in your own session to see what is available.
๐ Quick command reference
| Command | What it does |
|---|---|
/help | Show help and the commands available to you. |
/init | Create a starter CLAUDE.md with project instructions. |
/memory | Edit CLAUDE.md files and turn auto memory on or off. |
/plan | Enter plan mode before a larger change. |
/model | Switch to another available model. |
/context | See what is filling the context window. |
/compact | Summarize the conversation so far to free context. |
/clear | Start a new conversation with empty context. |
/mcp | Manage MCP server connections and sign-ins. |
/skills | List the skills available in your session. |
/usage | Check how much of your plan you have used. |
Commands change between releases. Anthropic keeps the full list in its Claude Code commands reference.
๐ Why Claude Code Matters
Claude Code does more than generate snippets.
It helps with:
- Structuring projects
- Managing context intelligently
- Automating repetitive tasks
- Creating reusable workflows
- Improving consistency across teams
The biggest productivity gains usually come from:
- better project organization
- stronger prompting systems
- workflow automation
- reducing context confusion
๐ CLAUDE.md
One of the most useful concepts is a project-specific rulebook.
A CLAUDE.md file holds lasting instructions for your project. Claude Code loads it at the start of each session.
It can include:
- coding standards
- architecture preferences
- deployment workflows
- review checklists
- naming conventions
Instead of repeating the same instructions every session, you write them once.
One limit to know: Claude treats CLAUDE.md as context, not as enforced configuration, so it is not a guarantee that every rule will be followed. Anthropic’s memory documentation points to hooks when an action has to be blocked no matter what. Run /memory to review what is loaded.
Pro Tip
Keep the file short and specific. Move long, step-by-step procedures into skills or supporting files.
๐งฉ /skills
A skill is a set of reusable instructions saved as a SKILL.md file in its own folder. Type /skills to list the skills available in your session, and run one directly by typing / followed by its name. Claude can also load a skill on its own when your request matches the skill’s description. Details are in Anthropic’s skills documentation.
Skills help standardize recurring tasks like:
- code reviews
- debugging workflows
- deployment preparation
- security validation
- documentation formatting
Think of skills as reusable AI operating procedures. What is available can vary by version and setup.
๐ /mcp
The /mcp command manages your connections to MCP (Model Context Protocol) servers and their sign-ins. MCP servers let Claude reach:
- local tools
- databases
- APIs
- other services your team uses
A server has to be installed, configured and authorized before Claude can use it. Running /mcp does not by itself open every database or service to Claude.
Once a connection is set up, you stop copying information back and forth by hand.
๐ค /agents
Subagents take a task into their own separate context and report back. This is useful for:
- writing tests
- reviewing code
- analyzing documentation
- handling isolated subtasks
In current versions, /agents prints a reminder to ask Claude to create or manage subagents, or to edit the files in .claude/agents/ yourself. Older versions opened an interactive screen.
Each subagent sends its own requests, so splitting work up adds to your usage instead of saving it. Anthropic’s cost guide covers this.
๐ง /plan
/plan puts Claude Code into plan mode, where it reads and proposes before it changes any files.
Planning first encourages:
- architectural thinking
- system mapping
- dependency review
- implementation sequencing
A practical example: ask for a plan to change the contact form, read which files it will touch, narrow the scope, and only then let it make the edit.
๐ฆ /compact
Context overload is real. As a session grows, Claude has more to read on every turn.
/compact summarizes the conversation so far to free space in the context window. You can tell it what to keep, for example /compact keep the current goal, changed files and open decisions.
It does not reset your plan’s usage limit or give back usage already spent. The summary is itself a large request, because Claude reads the whole conversation to write it (Anthropic cost guide).
It is most useful in:
- large projects
- extended debugging sessions
- multi-step implementation workflows
๐ Auto memory and /memory
An earlier version of this cheat sheet listed autodream. It does not appear in Anthropic’s current commands reference, so we replaced it with the documented feature.
Auto memory lets Claude write its own notes from your corrections and preferences and load them in later sessions. Run /memory to review those notes, edit your CLAUDE.md files, or turn auto memory off. See how Claude remembers your project.
๐ /ralph-loop (optional plugin)
/ralph-loop is not a built-in command. It comes from the Ralph Loop plugin in Anthropic’s official plugin directory and works only after you install and enable that plugin.
It feeds the same prompt back to Claude round after round until a completion phrase appears or a set number of rounds is reached. Loops like this can help with:
- debugging
- testing
- refinement
- continuous validation
The plugin’s own instructions say to always set an iteration limit, such as --max-iterations 10, and to give a clear completion test. Every round uses more of your plan. /cancel-ralph stops a running loop.
๐ ๏ธ How to start a focused Claude Code session
- Describe one concrete goal: “Update the contact form so the confirmation identifies the submitted inquiry.”
- Ask for a plan and review the affected files before anything is changed.
- Put lasting project instructions in a concise CLAUDE.md. For example: “Use the existing form component and explain how the changed behavior was checked.”
- Use
/contextif the session fills with unrelated files or long outputs. - If the same task continues in a long conversation, use
/compactwith instructions to keep the current goal, changed files and unresolved decisions. For unrelated work, start a new conversation with a brief handoff. - Review the actual change and check the requested behavior before publishing or deploying.
This example is an editorial illustration, not an Anthropic performance claim.
๐ง Where your Claude usage goes: five habits to review
- Long conversations. Summarize the current goal, decisions and next step, then move to a focused chat. Do not restart needlessly while you are still on the same task.
- Repeated documents in Claude chat. Keep documents you reuse in a Project’s knowledge. Anthropic says reused, cached Project content counts less against your limits; the cache expires after a period of inactivity, and then the content counts in full again.
- Model choice. Match the model and effort setting to the work. Sonnet suits routine coding; save heavier settings for work that needs them.
- Unnecessary input. Send the pages, files or excerpts the request needs, plus any context required to read them correctly.
- Long Claude Code sessions. Check
/context, keep CLAUDE.md concise and use/compactwhen it fits. These habits manage context. None of them resets a usage cap.
We cover each habit in more detail, with hiring examples, in Where Your Claude Limit Goes on ExecSearches.com.
โก Pro Tips for Better Claude Code Workflows
โ Initialize projects properly
Set standards early before large workflows begin.
โ Review diffs carefully
AI-generated code still requires human judgment.
โ Use structured workflows
Templates and repeatable systems outperform random prompting.
โ Keep context clean
Smaller, focused sessions usually perform better than giant conversations.
โ Separate planning from execution
Thinking before implementation improves long-term maintainability.
โ Frequently asked questions
What is the difference between Claude Code and Claude chat?
Claude Code is built around coding tasks, project files and development tools. Claude chat supports conversational work and features such as Projects. Their interfaces and available commands differ.
Does /compact reset Claude usage limits?
No. It summarizes conversation history to make room in the context window. It does not restore a plan allowance or erase usage already consumed.
Should I put everything in CLAUDE.md?
No. Keep lasting instructions concise and project-specific. Put detailed reusable procedures in skills or supporting files, and review what is actually loaded with /memory.
Are /ralph-loop and autodream standard Claude Code commands?
No. /ralph-loop comes from the optional Ralph Loop plugin, which has to be installed and enabled. Autodream does not appear in Anthropic’s current commands reference; use auto memory and /memory instead. Type / in your own session to see what you have.
Can Claude Projects reduce repeated-document usage?
Yes, within limits. Reused, cached Project content counts less than new input, but caches expire after a period of inactivity. Projects do not provide unlimited usage.
๐ฏ Final Thoughts
The future of AI-assisted development is less about better prompts.
It is more about:
- workflow orchestration
- reusable systems
- structured memory
- context management
- human-guided automation
Developers who learn these patterns early will get more from these tools than people using AI casually.
AI is quickly becoming less about isolated chats and more about building repeatable operating systems for thinking, coding, and execution.
๐ Sources
- Claude Code commands reference
- Claude Code skills
- How Claude remembers your project (CLAUDE.md and auto memory)
- Manage costs effectively in Claude Code
- Usage limit best practices, Claude Help Center
- How do usage and length limits work?, Claude Help Center
- Ralph Loop plugin README, Anthropic official plugins
F. Jay Hall
ExecSearches.com | Nonprofit-Jobs.org | GRC-Careers.org
Https://Calendly.com/ExecSearches
Related reading: Claude Secret Codes: 17 Slash Commands Every AI Power User Should Know. Its examples are custom prompt workflows, not built-in Claude Code commands.
Last updated on November 11th, 2026 at 01:00 pm