AI NewsletterSubscribe →
Resource HubComponents

Claude Code Slash Commands

Slash commands are the invocation mechanism for skills and commands. Typing /skill-name triggers the matching file. Learn naming conventions and how to avoid built-in conflicts.

Larry Maguire

Larry Maguire

GenAI Skills Academy

Slash commands are the invocation mechanism for skills, commands, and built-in Claude Code features. Type /command-name in a session and Claude loads the matching instruction file and executes it against the current workspace context. You can also pass arguments: /fix-issue 247 passes 247 as $ARGUMENTS to the skill.

Commands, skills, and slash commands -- how they relate

These three terms are related but distinct, and the distinction matters when you're building your workspace.

Slash commands are the invocation mechanism -- the /name syntax you type. What that syntax invokes can be one of two things: a command (a simple instruction file at .claude/commands/name.md) or a skill (a richer instruction set at .claude/skills/name/SKILL.md with its own subfolder, supporting files, and optional YAML configuration). Both are invoked the same way -- by typing /name -- but skills support more advanced features like forked contexts, argument hints, and auto-triggering from natural language.

In practice: commands are for operational sequences (open a session, save progress, generate a status report). Skills are for production workflows that create a deliverable (draft a proposal, process a batch of PDFs, write a LinkedIn post). Slash commands invoke both.

Discovering what's available

To see all slash commands available in your current session, type / in the chat input. Claude Code will show a list of every built-in command, installed skill, and custom command it has found. You can also type /help to get the same list with brief descriptions of each entry.

This is the fastest way to explore a new workspace -- type / and you can see everything that has been set up without needing to browse files manually.

Built-in system commands

These are reserved names -- custom skills must not shadow them:

Command What it does
/initAnalyse the project structure and generate a draft CLAUDE.md
/memoryBrowse, search, and edit memory and instruction files
/mcpList connected MCP servers, trigger OAuth authentication
/contextShow current context window usage (tokens used / available)
/configOpen and edit Claude Code settings interactively
/helpList available commands, shortcuts, and installed skills
/clearClear the current conversation (start fresh, keep workspace context)
/compactCompress the conversation to free context space while retaining summary
/statusShow Claude Code connection and model status

Built-in skills (slash-invocable)

These bundled skills ship with Claude Code and work without any configuration:

  • /simplify -- review changed code for reuse, quality, and efficiency; fix issues found
  • /debug -- structured debugging using hypothesis-test-eliminate methodology with a DEBUG.md tracking file
  • /batch -- run a prompt or skill across multiple inputs in parallel using agents
  • /loop [interval] [skill] -- run a skill on a recurring interval (e.g. /loop 5m /debug; defaults to 10 minutes)
  • /claude-api -- scaffolding and guidance for Anthropic API and Agent SDK integrations

Passing arguments

Everything typed after the command name is available as $ARGUMENTS inside the skill:

# User types:
/fix-issue 247

# Inside SKILL.md, $ARGUMENTS = "247"
# $1 = "247" (first token)

# Multi-word argument:
/write-post "AI productivity for knowledge workers"
# $ARGUMENTS = AI productivity for knowledge workers
# $1 = AI  (first token only)

For skills that accept structured arguments, add argument-hint to the SKILL.md frontmatter -- it appears in CLI autocomplete to guide users on what to pass.

Custom slash commands by business function

The most useful custom commands are the ones you use every day. Here are examples organised by business function -- each is a file you create once and invoke by typing its name:

Command Function What it does
/daySession startReads your project state, shows what's active and what was left unfinished
/statusProject trackingFull project health report with traffic-light status across all active work
/syncVersion controlCommit and push current changes to backup -- a save point you can return to
/nightSession endRecords where you stopped, updates project state, commits everything
/invoice $ARGUMENTSFinanceGenerate an invoice for a named client using a saved template
/meeting-summaryAdminProcess meeting notes into a structured summary with action items
/proposal $ARGUMENTSBusiness developmentDraft a client proposal using a saved structure and pricing guide
/research $ARGUMENTSResearchRun a structured research session on a topic, saving findings to disk

Naming conventions

Command names are what you type dozens of times a week. A well-named command is faster to remember and less likely to clash with built-in names.

  • Keep operational commands short. /day, /sync, /night, /status are faster to type than /start-day, /synchronise, /end-of-day, /project-status. The slash implies action -- the noun is enough.
  • Use verb-noun slugs for production skills. /writing-proposals, /processing-pdfs, /meeting-summary describe what the skill produces. The longer name signals it's a workflow, not a quick operational command.
  • Hyphens only. No spaces, no underscores. /weekly-review not /weekly_review or /weeklyreview.
  • Never shadow built-in names. Check the reserved list in the Built-in system commands table above before naming a custom command. If your command is called /status and there's already a built-in /status, yours will not work as expected.
  • Name after the output, not the action. /proposal is clearer than /write-proposal. /invoice is clearer than /create-invoice.

Custom slash commands

Any file at .claude/skills/[name]/SKILL.md or .claude/commands/[name].md becomes invocable as /name.

Auto-trigger (without typing /)

Skills with a well-written description field can auto-trigger -- Claude recognises that the user's request matches the skill and loads it without being explicitly invoked. The description field should read like a list of trigger patterns:

---
description: >
  Write LinkedIn posts in Larry's voice. Use when asked to
  "write a LinkedIn post", "draft a post about...", or
  "create a post for LinkedIn".
---

Set disable-model-invocation: true in frontmatter to prevent auto-triggering -- the skill will only run when explicitly called with /skill-name. Note that auto-triggering applies to skills only, not to simple commands. If you want a command to trigger from natural language, convert it to a skill with a description field.

Keybindings

Assign keyboard shortcuts to frequently used slash commands in ~/.claude/keybindings.json. Run /keybindings-help in a session to configure bindings interactively. Useful for commands you invoke multiple times per session -- /sync, /debug, /compact.

GenAI Skills Academy

Achieve Productivity Gains With AI Today

Send me your details and let’s book a 15 min no-obligation call to discuss your needs and concerns around AI.