Skip to main content

Claude Code Skills

Built-in Commands

Session Management

  • /compact: Shrink conversation history to save tokens
  • /clear: Wipe old context
  • /rewind: (Double-tap Esc) Undo recent changes or revert conversation

Configuration

  • /init: Create CLAUDE.md file
  • /model: Switch between models (haiku/sonnet/opus)
  • /mcp: Manage Model Context Protocol servers
  • /powerup: Interactive lessons with animated demos

Development

  • /review: Code review of current changes
  • /loop: Run prompt on schedule (e.g., /loop 5m check deployment)

Monitoring

  • /cost: Token usage breakdown with USD estimate
  • /stats: Token usage and rate limit status

Claude Command Cheatsheet

CommandDescription
/deep-research[dynamic workflow] Deep research harness — fan-out web searches, fetch sources, adversarially verify claims, synthesize a cited report.
/initInitialize a new CLAUDE.md file with codebase documentation.
/update-configUse this skill to configure the Claude Code harness via settings.json. Automated behaviors ("from now on when X", "each time X", "whenever X", "before/after X") require hooks configured in settings.json - the harness executes these, not Claude, so memory/preferences cannot fulfill them. Also …
/add-dirAdd a new working directory.
/agentsManage agent configurations.
/backgroundSend this session to the background and free the terminal.
/branchCreate a branch of the current conversation at this point.
/btwAsk a quick side question without interrupting the main conversation.
/clearStart a new session with empty context; previous session stays on disk (resumable with /resume).
/colorSet the prompt bar color for this session.
/compactFree up context by summarizing the conversation so far.
/configOpen config panel.
/contextVisualize current context usage as a colored grid.
/copyCopy Claude's last response to clipboard (or /copy N for the Nth-latest).
/diffView uncommitted changes and per-turn diffs.
/doctorDiagnose and verify your Claude Code installation and settings.
/effortSet effort level for model usage.
/exitExit the CLI.
/exportExport the current conversation to a file or clipboard.
/feedbackSubmit feedback, report a bug, or share your conversation.
/focusToggle focus view (show only your prompt, a tool summary, and the final response).
/forkSpawn a background agent that inherits the full conversation.
/goalSet a goal — keep working until the condition is met.
/helpShow help and available commands.
/hooksView hook configurations for tool events.
/ideManage IDE integrations and show status.
/keybindingsOpen or create your keybindings configuration file.
/loginSign in with your Anthropic account.
/mcpManage MCP servers.
/memoryEdit Claude memory files.
/mobileShow QR code to download the Claude mobile app.
/modelSet the AI model for Claude Code (currently Sonnet 4.5).
/permissionsManage allow & deny tool permission rules.
/planEnable plan mode or view the current session plan.
/pluginManage Claude Code plugins.
/powerupDiscover Claude Code features through quick interactive lessons.
/recapGenerate a one-line session recap now.
/release-notesView release notes.
/reload-pluginsActivate pending plugin changes in the current session.
/reload-skillsPick up skills added or changed on disk during this session.
/renameRename the current conversation.
/resumeResume a previous conversation.
/rewindRestore the code and/or conversation to a previous point.
/sandboxsandbox disabled (⏎ to configure).
/setup-vertexReconfigure Google Vertex AI authentication, project, region, or model pins.
/skillsList available skills.
/statusShow Claude Code status including version, model, account, API connectivity, and tool statuses.
/stickersOrder Claude Code stickers.
/tasksList and manage background tasks.
/terminal-setupEnable iTerm2 clipboard access for /copy.
/themeChange the theme.
/tuiSet the terminal UI renderer (default | fullscreen).
/usageShow session cost, plan usage, and activity stats.
/workflowsBrowse dynamic workflow history (running and completed).
/batchResearch and plan a large-scale change, then execute it in parallel across 5–30 isolated worktree agents that each open a PR.
/claude-apiBuild, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports anthropic/@anthropic-a…
/code-reviewReview the current diff for correctness bugs and reuse/simplification/efficiency cleanups at the given effort level (low/medium: fewer, high-confidence findings; high→max: broader coverage, may include uncertain findings). Pass --comment to post findings as inline PR comments, or --fix to apply the fi…
/debugEnable debug logging for this session and help diagnose issues.
/fewer-permission-promptsScan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project .claude/settings.json to reduce permission prompts.
/insightsGenerate a report analyzing your Claude Code sessions.
/loopRun a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m).
/reviewReview a pull request.
/runLaunch and drive this project's app to see a change working. Use when asked to run, start, or screenshot the app, or to confirm a change works in the real app (not just tests). First looks for a project skill that already covers launching the app; otherwise falls back to built-in patterns per projec…
/run-skill-generatorAuthor or improve the run- skill — a per-project skill that tells agents how to build, launch, and drive this project's app. Use when the user asks to set up the project, get it running, write run instructions, or verify build/run steps work from a clean environment.
/security-reviewComplete a security review of the pending changes on the current branch.
/simplifyReview the changed code for reuse, simplification, efficiency, and altitude cleanups, then apply the fixes. Quality only — it does not hunt for bugs; use /code-review for that.
/statuslineSet up Claude Code's status line UI.
/team-onboardingHelp teammates ramp on Claude Code with a guide from your usage.
/verifyVerify that a code change actually does what it's supposed to by running the app and observing behavior. Use when asked to verify a PR, confirm a fix works, test a change manually, check that a feature works, or validate local changes before pushing.

Skills System

What are Skills?

Skills are reusable instruction files that Claude follows automatically when relevant to your task.

Skills vs Slash Commands

FeatureSlash CommandsSkills
InvocationManual: You type /command to triggerAutomatic: Claude detects when needed based on context
Best ForOne-off actions, session control (e.g., /cost, /compact)Complex workflows, domain expertise (e.g., security audits, refactoring)
Data StructureSingle .md file in .claude/commands/Folder with SKILL.md + supporting files
Token EfficiencyEntire prompt added to context every invocationProgressive Disclosure: Only name/description load initially

Understanding CLAUDE.md vs Skills vs Slash Commands

Creating Custom Skills

Directory structure:

~/.claude/skills/
├── my-skill/
│ └── SKILL.md
├── another-skill/
│ └── SKILL.md

SKILL.md format:

---
name: my-skill
description: Brief description of what this skill does
---

# Skill Title

Detailed instructions for Claude to follow when this skill is invoked.

## When to Use

Describe scenarios where this skill applies.

## Workflow

Step-by-step instructions:

1. Step 1
2. Step 2
3. Step 3

## Examples

Provide concrete examples of how to use this skill.

Creating a skill:

# Create skill directory
mkdir -p ~/.claude/skills/my-skill

# Create SKILL.md file
cat > ~/.claude/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: Example skill for demonstration
---

# My Skill

Instructions for Claude...
EOF

# Reload skills in active Claude session
/reload-skills

# Invoke the skill
/my-skill

Example skill: Note Skill - Fully automated knowledge base organization with semantic search, categorization, and intelligent linking

Best practices:

  1. Clear invocation triggers: Describe when skill should activate
  2. Structured workflows: Use numbered steps for clarity
  3. Concrete examples: Show expected inputs/outputs
  4. Progressive disclosure: Start with overview, add details in sections
  5. Test thoroughly: Try skill on real tasks before committing

Skill resources: