Claude Code

Claude Code Commands: Automation Workflow Guide

A practical hub for Claude Code commands, slash commands, custom commands, hooks, skills, and plugins.

Last updated: July 26, 2026

Feature Comparison

SurfaceBest ForWhere It Lives
CommandsBuilt-in session control such as /help, /compact, /model, /mcp, /hooks, and /code-reviewClaude Code CLI session
Slash commandsFast command entry from the prompt or SDK, including built-in commands and custom commandsStart a message with /
Custom commandsReusable project or personal prompt files for workflows like review, PRD, tests, changelog, or commits.claude/commands/*.md or ~/.claude/commands/*.md
HooksAutomatic lifecycle actions before/after tools, on notifications, at stop, or around session events.claude/settings.json or ~/.claude/settings.json
SkillsReusable workflows with lazy-loaded instructions and optional supporting files.claude/skills/<name>/SKILL.md or ~/.claude/skills/<name>/SKILL.md
PluginsShareable bundles of commands, skills, hooks, agents, and MCP serversInstalled Claude Code plugin marketplace or plugin source

Starter Project Command Block

Put stable project commands in CLAUDE.md so Claude Code knows what to run before and after generated changes.

## Project Commands

- Install: npm install
- Dev: npm run dev
- Lint: npm run lint
- Test: npm test
- Typecheck: npm run typecheck
- Build: npm run build

When To Use Each Surface

Pick the smallest surface that makes the workflow repeatable. A one-off prompt does not need a plugin, and a deterministic safety check should not rely on Claude remembering to run it.

  • Use a slash command when a human chooses the moment to run the workflow.
  • Use a custom command or skill when the prompt is reused across projects or team members.
  • Use a hook when the action must run at a specific lifecycle event.
  • Use a plugin when multiple pieces need to be installed and updated together.

Official Claude Code References

Claude Code documentation now treats built-in commands, bundled skills, custom commands, hooks, and plugins as related extension surfaces. Check the official references before publishing config examples.

Common Errors

Most command workflow problems come from mixing up timing, storage location, or permissions.

  • Putting an automatic check in a custom command when it should be a hook.
  • Creating legacy .claude/commands files when a skill would be easier to share and maintain.
  • Forgetting that a slash command must start the message to be recognized.
  • Letting hook commands change files or call networks without clear team review.

FAQ

Are Claude Code custom commands and skills the same?

They now overlap. Existing .claude/commands/*.md files still work, while skills are the recommended format for richer reusable workflows.

Do hooks replace slash commands?

No. Slash commands are user-triggered. Hooks run automatically at lifecycle events and should be kept deterministic and auditable.

Where should team commands live?

Use project-scoped .claude/commands or .claude/skills for shared workflows, and document core validation commands in CLAUDE.md.