Claude Codehigh

Slash Commands

Slash commands are shortcuts in Claude Code that invoke skills or built-in actions. Built-in: /help, /clear, /config, /loop. Custom: anything in ~/.claude/skills/ or .claude/skills/ becomes /<skill-name>.

Memory anchor

Slash commands are speed-dial buttons on a phone — /3 calls mom (a skill). The phone (harness) knows the number; the person on the line (model) just hears the conversation, not the keypress.

Expected depth

Typing /<name> at the start of a message invokes the matching skill via the Skill tool. Slash commands accept arguments after the name: /loop 5m /run-tests. Built-in commands are handled by the harness directly (not the model), so /clear, /config don't go through the LLM. User-defined skills must be in skills directories with a SKILL.md file. The harness registers them at startup and shows them in the /help menu.

Deep — senior internals

Slash commands are syntactic sugar over the Skill tool. The harness intercepts /<name> at the start of a user message, looks up the skill, and invokes it — usually with an autoload of SKILL.md content into context. Slash commands are NOT visible to the model unless the user types them; the model must use the Skill tool explicitly. Aliases via plugin namespacing: /plugin:skill for plugin-provided skills. Slash commands are a UX layer; agents in subagent contexts may not have the same set.

🎤Interview-ready answer

Slash commands in Claude Code are shortcuts users type to invoke skills or built-in actions. /help, /clear, /config are built into the harness; anything else maps to a skill defined in ~/.claude/skills/<name>/SKILL.md. They're a thin UX layer over the Skill tool — the harness translates /foo into a Skill invocation. I add custom slash commands for repeated workflows: /review for PR reviews, /security-review for OWASP-style checks.

Common trap

Forgetting that the model doesn't see slash commands typed by the user as /commands — by the time the model gets the message, the harness may have already expanded or replaced them. If you want the model to know what was invoked, mention it in the prompt explicitly.