Create reusable shortcuts and deterministic pipelines that orchestrate multiple agents with a single command.
Slash commands are text shortcuts that expand into full prompts. When you type /review in Claude Code, the harness expands this into a configured code review prompt.
Native commands include /help, /clear, /config, /compact, /doctor. Skills add their own commands, such as /code-review, /security-review, /schedule.
/help → lista todos os comandos disponíveis /clear → limpa o histórico da sessão atual /compact → comprime o contexto (reduz tokens usados) /config → abre configurações interativas /doctor → diagnóstico do ambiente /status → estado atual do agente // Skills instaladas adicionam comandos: /code-review → revisão de código do diff atual /security-review → análise de segurança /schedule → agendamento de tarefas recorrentes /loop → repete comando em intervalo
Custom commands are files .md inside .claude/commands/. The file name (without the extension) becomes the command. The file’s contents are the expanded prompt.
You can use special variables: $ARGUMENTS (arguments passed after the command), $FILE (current file), $SELECTION (selected text).
Crie um componente React TypeScript chamado $ARGUMENTS. Requisitos: - Arquivo em src/components/$ARGUMENTS/$ARGUMENTS.tsx - Props interface tipada - Export default - Storybook em $ARGUMENTS.stories.tsx - Teste em $ARGUMENTS.test.tsx Siga os padrões do projeto (verifique componentes existentes). Use a paleta de cores do design system em src/tokens.
Project-specific. Committed to the repository. The whole team has the same commands. Ideal for project standards.
Applies to all projects. Good for personal preferences. Not shared with the team.
/fix, /test, /deploy/code-review, /add-featureA deterministic workflow is a predefined sequence of steps where each step has deterministic inputs, outputs, and behavior. Running the same workflow with the same inputs always produces the same result.
This contrasts with using the agent freely, where each run can take a different path. Workflows trade flexibility for predictability—essential in CI/CD and critical processes.
Runs the full test suite. If it fails, the workflow stops and notifies you.
Increments the version in package.json according to the type (patch/minor/major)
Analyzes commits since the last tag and generates entries in CHANGELOG.md
Creates a release/vX.Y.Z branch, opens a PR with a changelog, and creates a git tag
Chained steps: A's output is B's input. Use when there is a data dependency between steps.
Simultaneous steps with no dependencies. Use when the tasks are independent.
## Workflow de release — versão $ARGUMENTS FASE 1 (paralelo): Execute simultaneamente: - Verificar testes: npm test - Verificar lint: npm run lint - Verificar tipos: npm run typecheck Aguarde todos completarem. Se qualquer um falhar, PARE e reporte. FASE 2 (pipeline): 1. Bump version para $ARGUMENTS em package.json 2. Gere CHANGELOG com commits desde a última tag 3. Commit: "chore: release $ARGUMENTS" 4. Crie tag: git tag v$ARGUMENTS 5. Abra PR com título "Release $ARGUMENTS" Reporte ao final: versão, commits incluídos, link do PR.
If you’re going to do the same task more than 5 times, it's worth creating a slash command. If you're going to do more than 20 times, it’s worth creating a complete workflow with a pipeline and subagents.
One meta-agent can invoke entire workflows as subtasks. This creates a hierarchy: meta-agent → workflows → subagents. Each level has clearly defined responsibilities.
4.4 — ⏰ Cron and recurring tasks: agents that never sleep