Install
openclaw skills install command-creatorWHAT: Create Claude Code slash commands - reusable markdown workflows invoked with /command-name. WHEN: User wants to create, make, or add a slash command. User wants to automate a repetitive workflow or document a consistent process for reuse. KEYWORDS: "create a command", "make a slash command", "add a command", "new command", "/command", "automate this workflow", "make this repeatable"
openclaw skills install command-creatorSlash commands are markdown files in .claude/commands/ (project) or ~/.claude/commands/ (global) that expand into prompts when invoked.
---
description: Brief description for /help (required)
argument-hint: <required> or [optional] (if takes arguments)
---
# Command Title
[Instructions for agent to execute autonomously]
git rev-parse --is-inside-work-tree.claude/commands/, No git → ~/.claude/commands/Report chosen location before proceeding.
Load references/patterns.md and present options:
| Pattern | Structure | Use When |
|---|---|---|
| Workflow Automation | Analyze → Act → Report | Multi-step with clear sequence |
| Iterative Fixing | Run → Parse → Fix → Repeat | Fix issues until passing |
| Agent Delegation | Context → Delegate → Iterate | Complex tasks, user review |
| Simple Execution | Parse → Execute → Return | Wrapper for existing tools |
Ask: "Which pattern is closest to what you want?"
A. Name and Purpose
my-command)B. Arguments
<placeholder>, Optional: [placeholder]C. Workflow Steps
D. Constraints
Load references/best-practices.md for:
Key principles:
make lint", not "Check for errors"mkdir -p [directory-path]
Write the command file. Report:
/command-name [args]Suggest: "Test with /command-name [args]"
Iterate based on feedback.
Imperative form (verb-first):
Specific, not vague:
make lint to check for errors"Include outcomes:
git status - should show modified files"Realistic examples:
git commit -m "Add OAuth2 authentication"git commit -m "foo bar"1. Check for .PLAN.md
2. Analyze git status/diff
3. Perform actions
4. Report results
1. Run make all-ci (max 10 iterations)
2. Parse errors by category
3. Apply targeted fixes
4. Repeat until success or stuck
1. Present context
2. Invoke subagent with Task tool
3. Iterate with user feedback
4. Save output after approval
See references/examples.md for full command examples.
Before finalizing:
my-command, not my_command)