Commands, Skills, and Reusable Workflows
Explore how to create and manage Claude Code commands, including project-shared and user-specific commands. Understand argument handling, command placement, and designing commands that produce structured outputs for CI pipelines. This lesson equips you to develop reusable workflows and integrate commands into automated development processes efficiently.
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
$ARGUMENTSplaceholder 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 | Invoked As | Version Controlled? |
| Project-shared |
| Yes |
| User-global |
| No |
A file at .claude/commands/review.md is invoked as /review. A file at ~/.claude/commands/summarize.md is invoked as /summarize. Subdirectories are allowed and create namespaced commands: .claude/commands/db/migrate.md is invoked as /db:migrate. ...