creating-commands
Create Claude Code slash commands
Build custom slash commands to automate repetitive tasks and standardize team workflows. This skill provides templates and best practices for commands that integrate with Claude Code.
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「creating-commands」。 Create a slash command named lint-check that runs npm run lint and reports issues
預期結果:
- Command file created at: .claude/commands/lint-check.md
- Template used: basic.md
- Validation passed: lowercase name, clear description, allowed-tools declared
- To use: Run /lint-check in Claude Code
正在使用「creating-commands」。 Create a command named fix-issue that accepts an issue number and fetches it from GitHub
預期結果:
- Command file created at: .claude/commands/fix-issue.md
- Template used: with-args.md
- Argument syntax: $ARGUMENTS for single input
- Allowed tools: WebFetch(domain:github.com)
- To use: Run /fix-issue 123
正在使用「creating-commands」。 Create a deploy command that runs tests, builds the project, and uses an agent for validation
預期結果:
- Command file created at: .claude/commands/deploy.md
- Template used: workflow.md
- Multi-step workflow with bash and Task agent integration
- Argument hint: environment (production, staging)
- To use: Run /deploy production
安全審計
安全Pure documentation skill with no code execution capabilities. All 165 static findings are false positives caused by the scanner misidentifying markdown documentation examples as executable code. Contains only markdown templates and best practices guides for Claude Code slash commands.
風險因素
⚙️ 外部命令 (105)
📁 檔案系統存取 (6)
🌐 網路存取 (1)
品質評分
你能建構什麼
Standardize team commands
Create consistent commands for common workflows that all team members can use across projects.
Automate repetitive tasks
Build custom commands to automate testing, building, and deployment tasks specific to your project.
Design command interfaces
Design and document slash command patterns for plugins distributed to other users.
試試這些提示
Create a slash command named lint-check that runs npm run lint and reports findings grouped by severity.
Create a command named fix-issue that accepts an issue number, fetches it from GitHub, and implements a fix.
Create a command named create-component that accepts a component name and type (functional or class) as separate arguments.
Create a deploy command that runs tests, builds the project, and launches a validation agent before deploying.
最佳實務
- Use verb-noun naming format with lowercase and hyphens only
- Declare allowed-tools in frontmatter to scope permissions
- Document argument-hint for commands that accept input
- Keep prompts concise with clear step-by-step instructions
避免
- Vague descriptions that do not specify what the command does
- Missing allowed-tools declaration for commands requiring tools
- Overly complex prompts that should be split into multiple commands
- Hardcoded values instead of arguments for flexibility
常見問題
Where are commands saved?
What naming format should I use?
Can commands accept multiple arguments?
Are generated commands secure?
Why is my command not appearing?
How is this different from skills?
開發者詳情
授權
MIT
引用
main
檔案結構