Define slash commands with YAML frontmatter and dynamic substitution
Commands in Pro Workflow are markdown files with YAML frontmatter that define slash commands (e.g., /wrap-up, /develop). They support dynamic string substitution and tool constraints.
---description: What this command doesargument-hint: <placeholder>allowed-tools: ["Read", "Bash"]model: opus---# Command InstructionsCommand body with dynamic substitution:- User input: $ARGUMENTS- First word: $ARGUMENTS[0]- Session ID: ${CLAUDE_SESSION_ID}- Live output: !`git branch --show-current`
---description: Explore code without making changesallowed-tools: ["Read", "Glob", "Grep", "Bash"]---Explore the codebase:1. Find all TypeScript files2. Read key interfaces3. Summarize architectureDo NOT edit any files.
---description: Apply automated refactoringallowed-tools: ["Read", "Edit"]---Refactor all files matching pattern:1. Read each file2. Apply transformation3. Verify syntaxDo NOT run tests or git commands.
---description: End-of-session ritual with quality checksallowed-tools: ["Read", "Bash"]---# Wrap-Up RitualSession: ${CLAUDE_SESSION_ID}Branch: !`git branch --show-current`## Checklist1. **Changes Audit** - Modified files: !`git diff --name-only` - Uncommitted: !`git status --short`2. **Quality Check** - Lint: !`npm run lint 2>&1 | head -5` - Tests: !`npm test -- --changed --passWithNoTests`3. **Learning Capture** - What mistakes were made? - What patterns worked? - Format: `[LEARN] Category: Rule`4. **Summary** - One paragraph: what was accomplished, current state, next steps
/develop Command
---description: Build a feature using Research > Plan > Implement phasesargument-hint: <feature description>model: opus---# Multi-Phase Feature DevelopmentFeature: $ARGUMENTS## Phase 1: ResearchExplore the codebase to understand scope:1. Find relevant files2. Check dependencies3. Score confidence (0-100)**Decision:**- Score >= 70 → Move to Phase 2- Score < 70 → Gather more context## Phase 2: PlanPresent plan for approval:
PLAN: $ARGUMENTSGoal: [one sentence]Files to modify:
path/file.ts - [changes]
Approach:
[step]
Risks:
[potential issue]
**Wait for approval before Phase 3.**## Phase 3: Implement1. Make changes in plan order2. Run tests after each file3. Pause for review every 5 edits4. Run quality gates at end