Extract and save current session workflow as a reusable slash command. Use when user says "create command", "save this as command", or wants to automate a workflow.
View on GitHubFebruary 1, 2026
Select agents to install to:
npx add-skill https://github.com/yanmxa/cc-plugins/blob/main/plugins/claude/skills/create-command/SKILL.md -a claude-code --skill create-commandInstallation paths:
.claude/skills/create-command/# Create Command Extract and save the current session workflow as a reusable slash command file. Commands are user-invoked shortcuts that expand to full prompts. ## Quick Start ```bash # Interactive mode - guided creation /create-command # Auto mode - create from name /create-command git/sync-upstream # Update existing command /create-command git/commit-push --update ``` ## Command Locations | Location | Path | Scope | |----------|------|-------| | Personal | `~/.claude/commands/category/name.md` | All projects | | Project | `.claude/commands/category/name.md` | This project | ## Creation Process ### 1. Determine Mode - **With `--update`**: Update existing command - **With name**: Auto mode - analyze recent workflow - **No arguments**: Interactive mode - ask questions ### 2. Interactive Mode Questions Use AskUserQuestion with these prompts: **Question 1 - Purpose**: - Header: "Purpose" - Question: "What should this command do?" - Options: - "Automate git operations" - Commits, PRs, branches - "Run tests or builds" - Test suites, build scripts - "Manage services" - Jira, AWS, Docker - "Code generation" - Scaffolding, templates **Question 2 - Scope**: - Header: "Scope" - Question: "Where should this command be available?" - Options: - "Personal (Recommended)" - ~/.claude/commands/ - "Project" - .claude/commands/ (git tracked) **Question 3 - Tools** (multiSelect: true): - Header: "Tools" - Question: "Which tools are needed?" - Options: - "File operations" - Read, Write, Edit, Glob - "Shell commands" - Bash - "User interaction" - AskUserQuestion - "All tools" - No restrictions ### 3. Analyze Workflow When extracting from recent session: 1. Track frequently used tools 2. Find repeated action sequences 3. Capture successful bash commands 4. Consolidate micro-actions into major steps 5. Infer appropriate allowed-tools ### 4. Generate Command File Write to appropriate location: ```bash # Personal ~/.claude/commands/category/name.md