claude/skills/claude-code-command-author/SKILL.md
Claude Codeのカスタムslash command(Commands)を設計・生成・更新する。 「/コマンドを作りたい」「この作業を毎回同じ手順でやりたいのでコマンド化したい」「.claude/commandsにテンプレを追加したい」 「Claude Codeのcommands作って」「スラッシュコマンド作成」「引数付きコマンド」「allowed-toolsを設定したい」などの依頼で発動する。 プロジェクト用(.claude/commands)・個人用(~/.claude/commands)・サブディレクトリ(namespacing)・引数($ARGUMENTS/$1..)・bash事前実行(!)・ファイル参照(@)・context:fork などに対応する。
npx skillsauth add lilpacy/dotfiles claude-code-command-authorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ユーザーの要望を Claude Code の Custom slash command(Markdownファイル) に落とし込み、再利用可能なコマンドとして追加できる状態にする。
.claude/commands/ または ~/.claude/commands/ に置ける形で出力するskill-skillsmithの役割).claude/commands/review-pr.md)/helpで確認、実行例)不足している場合は 最小限だけ 確認する(質問攻めにしない)。
確認項目:
/review-pr 的なやつ).claude/commands/) or personal (~/.claude/commands/)$ARGUMENTS) or 位置引数($1, $2, ...)デフォルト方針(ユーザーが指定しない場合):
.claude/commands/)$ARGUMENTS、複数の役割があるなら $1...md除く) で決まるreview-pr.md → /review-pr).claude/commands/frontend/test.md必須:
description: 何をするコマンドか(/helpで表示される)推奨:
argument-hint: 補完時に出る引数ヒント(引数ありの場合)必要に応じて:
allowed-tools: ! bash実行を使うなら必要(最小権限で)model: 特定モデル固定したい場合context: fork + agent: 会話を汚したくない/重い作業を分離disable-model-invocation: true: Skill toolからの自動呼び出しを避けたい$ARGUMENTS$1, $2, $3(PR番号、優先度、担当など)argument-hintでユーザーが迷わない形にする本文は「Claudeにやってほしいこと」を 手順+出力仕様 で書く。
推奨構造:
!`git status`
!`git diff HEAD`
allowed-toolsでBash(...)を許可するrm, curl, deploy等は原則不可)@path)@src/...のように書くとファイル内容をコンテキストに含められる以下の3点をユーザーに渡す:
## Files
- .claude/commands/<command-name>.md
## .claude/commands/<command-name>.md
\```md
---
description: <short description>
argument-hint: [optional-args]
---
# <Command Title>
## Your task
- ...
## Constraints
- ...
## Output
- ...
\```
## Usage
- `/command-name [args]`
- 確認: `/help` で description が表示されるか
.claude/commands/ / personal ~/.claude/commands/)kebab-case)description が入っているか(/helpで分かる)argument-hint があるか$ARGUMENTS / $1.. の設計が目的に合っているかallowed-tools に Bash が適切に絞られているか@file 参照は最小限か/help と実行例のテスト手順が書かれているかユーザー: 「PRレビューを毎回同じ観点でやりたいから /review-pr 作って。引数はPR番号と優先度と担当。」
→ .claude/commands/review-pr.md を生成。$1.. + argument-hint あり。
ユーザー: 「コミットメッセージ作成をコマンド化したい。実行前にgit statusとdiffを入れて。」
→ allowed-tools + ! を使うコマンドを生成(危険コマンドは許可しない)。
ユーザー: 「このリポジトリの特定ファイルを説明する /explain-file を作って。パスを引数で渡す。」
→ $ARGUMENTS で受け、@参照を使う運用を提案。
ユーザー: 「このPRをレビューして」
→ これは "コマンド生成" ではなく "レビュー実行"。本Skillは発動せず、通常対応。
allowed-tools は最小権限。可能なら read-only(git status, git diff)に限定development
Use when searching the web or reading online documentation. Prefer DuckDuckGo for search and read documents through npx curl.md instead of raw HTML.
testing
Use when writing or editing tests. Tests should be ordered by near-normal, normal, then abnormal cases where applicable, and test names must be Japanese behavior descriptions from a reviewer/user perspective.
development
GoF/オブジェクト指向デザインパターンを関数型プログラミング(pure functions, higher-order functions, ADT, composition, immutability, effect boundaries)でシンプルに整理・設計・リファクタリングする。Strategy/Factory/Adapter/ObserverなどGoF全23パターンのFP置き換え、適用判断、具体事例を提示する必要があるときに使う。
tools
Use when committing, pushing, or preparing PRs. Defines the user's commit workflow, message style discovery, review handoff, and branch/worktree push requirements.