Search⌘ K
AI Features

Commands, Skills, and Reusable Workflows

Explore how to write and organize Claude Code command files for team-shared and user-specific workflows. Learn to use arguments, design commands for structured output suitable for CI automation, and distinguish between project and user commands. This lesson equips you to build reusable workflows that integrate smoothly into production pipelines.

A Claude Code command is a Markdown file that Claude Code loads as a prompt template when a developer types its slash name in chat. Instead of pasting the same review instructions into every session, the team writes them once in a command file, commits it to the repository, and each developer invokes it the same way. This lesson covers how to write command files, where they live, how arguments work, and how to design commands that produce output suitable for automated pipelines. By the end of this lesson, we will be able to:

  • Create a project command file and explain where it must be placed to be available to the team.

  • Use the $ARGUMENTS placeholder to pass runtime input into a command prompt.

  • Design a command that produces structured output for use outside the interactive session.

  • Explain the difference between project commands and user commands.

Where commands live

Commands are Markdown files stored in specific directories. Their location determines who can invoke them:

Directory

Scope

Invocation Prefix

Version Controlled?

.claude/commands/

Project-shared

/project:

Yes

~/.claude/commands/

User-global

/user:

No

A file at .claude/commands/review.md is invoked as /project:review. A file at ~/.claude/commands/summarize.md is invoked as /user:summarize. Subdirectories are allowed and create namespaced commands: .claude/commands/db/migrate.md is invoked as /project:db:migrate ...