Commands
Claude
Advanced
Chain Commands with Agents
Combine slash commands with agent patterns for multi-step workflows
29 of 66
Multi-step command workflows
Encode complex workflows as commands that orchestrate multiple agent actions.
Pattern: review then commit
# Ship Review, test, and commit changes in one pass. $ARGUMENTS ## Steps 1. Run `git diff` to see all changes 2. Check for linter errors in modified files 3. If errors found, fix them before proceeding 4. Review the changes for quality issues 5. Create a commit with a Conventional Commits message 6. Report what was committed
Pattern: parallel agent delegation
Commands can instruct Claude to launch parallel sub-agents:
# Audit Run a comprehensive audit of the project. Launch these checks in parallel: - Code review agent on uncommitted changes - Dependency update check - Linter error scan across all source files Collect results and present a unified report.
Tips for multi-step commands
- Number your steps explicitly
- Add checkpoint conditions ("if X fails, stop and report")
- Reference specific tools the agent should use
- Keep the total scope reasonable (5-8 steps max)