Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder

AI agent glossary

Slash commands

Shortcuts typed with a leading slash in an agent's chat, either built in, such as clearing context, or custom ones that expand into saved prompts.

Coding agents and chat tools use slash commands for actions you take often. Built-in commands handle session tasks: in Claude Code, for example, /clear starts a fresh context, /compact summarizes the conversation to free space, and /init drafts a CLAUDE.md for your project.

Custom slash commands let you save a prompt you reuse, often as a markdown file in your project or home directory, and run it by name. Many tools let a command accept arguments, so one saved prompt can handle a whole family of tasks.

Custom commands are a lightweight way to share good prompts across a team. When a procedure grows large, needs supporting files or scripts, or should be picked up automatically when relevant, an agent skill is often the better home for it.

Example

A team saves a /release-notes command whose prompt tells the agent to read commits since the last tag, group them by type, and draft notes in the house style.

Learn more in the course

Related terms

Go from definitions to doing

Learn to use and build AI agents in 65 practical lessons.