技能 creating-commands

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.

支援: Claude Codex Code(CC)
📊 69 充足
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「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

安全審計

安全
v5 • 1/16/2026

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.

6
已掃描檔案
870
分析行數
3
發現項
5
審計總數

風險因素

⚙️ 外部命令 (105)
reference.md:9-23 reference.md:23-31 reference.md:31-33 reference.md:33-41 reference.md:41-50 reference.md:50-56 reference.md:56-59 reference.md:59-65 reference.md:65-67 reference.md:67-73 reference.md:73-75 reference.md:75-83 reference.md:83-85 reference.md:85-87 reference.md:87 reference.md:87 reference.md:87-93 reference.md:93-99 reference.md:99-101 reference.md:101 reference.md:101 reference.md:101 reference.md:101 reference.md:101-107 reference.md:107-113 reference.md:113-115 reference.md:115-121 reference.md:121-122 reference.md:122-123 reference.md:123-129 reference.md:129-137 reference.md:137-143 reference.md:143-152 reference.md:152-156 reference.md:156-165 reference.md:165-169 reference.md:169-179 reference.md:179-182 reference.md:182-199 reference.md:199-209 reference.md:209-215 reference.md:215-224 reference.md:224-227 reference.md:227-231 reference.md:231-246 reference.md:246-250 reference.md:250-265 SKILL.md:27-33 SKILL.md:33-53 SKILL.md:53-54 SKILL.md:54-60 SKILL.md:60-68 SKILL.md:68-72 SKILL.md:72 SKILL.md:72-73 SKILL.md:73-74 SKILL.md:74-75 SKILL.md:75-76 SKILL.md:76-85 SKILL.md:85-96 SKILL.md:96-102 SKILL.md:102 SKILL.md:102 SKILL.md:102-103 SKILL.md:103 SKILL.md:103 SKILL.md:103 SKILL.md:103 SKILL.md:103-104 SKILL.md:104 SKILL.md:104-110 SKILL.md:110-111 SKILL.md:111-112 SKILL.md:112-113 SKILL.md:113-117 SKILL.md:117-126 SKILL.md:126-129 templates/basic.md:5-19 templates/basic.md:19-23 templates/basic.md:23-34 templates/basic.md:34-38 templates/basic.md:38-42 templates/basic.md:42-44 templates/with-args.md:7-24 templates/with-args.md:24-28 templates/with-args.md:28-44 templates/with-args.md:44-48 templates/with-args.md:48-66 templates/with-args.md:66-70 templates/with-args.md:70-87 templates/with-args.md:87-91 templates/with-args.md:91-93 templates/workflow.md:7-21 templates/workflow.md:21-25 templates/workflow.md:25-39 templates/workflow.md:39-43 templates/workflow.md:43-61 templates/workflow.md:61-65 templates/workflow.md:65-86 templates/workflow.md:86-90 templates/workflow.md:90-105 templates/workflow.md:105-109 templates/workflow.md:109-123 templates/workflow.md:123-127 templates/workflow.md:127-129
📁 檔案系統存取 (6)
🌐 網路存取 (1)
審計者: claude 查看審計歷史 →

品質評分

38
架構
100
可維護性
85
內容
21
社群
100
安全
91
規範符合性

你能建構什麼

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.

試試這些提示

Simple command
Create a slash command named lint-check that runs npm run lint and reports findings grouped by severity.
Command with argument
Create a command named fix-issue that accepts an issue number, fetches it from GitHub, and implements a fix.
Multi-argument command
Create a command named create-component that accepts a component name and type (functional or class) as separate arguments.
Workflow integration
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?
Project commands go in .claude/commands/ and personal commands in ~/.claude/commands/
What naming format should I use?
Use lowercase with hyphens only, such as run-tests or review-pr.
Can commands accept multiple arguments?
Yes. Use $1, $2 for positional args or $ARGUMENTS for all input as one string.
Are generated commands secure?
Commands run with Claude Code's existing permission model and tool restrictions.
Why is my command not appearing?
Ensure the file is in .claude/commands/ and has proper markdown format with description.
How is this different from skills?
Commands are simpler slash handlers while skills are more complex workflows with state.