← スキル一覧に戻る

slash-command
by austinpray
⭐ 5🍴 0📅 2026年1月20日
SKILL.md
name: slash-command description: Create and edit Claude Code slash commands. Use when the user wants to create a new slash command, add a custom command, or modify an existing command in .claude/commands/.
Creating Slash Commands
Slash commands are markdown files that define reusable prompts for Claude Code.
File Location
- Project commands:
.claude/commands/*.md- shared via version control - Personal commands:
~/.claude/commands/*.md- user-specific
The filename (without .md) becomes the command name: fix-lint.md → /fix-lint
File Format
---
allowed-tools: Read, Grep, Bash(git:*)
argument-hint: [file] [options]
description: Short description shown in /help
model: claude-sonnet-4-5-20250929
---
Command instructions here. Use $ARGUMENTS for all args or $1, $2 for positional.
Frontmatter Fields (all optional)
| Field | Purpose |
|---|---|
allowed-tools | Restrict which tools the command can use |
argument-hint | Show expected arguments in help (e.g., [filename]) |
description | Description shown in /help output |
model | Override model (e.g., claude-3-5-haiku-20241022 for fast tasks) |
Dynamic Content
Arguments
$ARGUMENTS- all arguments as single string$1,$2, etc. - positional arguments
Bash Output
Include shell command output using the bang-backtick syntax.
Syntax: Place an exclamation mark immediately before a backtick-wrapped command.
Examples in a command file:
Current branch: (BANG)(TICK)git branch --show-current(TICK)
Changes: (BANG)(TICK)git diff --stat(TICK)
Where BANG = exclamation mark and TICK = backtick character.
File Contents
Use @filepath to include file contents:
Review this config: @tsconfig.json
Namespacing
Subdirectories organize commands:
.claude/commands/
├── git/
│ ├── commit.md # /commit (project:git)
│ └── pr.md # /pr (project:git)
└── test.md # /test (project)
Examples
Simple command
---
description: Run all tests
---
Run the test suite and fix any failures.
With arguments and tool restrictions
---
allowed-tools: Bash(npm test:*), Read, Edit
argument-hint: [test-pattern]
description: Run tests matching pattern
---
Run tests matching: $ARGUMENTS
If tests fail, analyze and fix them.
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です