Extract and save current session workflow as a reusable slash command
Creates reusable slash commands from session workflows with interactive or auto mode.
/plugin marketplace add yanmxa/cc-plugins/plugin install claude@cc-plugins[category/name] [--update] or leave empty for interactive creationExtract and save the current or most recent session workflow as a reusable slash command file. Supports creating new commands, updating existing ones, and interactive guided creation.
git/draft-pr - Create new command from recent workflowgit/commit-push --update - Update existing command with improvementsDetermine Mode:
--update flag: Update existing commandAnalyze Workflow: Extract recent session patterns, tool usage, and command sequences
Generate Command File:
~/.claude/commands/category/name.mdUpdate Mode (when using --update):
Format: category/name → command file path
Personal Commands: ~/.claude/commands/category/name.md
Project Commands: ./.claude/commands/category/name.md
Examples:
git/draft-pr → ~/.claude/commands/git/draft-pr.md (personal)docker/build → ./.claude/commands/docker/build.md (project)jira/clone-issue → ~/.claude/commands/jira/clone-issue.md (personal)Auto-detection (interactive mode with no name):
git/workflownode/workflowdocker/workflowtest/workflowjira/workflowaws/workflow---
argument-hint: [describe expected arguments and defaults]
description: Brief action-oriented description
allowed-tools: [Bash, Read, Write, Edit, etc.]
---
Brief description of command purpose and when to use it.
## Implementation Steps
1. **Major Action**: Description of what to do (consolidate related actions)
2. **Next Step**: Clear actionable instruction
3. **Final Step**: Verification or cleanup
## Usage Examples
- `/category/name arg1` - Example scenario
- `/category/name --flag` - Another scenario
## Notes
- Prerequisites or dependencies
- Related commands
- Important considerations
When in interactive mode, ask:
Purpose: What should this command do?
Scope: Where should this command be available?
Tools: Which tools are needed? (multi-select)
Arguments: How should arguments be handled?
When analyzing recent workflow:
When updating with --update flag:
After creation:
✅ Command created: /category/name
Location: ~/.claude/commands/category/name.md
Tools: [list of allowed-tools]
🔍 Usage: /category/name [arguments]
After update:
✅ Command updated: /category/name
Location: ~/.claude/commands/category/name.md
🔄 Changes:
- [Summary of what changed]
Description:
Implementation Steps:
Allowed Tools:
# Interactive creation
/claude:create-command
# Create from recent git workflow
/claude:create-command git/sync-upstream
# Update existing command with improvements
/claude:create-command git/commit-push --update
# Create project-specific test command
/claude:create-command test/e2e-debug
--update to refine based on real usage/create-commandCreate a new command following existing patterns and organizational structure