Skip to content

Claude Code

Slash commands in Claude Code: shorten what you repeat

Claude Code's built-in commands such as /init, /clear and /compact, how to write a project command in .claude/commands with $ARGUMENTS, and the four commands of the Talqeen kit.

Talqeen wrote this article and no editor has reviewed it yet. Search engines do not see this page until it is reviewed.

A slash command is a word starting with / that you type in Claude Code instead of a long prompt. Some are built in; others you write for your project.

Built-ins worth knowing

/init drafts CLAUDE.md; /clear starts a new conversation (use it between unrelated tasks); /compact summarises a long conversation to free context; /permissions shows and edits permissions; /agents manages subagents; /mcp shows connected MCP servers; /help lists commands.

Write your own

A custom command is a Markdown file in .claude/commands/. The file name is the command name: review-migration.md becomes /review-migration, and its text is the prompt sent.

---
description: Review a database migration before merging
---

Review the migration $ARGUMENTS:
1. Does it enable RLS on every new table?
2. Can it be rolled back without losing data?
3. Does it break any query in src/server?
List each problem with its line and edit no file.

$ARGUMENTS is replaced by what you type after the command. Project commands in .claude/commands/ are shared through the repository; personal ones in ~/.claude/commands/ work everywhere.

Tips

One command per task; numbered steps and what must not happen; what counts as success; and a clear description, which is what you see when you search after typing /.

The Talqeen kit's commands

  • /talqeen-next: takes the next ready task of the current phase, implements it against its acceptance criteria and updates its status.
  • /talqeen-done: verifies the current task with tests and checks and closes it only if everything passes.
  • /talqeen-verify: runs the checks of a task or phase and reports, changing no status.
  • /talqeen-phase: shows the current phase, its definition of done and what is left, and starts no work.

Without a connected server, /talqeen-next reads docs/talqeen/phases.md and docs/talqeen/tasks.json instead.