Advanced Workflow Patterns
Commandby davila7 · Added 5mo ago
Claude
Install
npx claude-code-templates@latest --command=cli-tool/components/skills/development/command-development/references --yesAdd to Claude
claude mcp add advanced-workflow-patternsAbout
Advanced Workflow Patterns
Multi-step command sequences and composition patterns for complex workflows.
Overview
Advanced workflows combine multiple commands, coordinate state across invocations, and create sophisticated automation sequences. These patterns enable building complex functionality from simple command building blocks.
Multi-Step Command Patterns
Sequential Workflow Command
Commands that guide users through multi-step processes:
---
description: Complete PR review workflow
argument-hint: [pr-number]
allowed-tools: Bash(gh:*), Read, Grep
---
# PR Review Workflow for #$1
## Step 1: Fetch PR Details
!`gh pr view $1 --json title,body,author,files`
## Step 2: Review Files
Files changed: !`gh pr diff $1 --name-only`
For each file:
- Check code quality
- Verify tests exist
- Review documentation
## Step 3: Run Checks
Test status: !`gh pr checks $1`
Verify:
- All tests passing
- No merge conflicts
- CI/CD successful
## Step 4: Provide Feedback
Summarize:
- Issues found (critical/minor)
- Suggestions for improvement
- Approval recommendation
Would you like to:
1. Approve PR
2. Request changes
3. Leave comments only
Reply with your choice and I'll help complete the action.
Key features:
- Numbered steps for clarity
- Bash execution for context
- Decision points for user input
- Next action suggestions
State-Carrying Workflow
Commands that maintain state between invocations:
---
description: Initialize deployment workflow
allowed-tools: Write, Bash(git:*)
---
# Initialize Deployment
Creating deployment tracking file...
Current branch: !`git branch --show-current`
Latest commit: !`git log -1 --format=%H`
Deployment state saved to `.claude/deployment-state.local.md`:
\`\`\`markdown
---
initialized: true
branch: $(git branch --show-current)
commit: $(git log -1 --format=%H)
timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)
status: initialized
---
# Deployment Tracking
Branch: $(git branch --show-curre
Tags
CodeAnalysisaitmplclaude-code-templates