{"id":2968,"date":"2026-04-25T18:55:54","date_gmt":"2026-04-25T18:55:54","guid":{"rendered":"https:\/\/aiopsschool.com\/blog\/?p=2968"},"modified":"2026-04-25T18:55:54","modified_gmt":"2026-04-25T18:55:54","slug":"the-master-tutorial-every-claude-code-slash-command-explained-april-2026-edition","status":"publish","type":"post","link":"https:\/\/aiopsschool.com\/blog\/the-master-tutorial-every-claude-code-slash-command-explained-april-2026-edition\/","title":{"rendered":"The Master Tutorial: Every Claude Code Slash Command Explained (April 2026 Edition)"},"content":{"rendered":"\n<p>If you&#8217;ve ever opened Claude Code, typed <code>\/<\/code>, and watched a long menu of commands appear, you&#8217;re not alone in feeling slightly overwhelmed. This guide is the complete map. Every built-in command, every bundled skill, what it does, when to use it, and the gotchas nobody tells you about.<\/p>\n\n\n\n<p>This tutorial is current as of <strong>April 2026<\/strong> and is based on Anthropic&#8217;s official Claude Code documentation. Your exact menu may vary slightly depending on your version, installed plugins, and connected MCP servers \u2014 when in doubt, type <code>\/help<\/code> in your session to see what&#8217;s actually available to you.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Table of Contents<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>What slash commands actually are<\/li>\n\n\n\n<li>Session and context management commands<\/li>\n\n\n\n<li>Project setup and memory commands<\/li>\n\n\n\n<li>Code review and quality commands<\/li>\n\n\n\n<li>Configuration and customization commands<\/li>\n\n\n\n<li>Model and execution control commands<\/li>\n\n\n\n<li>Extension and integration commands<\/li>\n\n\n\n<li>Bundled skills (the prompt-based commands)<\/li>\n\n\n\n<li>Custom commands and skills you create yourself<\/li>\n\n\n\n<li>MCP server commands<\/li>\n\n\n\n<li>Special syntax: <code>@<\/code>, <code>!<\/code>, and <code>#<\/code><\/li>\n\n\n\n<li>Tips, gotchas, and best practices<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1. What Slash Commands Actually Are<\/h2>\n\n\n\n<p>A slash command is a typed shortcut you use inside a Claude Code session. You hit <code>\/<\/code>, an autocomplete menu appears, and you pick or type the command you want. They fall into a few buckets:<\/p>\n\n\n\n<p><strong>Built-in commands<\/strong> ship with Claude Code itself and run fixed logic \u2014 things like clearing your conversation or compacting context. They&#8217;re hardcoded and fast.<\/p>\n\n\n\n<p><strong>Bundled skills<\/strong> also ship with Claude Code, but they&#8217;re prompt-based. They give Claude a detailed playbook and let it orchestrate the work using its tools. They look like commands when you type <code>\/<\/code>, but they&#8217;re really mini-instructions Claude executes intelligently.<\/p>\n\n\n\n<p><strong>Custom commands<\/strong> are anything you create yourself in <code>.claude\/commands\/<\/code> or <code>.claude\/skills\/<\/code>. As of the 2026 update, these two have been unified \u2014 they both create a <code>\/your-command-name<\/code> and work the same way.<\/p>\n\n\n\n<p><strong>MCP commands<\/strong> come from connected Model Context Protocol servers (GitHub, Slack, Atlassian, etc.) and appear as <code>\/mcp__servername__promptname<\/code>.<\/p>\n\n\n\n<p>Understanding which bucket a command falls into helps you predict its behavior. Built-ins are deterministic. Skills and custom commands are flexible but rely on Claude&#8217;s reasoning.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. Session and Context Management Commands<\/h2>\n\n\n\n<p>These are the commands you&#8217;ll touch most often. Master them first.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/help<\/code><\/h3>\n\n\n\n<p>Shows every command available in your current session \u2014 built-ins, bundled skills, your custom commands, and any MCP server prompts. This is your &#8220;I forgot what&#8217;s possible&#8221; command. Use it whenever you want to see the actual live list rather than trusting any cheat sheet (including this one).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/clear<\/code><\/h3>\n\n\n\n<p>Wipes your conversation history and starts a fresh session. Use this when you switch tasks. Many experienced users describe <code>\/clear<\/code> as the single biggest token-saver in their workflow \u2014 every time you start something new, clear the chat. You don&#8217;t need yesterday&#8217;s bug-hunt context polluting today&#8217;s feature work.<\/p>\n\n\n\n<p><strong>Rule of thumb:<\/strong> if your next prompt has nothing to do with the previous one, run <code>\/clear<\/code> first.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/compact<\/code><\/h3>\n\n\n\n<p>Summarizes older messages while preserving important context. Use this when you want continuity but your context window is getting full. You can pass an argument telling Claude what to retain:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/compact retain the error handling patterns and the database schema\n<\/code><\/pre>\n\n\n\n<p>The general guidance is: use <code>\/compact<\/code> when context usage exceeds about 80%, and <code>\/clear<\/code> when switching tasks entirely.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/context<\/code><\/h3>\n\n\n\n<p>Shows current context window usage. Useful when you&#8217;re trying to decide whether to keep going, run <code>\/compact<\/code>, or <code>\/clear<\/code> and start over.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/cost<\/code><\/h3>\n\n\n\n<p>Displays token usage and cost for the current session. Good for keeping an eye on spend, especially if you&#8217;re on API billing rather than a Pro\/Max subscription.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/usage<\/code><\/h3>\n\n\n\n<p>Shows your usage data more broadly \u2014 different from <code>\/cost<\/code> in that it can cover usage across sessions, not just the current one.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/status<\/code><\/h3>\n\n\n\n<p>Quick view of session status: model in use, mode, current configuration, etc.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/export<\/code><\/h3>\n\n\n\n<p>Exports the current conversation. Great after solving a tricky problem \u2014 exported conversations become searchable documentation and learning resources for your future self.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. Project Setup and Memory Commands<\/h2>\n\n\n\n<p>These commands deal with how Claude Code remembers and understands your project.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/init<\/code><\/h3>\n\n\n\n<p>Scans your project and auto-generates a <code>CLAUDE.md<\/code> file containing your directory structure, common commands, and coding conventions. <strong>Run this first in any new project.<\/strong> Setting up <code>CLAUDE.md<\/code> from the beginning saves countless correction cycles later \u2014 Claude won&#8217;t have to re-figure-out &#8220;is there a build command? a lint command?&#8221; every session.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/memory<\/code><\/h3>\n\n\n\n<p>Opens an editor interface to edit your <code>CLAUDE.md<\/code> files. Content written here persists across sessions. Use this when you want to add project conventions, architecture notes, or any context Claude should always know.<\/p>\n\n\n\n<p>You can also use the <code>#<\/code> prefix in normal chat for quick memory adds \u2014 just type <code># always use single quotes in JS<\/code> and it gets added.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. Code Review and Quality Commands<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/review<\/code><\/h3>\n\n\n\n<p>Runs a code review on your changes. Claude analyzes the diff and gives you feedback on quality, readability, potential bugs, and so on.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/security-review<\/code><\/h3>\n\n\n\n<p>Same idea but laser-focused on security: SQL injection risks, XSS vulnerabilities, exposed credentials, insecure configurations, authentication issues. Run this before merging anything sensitive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/install-github-app<\/code><\/h3>\n\n\n\n<p>Installs the Claude GitHub app so Claude automatically reviews your PRs. This is genuinely useful \u2014 Claude tends to find actual logic errors and security issues rather than nitpicking variable names like human reviewers sometimes do. After install, customize the review prompt in <code>claude-code-review.yml<\/code> to keep it concise.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. Configuration and Customization Commands<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/config<\/code><\/h3>\n\n\n\n<p>Edit your configuration. Changes persist to <code>~\/.claude\/settings.json<\/code> with project\/local\/policy override precedence \u2014 meaning project settings can override personal ones, and managed\/policy settings can override both.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/permissions<\/code><\/h3>\n\n\n\n<p>Manage allow\/deny rules for tools. Pre-approve common operations so Claude isn&#8217;t asking permission every five minutes when it wants to run <code>git status<\/code>. Save your attention for the important decisions.<\/p>\n\n\n\n<p>Example permission setup:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Allow <code>Bash(git *)<\/code> so all git commands run without prompts<\/li>\n\n\n\n<li>Deny <code>Read(.\/.env)<\/code> and <code>Read(.\/.env.*)<\/code> so secrets stay safe<\/li>\n\n\n\n<li>Deny <code>Write(.\/production.config.*)<\/code> so production configs can&#8217;t be edited accidentally<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/hooks<\/code><\/h3>\n\n\n\n<p>Opens an interactive menu to configure hooks \u2014 scripts that run at specific lifecycle events (before tool use, after file writes, etc.). Examples: run Prettier after every file write, run a type check after every edit, send a desktop notification when a long task finishes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/keybindings<\/code><\/h3>\n\n\n\n<p>Create or edit <code>~\/.claude\/keybindings.json<\/code> to customize keyboard shortcuts. Changes take effect immediately without restarting Claude Code.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">6. Model and Execution Control Commands<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/model<\/code><\/h3>\n\n\n\n<p>Lists available models and lets you switch. As of April 2026 the main options inside Claude Code are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Claude Sonnet 4.6<\/strong> \u2014 the daily-driver default. Strong on most prompts.<\/li>\n\n\n\n<li><strong>Claude Haiku 4.5<\/strong> \u2014 fast and cheap, great for easy tasks.<\/li>\n\n\n\n<li><strong>Claude Opus 4.6<\/strong> \u2014 the most capable, save for hard reasoning and complex multi-step coding.<\/li>\n\n\n\n<li><strong>Claude Opus 4.7<\/strong> \u2014 the newest and most advanced model in the Claude 4.7 family.<\/li>\n<\/ul>\n\n\n\n<p>Most Pro\/Max users default to Sonnet and only reach for Opus on hard problems.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/effort<\/code><\/h3>\n\n\n\n<p>Sets the effort level for the current session. Options: <code>low<\/code>, <code>medium<\/code>, <code>high<\/code>, <code>max<\/code>. Higher effort = more thinking, better results, more tokens. The <code>max<\/code> level is Opus-only.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/plan<\/code><\/h3>\n\n\n\n<p>Toggles plan mode. In plan mode, Claude proposes an approach before doing anything destructive. Useful for big refactors. You can also cycle plan mode on\/off with <code>Shift+Tab<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/agents<\/code><\/h3>\n\n\n\n<p>Manage subagents \u2014 specialized Claude instances with their own context windows and personas. Use them for domain-specific tasks (code review, debugging, architecture exploration) so your main conversation stays focused and you save tokens.<\/p>\n\n\n\n<p>Built-in agent types include <code>Explore<\/code> (read-only codebase exploration), <code>Plan<\/code> (planning without executing), and <code>general-purpose<\/code>. You can also define your own in <code>.claude\/agents\/<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/todos<\/code><\/h3>\n\n\n\n<p>View the current TODO list Claude is tracking for the task at hand.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">7. Extension and Integration Commands<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/mcp<\/code><\/h3>\n\n\n\n<p>Manage connected Model Context Protocol servers. MCP is how Claude Code talks to external tools \u2014 GitHub, Slack, databases, browsers, design tools, anything with an MCP integration. Use this to list, add, remove, or troubleshoot connections.<\/p>\n\n\n\n<p>Add servers from the CLI:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>claude mcp add --transport http github https:\/\/mcp.github.com\n<\/code><\/pre>\n\n\n\n<p>Then manage them inside a session with <code>\/mcp<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/plugin<\/code><\/h3>\n\n\n\n<p>Add plugin marketplaces and install plugins. A plugin is a bundle of related slash commands, agents, skills, and hooks distributed together as a public Git repo. Anthropic hosts an official Claude Code Plugins marketplace, and the community has built many more.<\/p>\n\n\n\n<p>Example flow:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/plugin marketplace add https:\/\/github.com\/wshobson\/agents\n\/plugin install claude-code-plugin\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/skills<\/code><\/h3>\n\n\n\n<p>Manage installed skills \u2014 list them, see what&#8217;s available, debug skills that aren&#8217;t triggering. Skills are the prompt-based extensions that live in <code>.claude\/skills\/&lt;name&gt;\/SKILL.md<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">8. Bundled Skills (Prompt-Based Commands)<\/h2>\n\n\n\n<p>These ship with Claude Code but are skills under the hood. They&#8217;re listed alongside built-ins in the commands reference (marked &#8220;Skill&#8221; in the Purpose column) and you invoke them like any other command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/simplify<\/code><\/h3>\n\n\n\n<p>Simplifies code. Claude reads what you point it at and refactors for clarity \u2014 fewer abstractions, clearer names, less cleverness.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/batch<\/code><\/h3>\n\n\n\n<p>Runs batched operations. Useful for &#8220;do X to all files matching Y&#8221; kinds of tasks where you want predictable, repeated handling rather than improvisation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/debug<\/code><\/h3>\n\n\n\n<p>Debugs a problem. Claude takes a structured approach: reproduce, isolate, hypothesize, test, fix. This is much better than just describing your bug in chat because the skill enforces a real debugging methodology.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/loop<\/code><\/h3>\n\n\n\n<p>Runs iterative loops. Claude works on something repeatedly until a specification is met or a condition is satisfied. Pairs well with autonomous coding workflows.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>\/claude-api<\/code><\/h3>\n\n\n\n<p>Helps with the Anthropic\/Claude API itself \u2014 writing code that calls the API, debugging API issues, exploring features like tool use, batch processing, MCP, and so on.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">9. Custom Commands and Skills You Create<\/h2>\n\n\n\n<p>Beyond the built-ins, you can create your own. As of the 2026 update, custom commands and skills have been unified \u2014 they both create a <code>\/your-command<\/code> and work the same way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a custom command (the simple way)<\/h3>\n\n\n\n<p>Create a markdown file in one of two locations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Project-scoped:<\/strong> <code>.claude\/commands\/my-command.md<\/code> (shared via git, project-specific)<\/li>\n\n\n\n<li><strong>Personal:<\/strong> <code>~\/.claude\/commands\/my-command.md<\/code> (available across all your projects)<\/li>\n<\/ul>\n\n\n\n<p>The file becomes <code>\/my-command<\/code>. The contents are the prompt Claude follows when you invoke it. Use <code>$ARGUMENTS<\/code> to capture whatever you type after the command name.<\/p>\n\n\n\n<p>Example <code>.claude\/commands\/optimize.md<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Analyze this code for performance issues:\n\n$ARGUMENTS\n\nFor each issue you find, suggest a specific fix with example code.\n<\/code><\/pre>\n\n\n\n<p>Now <code>\/optimize src\/api\/users.ts<\/code> runs that prompt with the file path inserted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a skill (the more powerful way)<\/h3>\n\n\n\n<p>A skill is a directory rather than a single file. It can include supporting files like reference docs, scripts, and templates.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>~\/.claude\/skills\/explain-code\/\n\u251c\u2500\u2500 SKILL.md           # Main instructions (required)\n\u251c\u2500\u2500 examples.md        # Loaded only when needed\n\u2514\u2500\u2500 scripts\/\n    \u2514\u2500\u2500 visualize.py   # Script Claude can execute\n<\/code><\/pre>\n\n\n\n<p><code>SKILL.md<\/code> has YAML frontmatter that controls behavior:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>---\nname: explain-code\ndescription: Explains code with visual diagrams and analogies. Use when explaining how code works.\ndisable-model-invocation: false\nallowed-tools: Read Grep\n---\n\nWhen explaining code, always include an analogy, an ASCII diagram,\na step-by-step walkthrough, and a common gotcha.\n<\/code><\/pre>\n\n\n\n<p>Key frontmatter fields:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>name<\/code><\/strong> \u2014 becomes the slash command. Lowercase letters, numbers, hyphens only.<\/li>\n\n\n\n<li><strong><code>description<\/code><\/strong> \u2014 what the skill does. Claude uses this to decide when to load it automatically. Front-load the key use case; descriptions get truncated past 250 characters.<\/li>\n\n\n\n<li><strong><code>disable-model-invocation: true<\/code><\/strong> \u2014 only you can invoke it. Use for <code>\/deploy<\/code>, <code>\/commit<\/code>, <code>\/send-slack-message<\/code> \u2014 anything with side effects you don&#8217;t want Claude triggering on its own.<\/li>\n\n\n\n<li><strong><code>user-invocable: false<\/code><\/strong> \u2014 only Claude can invoke it. Use for background knowledge that isn&#8217;t a meaningful action for users.<\/li>\n\n\n\n<li><strong><code>allowed-tools<\/code><\/strong> \u2014 tools Claude can use without per-use approval when this skill is active.<\/li>\n\n\n\n<li><strong><code>model<\/code><\/strong> \u2014 the model to use when this skill runs.<\/li>\n\n\n\n<li><strong><code>effort<\/code><\/strong> \u2014 effort level when active (<code>low<\/code>\/<code>medium<\/code>\/<code>high<\/code>\/<code>max<\/code>).<\/li>\n\n\n\n<li><strong><code>context: fork<\/code><\/strong> \u2014 runs the skill in an isolated subagent context.<\/li>\n\n\n\n<li><strong><code>agent<\/code><\/strong> \u2014 which subagent type to use when forking (<code>Explore<\/code>, <code>Plan<\/code>, <code>general-purpose<\/code>, or a custom one).<\/li>\n\n\n\n<li><strong><code>paths<\/code><\/strong> \u2014 glob patterns that limit when the skill activates.<\/li>\n\n\n\n<li><strong><code>argument-hint<\/code><\/strong> \u2014 autocomplete hint for expected arguments, e.g. <code>[issue-number]<\/code>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Where skills live<\/h3>\n\n\n\n<p>Higher-priority locations override lower ones when names collide:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Location<\/th><th>Path<\/th><th>Applies to<\/th><\/tr><\/thead><tbody><tr><td>Enterprise<\/td><td>(managed settings)<\/td><td>All users in the org<\/td><\/tr><tr><td>Personal<\/td><td><code>~\/.claude\/skills\/&lt;name&gt;\/SKILL.md<\/code><\/td><td>All your projects<\/td><\/tr><tr><td>Project<\/td><td><code>.claude\/skills\/&lt;name&gt;\/SKILL.md<\/code><\/td><td>This project only<\/td><\/tr><tr><td>Plugin<\/td><td><code>&lt;plugin&gt;\/skills\/&lt;name&gt;\/SKILL.md<\/code><\/td><td>Wherever the plugin is enabled<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Precedence: enterprise &gt; personal &gt; project. Plugin skills use a <code>plugin-name:skill-name<\/code> namespace so they can&#8217;t conflict.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">String substitutions inside skill content<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>$ARGUMENTS<\/code><\/strong> \u2014 everything you typed after the command name<\/li>\n\n\n\n<li><strong><code>$ARGUMENTS[0]<\/code><\/strong>, <strong><code>$ARGUMENTS[1]<\/code><\/strong>, etc. \u2014 individual arguments by index<\/li>\n\n\n\n<li><strong><code>$0<\/code><\/strong>, <strong><code>$1<\/code><\/strong>, etc. \u2014 shorthand for the above<\/li>\n\n\n\n<li><strong><code>${CLAUDE_SESSION_ID}<\/code><\/strong> \u2014 current session ID<\/li>\n\n\n\n<li><strong><code>${CLAUDE_SKILL_DIR}<\/code><\/strong> \u2014 directory containing the SKILL.md<\/li>\n<\/ul>\n\n\n\n<p>So <code>\/migrate-component SearchBar React Vue<\/code> with content <code>Migrate $0 from $1 to $2<\/code> becomes <code>Migrate SearchBar from React to Vue<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Dynamic context injection<\/h3>\n\n\n\n<p>Use <code>!`&lt;command&gt;`<\/code> syntax to run shell commands before the skill content reaches Claude. The output replaces the placeholder.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>## PR context\n- Diff: !`gh pr diff`\n- Comments: !`gh pr view --comments`\n\n## Your task\nSummarize this pull request...\n<\/code><\/pre>\n\n\n\n<p>Each <code>!`...`<\/code> runs first; Claude sees the actual PR data, not the command.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">10. MCP Server Commands<\/h2>\n\n\n\n<p>When you connect an MCP server, its prompts appear as slash commands automatically:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/mcp__github__create-issue\n\/mcp__slack__send-message\n\/mcp__atlassian__find-jira-ticket\n<\/code><\/pre>\n\n\n\n<p>The format is always <code>\/mcp__&lt;server&gt;__&lt;prompt&gt;<\/code>. They&#8217;re discovered dynamically \u2014 connect a new server and its commands show up; disconnect and they vanish.<\/p>\n\n\n\n<p>Common MCP servers people connect:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>GitHub<\/strong> \u2014 issues, PRs, code search<\/li>\n\n\n\n<li><strong>Slack<\/strong> \u2014 read\/send messages, search channels<\/li>\n\n\n\n<li><strong>Google Drive \/ Calendar<\/strong> \u2014 files and events<\/li>\n\n\n\n<li><strong>Atlassian (Jira\/Confluence)<\/strong> \u2014 tickets and docs<\/li>\n\n\n\n<li><strong>Miro<\/strong> \u2014 diagrams and boards<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">11. Special Syntax: <code>@<\/code>, <code>!<\/code>, and <code>#<\/code><\/h2>\n\n\n\n<p>Not technically slash commands, but they live in the same input box and worth knowing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>@<\/code> \u2014 file\/directory mentions<\/h3>\n\n\n\n<p>Type <code>@<\/code> and Claude Code autocompletes file and directory paths from your project. Use it to give precise context without copy-paste:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Refactor @src\/auth\/login.ts to use the patterns in @src\/auth\/signup.ts\n<\/code><\/pre>\n\n\n\n<p>You can also <code>@<\/code> URLs and Git references in modern versions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>!<\/code> \u2014 direct shell commands<\/h3>\n\n\n\n<p>Prefix with <code>!<\/code> to run a shell command directly, bypassing Claude&#8217;s conversational mode:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>!ls -la src\/\n!npm test\n<\/code><\/pre>\n\n\n\n<p>This is more token-efficient than asking Claude &#8220;can you list the files in src&#8221; because Claude doesn&#8217;t need to think about it \u2014 it just runs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>#<\/code> \u2014 quick memory adds<\/h3>\n\n\n\n<p>Prefix with <code>#<\/code> to add something to <code>CLAUDE.md<\/code> instantly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Always use TypeScript strict mode in this project\n# The staging API is at staging-api.example.com\n<\/code><\/pre>\n\n\n\n<p>Future you (and future Claude) will be grateful.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">12. Tips, Gotchas, and Best Practices<\/h2>\n\n\n\n<p>A few hard-won lessons from people who use Claude Code daily:<\/p>\n\n\n\n<p><strong>Start every project with <code>\/init<\/code>.<\/strong> Generating <code>CLAUDE.md<\/code> upfront prevents Claude from re-discovering your project conventions every session. The token savings alone pay for it.<\/p>\n\n\n\n<p><strong>Use <code>\/clear<\/code> aggressively.<\/strong> When you switch tasks, clear. There&#8217;s no benefit to dragging old context into a new problem, and Claude will spend tokens running auto-compaction trying to summarize it.<\/p>\n\n\n\n<p><strong><code>\/compact<\/code> for continuity, <code>\/clear<\/code> for clean slates.<\/strong> Different tools, different jobs.<\/p>\n\n\n\n<p><strong>Add <code>disable-model-invocation: true<\/code> to anything with side effects.<\/strong> You don&#8217;t want Claude deciding to deploy because your code &#8220;looks ready.&#8221;<\/p>\n\n\n\n<p><strong>Pre-approve safe tools in <code>\/permissions<\/code>.<\/strong> Routine git commands, common build tools, read operations on code files. Reserve permission prompts for things that actually matter.<\/p>\n\n\n\n<p><strong>Skill descriptions are loaded into context \u2014 keep them tight.<\/strong> Front-load the key use case. Anything past 250 characters gets truncated in the skill listing.<\/p>\n\n\n\n<p><strong>Skills get re-attached after compaction, but only the most recent invocation of each.<\/strong> If a skill&#8217;s behavior fades after a long session, re-invoke it.<\/p>\n\n\n\n<p><strong>Use <code>\/agents<\/code> and subagents for big exploration.<\/strong> Forking to a subagent keeps your main conversation clean and prevents context pollution. The <code>Explore<\/code> agent is especially good for &#8220;go read the codebase and tell me how X works.&#8221;<\/p>\n\n\n\n<p><strong><code>\/help<\/code> is the source of truth.<\/strong> This article is current as of April 2026, but Anthropic ships updates frequently. When in doubt, <code>\/help<\/code> shows you what&#8217;s actually in your version.<\/p>\n\n\n\n<p><strong>Set <code>SLASH_COMMAND_TOOL_CHAR_BUDGET<\/code> if you have many skills.<\/strong> The default budget is 1% of the context window with an 8,000 character fallback. If your skill descriptions are getting truncated and Claude isn&#8217;t matching them well, raise this limit.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Closing Thoughts<\/h2>\n\n\n\n<p>Claude Code&#8217;s slash command system is genuinely well-designed \u2014 there&#8217;s a clear separation between deterministic built-ins, prompt-based skills, custom extensions, and external integrations via MCP. Once you internalize that taxonomy, the tool stops feeling like a black hole and starts feeling like a programmable environment.<\/p>\n\n\n\n<p>The commands you&#8217;ll use 90% of the time are a small subset: <code>\/clear<\/code>, <code>\/compact<\/code>, <code>\/init<\/code>, <code>\/memory<\/code>, <code>\/model<\/code>, <code>\/review<\/code>. Master those first. The rest are there when you need them.<\/p>\n\n\n\n<p>For the live, always-current reference, the official docs are at:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Slash commands:<\/strong> https:\/\/code.claude.com\/docs\/en\/slash-commands<\/li>\n\n\n\n<li><strong>Commands reference:<\/strong> https:\/\/code.claude.com\/docs\/en\/commands<\/li>\n\n\n\n<li><strong>Claude Code overview:<\/strong> https:\/\/docs.claude.com\/en\/docs\/claude-code\/overview<\/li>\n<\/ul>\n\n\n\n<p>Happy coding.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve ever opened Claude Code, typed \/, and watched a long menu of commands appear, you&#8217;re not alone in [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2968","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2968"}],"version-history":[{"count":1,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2968\/revisions"}],"predecessor-version":[{"id":2969,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2968\/revisions\/2969"}],"wp:attachment":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}