#slash-commands — Agentic AI
Slash commands, Claude Code / Cursor style: templates, arguments, chaining.
What you'll play with
- Welcome to #slash-commands. On the left, a composer (at the bottom) and an autocomplete popover (above): when you start with "/", the commands from the active catalogue filter down. In the middle, the template of the chosen command; its variables ({selection}, {file}, {diff}…) wait to be filled. On the right, the output window where the response writes itself token by token. A slash command in Claude Code or Cursor style is not just a shortcut to a prompt: it is a template + variables + an execution trigger, often chainable.
- Start by simulating typing:
/type /re. The popover filters to the commands starting withre— in the Claude Code catalogue, there are two:/reviewand/refactor. - Pick the first one:
/choose 1. The composer fills with the template of/review, and you see its{selection}variable appear in purple in the central panel. - Fill the variable:
/apply selection. The purple chip turns green ("selection ✓"), the substitution happens in the template, and the panel border flips to green: we are ready to execute. - Run the command:
/execute. A yellow ray leaves the template towards the right-hand window, then the response streams character by character — like a real LLM. - Switch catalogue:
/tool cursor. The popover and the title above flip to the native Cursor commands —/edit,/chat,/generate,/docs,/fix. Claude Code and Cursor each have their own shortcuts, but the pattern is the same. - Define your own slash command:
/define my-review "Analyze this diff: {diff}". It lands in the custom catalogue — you just created a shortcut that carries your own prompt. - Chain
/planand then your/my-review: first/chain plan,my-reviewto build the chain (both pills appear at the bottom), then/run-chainto run it — the output of/planfeeds the{result}variable of/my-review. - Your turn. Try
/tool claude-codeto go back to the natives,/type /teto filter on/test,/apply fileto fill another variable,/tool customto see your my-review command in its catalogue,/resetto wipe everything. Next: #tool-calling (free) shows how commands actually call real tools, and #planning-reflection (Premium) climbs one notch in agency.
Channel commands
/type <text>— Simulates typing in the composer (filters the popover)./choose <index=1..5>— Picks a popover entry and loads its template./apply <selection|file|diff|language|result>— Fills a variable of the current template./execute— Runs the current command (streamed output)./tool <claude-code|cursor|custom>— Switches the active slash-command catalogue./define <name> <template>— Creates a custom slash command (in the "custom" catalogue)./chain <cmd1,cmd2,...>— Builds a chain: output(i) → {result} variable of (i+1)./run-chain— Runs the chain step by step./reset— Resets everything (Claude Code catalogue, empty popover).
Glossary
- slash command
- Shortcut of the form
/plan,/review,/test… that triggers a pre-written prompt template, often with variables like{selection}or{file}. Standardised in Claude Code, Cursor, VS Code (Chat) and most modern AI assistants. - autocomplete
- Floating menu that appears when you type "/" and filters as you add characters. Cursor and VS Code show at most 5 suggestions, ranked by relevance. Close it with Esc, pick with ↑/↓ + Enter.
- template
- Pre-written text with named holes (
{selection},{file}…) that are filled before being sent to the LLM. Decoupling the template from the content makes it reusable, versionable and shareable with the team. - context variable
- Named marker in a template —
{selection}(the highlighted text in the editor),{file}(the active file),{diff}(the uncommitted git diff),{language}. The IDE resolves them automatically from the current state. - chain of commands
- Composing several slash commands in a row: the output of one becomes a variable of the next (often
{result}). The basis of lightweight agents:/plan → /code → /testalready forms a mini workflow that echoes Claude Code subagents. - streaming
- Progressive rendering of the LLM response, token by token, as soon as the model produces them. Improves perceived latency: the user starts reading before generation ends. Implemented via SSE or WebSocket on the API side.
- built-in command
- Slash command shipped by default with the tool:
/plan,/review,/refactorin Claude Code;/edit,/chat,/generatein Cursor. Not directly modifiable, but can be overridden with a custom command of the same name. - custom command
- Slash command defined by the user (Markdown file in
.claude/commands/for Claude Code, or the integrated editor in Cursor). Lets you freeze a team's in-house prompts and share them via the Git repo. - Claude Code
- Anthropic's terminal assistant (2024-2025): agentic loop with slash commands (
/plan,/review,/agents,/hooks…), skills, built-in MCP. Complementary to Cursor for long command-line tasks. - Cursor
- Agent-IDE built on VS Code (Anysphere): slash commands integrated into the composer (
/edit,/chat,/generate,/docs,/fix), VS Code command palette, cloud agent runner, built-in MCP. Direct competitor of GitHub Copilot Chat.
Other channels in Agentic AI
- #react-loop — An agent's ReAct loop: Thought → Action → Observation, live.
- #tool-calling — Tool calling (function calling / MCP): the JSON that makes the LLM act.
- #slash-commands — Slash commands, Claude Code / Cursor style: templates, arguments, chaining.
- #context-memory — Context window and agent memory: count, truncate, summarize, index.
- #planning-reflection — Planning, reflection and self-correction: from 60% to 90% success.
- #multi-agents — Multi-agents: planner, workers, verifier. A DAG that beats the monolithic agent.