draft-commit
ステージングされた変更内容から、相手に伝わりやすく、かつ建設的なフィードバックを促せるような、丁寧なコミットメッセージを自動で作成するSkill。
📜 元の英語説明(参考)
Create a thoughtful, supportive commit message from your staged changes.
🇯🇵 日本人クリエイター向け解説
ステージングされた変更内容から、相手に伝わりやすく、かつ建設的なフィードバックを促せるような、丁寧なコミットメッセージを自動で作成するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o draft-commit.zip https://jpskill.com/download/16959.zip && unzip -o draft-commit.zip && rm draft-commit.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16959.zip -OutFile "$d\draft-commit.zip"; Expand-Archive "$d\draft-commit.zip" -DestinationPath $d -Force; ri "$d\draft-commit.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
draft-commit.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
draft-commitフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
コミットの下書きを作成する
ステージングされた変更から、思慮深く、協調的なコミットメッセージを作成します。
ようこそ
良いコミットメッセージを書くことは芸術です。このスキルは、あなたの将来の自分(およびチームメイト)が感謝するような、明確で魅力的な方法で変更の本質を捉えるのに役立ちます。
ステージングされた変更は物語を語ります。一緒にその物語を書きましょう。
あなたがやること
あなたはこれから:
- ステージングしたものをレビューする
- 変更の性質を理解する
- 何を、そしてなぜ変更したのかを捉えたコミットメッセージを作成する
- そのメッセージをコピーして、コミット時に使用する
仕組み
ステップ 1: ステージングされた変更の分析
まず、git diff --cached を使用して、ステージングされた変更を確認します。
これにより、以下が表示されます。
- 変更されたファイル: どのファイルを触りましたか?
- ファイル内の変更点: 行が追加されましたか?削除されましたか?リファクタリングされましたか?
- パターン: 何に取り組んでいたかを検出できますか?
ステップ 2: 意図の理解
変更から、以下を推測します。
- 作業の種類: 機能?バグ修正?リファクタリング?ドキュメント?
- 範囲: システムのどの部分?
- 影響: 何が改善されますか?これにより何が可能になりますか?
ステップ 3: メッセージの下書き
以下のようなメッセージを作成します。
- 具体的である: 「ファイルを更新」ではなく「StandardsRepository 抽象化を追加」
- 理由を説明する: 何を変更したかだけでなく、なぜそれが重要なのか
- 自信を示す: あなたの変更は称賛に値する
- 理解を促す: 将来の読者があなたの意図を理解する
ステップ 4: あなたと共有する
作成されたメッセージを表示して、以下を実行できるようにします。
- レビューする
- コピーする
- git commit コマンドで使用する
設定
設定の読み込み
このスキルは、.claude/skills/draft-commit/config.json から読み取ります。
- style: メッセージの口調(「supportive」または「concise」)
- format: メッセージの構造(「descriptive」または「conventional」)
- messageLength: 詳細度(「concise」または「detailed」)
- includeContext: 説明的なコンテキストを追加するかどうか(true/false)
- includeFileCounts: ファイル/行数を表示するかどうか(true/false)
動作のカスタマイズ
config.json を編集して、デフォルトを変更します。
{
"style": "supportive", // or "concise"
"format": "descriptive", // or "conventional"
"messageLength": "concise", // or "detailed"
"includeContext": true,
"includeFileCounts": true
}
プロセス
ステージングされた変更を取得する
Run: git diff --cached
Returns: 統合差分形式のすべてのステージングされた変更
変更を分類する
差分を分析して、以下を理解します。
- 追加されたファイル、削除されたファイル、変更されたファイル
- 追加された行、削除された行
- 変更パターン(新機能、バグ修正、リファクタリング、ドキュメントなど)
作業の種類を推測する
パターンから、以下を検出します。
feat— 新機能fix— バグ修正docs— ドキュメントの変更refactor— コード構造の改善test— テストの追加/変更chore— 依存関係の更新、設定の変更style— フォーマット、クリーンアップperf— パフォーマンスの改善
範囲を決定する
システムのどの部分かを特定します。
- 影響を受けるコンポーネント
- 変更されたモジュール
- 影響を受ける機能
メッセージの下書き
協調的なスタイル + 説明的な形式の場合
テンプレート:
[何をしたかの簡単な説明]
[これが重要な理由 — 何が改善されるか、または何が可能になるか]
[オプション: 役立つ場合は、より多くのコンテキスト]
[オプション: 設定されている場合はファイル数]
例:
StandardsRepository 抽象化を追加
標準へのアクセスを単一の信頼できるインターフェースに集中化します。
これにより、重複が排除され、システムの保守が容易になります。
Files:
- Added: lib/standards-repository.md, lib/schemas/standards-schema.json
- Modified: 7 agent/skill files updated to use new pattern
Why: 標準は複数のファイルに散在しており、重複と結合が発生していました。
これで、検証付きで標準にアクセスするための明確な方法が1つになりました。
簡潔なスタイルの場合
テンプレート:
[簡潔な説明]
[必要に応じて簡単なコンテキスト]
例:
標準アクセスを集中化
7つのファイルに散在していた標準が、単一のリポジトリパターンを使用するようになりました。
従来の形式の場合
テンプレート:
[type]: [description]
[これが重要な理由 / 追加のコンテキスト]
例:
refactor: リポジトリパターンで標準アクセスを集中化
標準のロードを単一のインターフェースに統合します。
重複を排除し、テスト容易性を向上させます。
出力形式
このスキルは、次のように作成されたメッセージを表示します。
## 📝 作成されたコミットメッセージ
[コピーする準備ができた実際のメッセージ]
---
## 使い方
1. 上記のメッセージをコピーします
2. 変更をステージングします: `git add .` (または特定のファイルを選択します)
3. コミットを作成します: `git commit -m "your message"`
または、エディターのコミットメッセージプロンプトに貼り付けます。
---
**分析された変更**:
- [X files] 変更されました
- [+Y lines] 追加されました
- [-Z lines] 削除されました
重要な注意点
これは何をするのか
- ステージングされた変更のみを分析します
- レビューするためのメッセージを作成します
- コピーしやすいように、チャットでメッセージを表示します
- 自動的にコミットしません
これは何をしないのか
- コミットを作成しません(あなたがそれを行います)
- 変更をステージングしません(あなたがそれを行います)
- リポジトリを変更しません
これが重要な理由
これにより、あなたが制御できます。あなた:
- 変更を慎重にステージングします
- 私たちが提案していることを確認します
- それが正しいかどうかを判断します
- 自分でコミットします
エラー処理
問題が発生した場合:
- ステージングされた変更がない: その旨をお知らせし、最初にステージングすることをお勧めします
- 意図が不明確: 明確化を求めるか、提案をします
- 設定の問題: デフォルトを使用し、その旨をお知らせします
優れたコミットメッセージのヒント
- 意図的にステージングする: 関連する変更をグループ化します
- 小さなコミット: 理解とレビューが容易になります
- 具体的: 「ファイルを更新」ではなく「検証を追加」
- 理由が重要: 変更だけでなく、理由を説明します
- 現在形: 「Added feature」ではなく「Add feature」
例
例 1: 機能の追加
ステージングされた変更: 新しい関数 + テスト + ドキュメント
作成されたメッセージ:
ユーザー認証を追加
(原文はここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Draft a Commit
Create a thoughtful, supportive commit message from your staged changes.
Welcome
Writing good commit messages is an art. This skill helps you capture the essence of your changes in a clear, inviting way that your future self (and teammates) will appreciate.
Your staged changes tell a story. Let's write that story together.
What You're Doing
You're about to:
- Review what you've staged
- Understand the nature of your changes
- Create a commit message that captures both what AND why
- Copy that message and use it when you commit
How It Works
Step 1: Analyzing Staged Changes
First, we'll look at your staged changes using git diff --cached.
This shows us:
- What files changed: Which files did you touch?
- What changed in them: Added lines? Deleted? Refactored?
- Patterns: Can we detect what you were working on?
Step 2: Understanding Intent
From the changes, we infer:
- Type of work: Feature? Bug fix? Refactoring? Documentation?
- Scope: Which part of the system?
- Impact: What improves? What does this enable?
Step 3: Drafting the Message
We craft a message that:
- Is specific: Not "Update files" but "Add StandardsRepository abstraction"
- Explains why: Not just what changed, but why it matters
- Shows confidence: Your changes are worth celebrating
- Invites understanding: Future readers will understand your intent
Step 4: Sharing with You
We display the drafted message so you can:
- Review it
- Copy it
- Use it in your git commit command
Configuration
Loading Configuration
The skill reads from .claude/skills/draft-commit/config.json:
- style: How the message sounds ("supportive" or "concise")
- format: Message structure ("descriptive" or "conventional")
- messageLength: How much detail ("concise" or "detailed")
- includeContext: Add explanatory context (true/false)
- includeFileCounts: Show file/line counts (true/false)
Customizing Behavior
Edit config.json to change defaults:
{
"style": "supportive", // or "concise"
"format": "descriptive", // or "conventional"
"messageLength": "concise", // or "detailed"
"includeContext": true,
"includeFileCounts": true
}
Process
Get Staged Changes
Run: git diff --cached
Returns: All staged changes in unified diff format
Categorize Changes
Analyze the diff to understand:
- Added files, deleted files, modified files
- Lines added, lines deleted
- Change patterns (new feature, bug fix, refactoring, docs, etc.)
Infer Work Type
From patterns, detect:
feat— New functionalityfix— Bug fixesdocs— Documentation changesrefactor— Code structure improvementstest— Test additions/changeschore— Dependency updates, config changesstyle— Formatting, cleanupperf— Performance improvements
Determine Scope
Identify what part of the system:
- Components affected
- Modules changed
- Features impacted
Draft the Message
For Supportive Style + Descriptive Format
Template:
[Brief description of what you did]
[Why this matters — what improves or what it enables]
[Optional: More context if helpful]
[Optional: File counts if configured]
Example:
Add StandardsRepository abstraction
Centralizes standards access into a single, reliable interface.
This eliminates duplication and makes the system easier to maintain.
Files:
- Added: lib/standards-repository.md, lib/schemas/standards-schema.json
- Modified: 7 agent/skill files updated to use new pattern
Why: Standards were scattered across multiple files, creating duplication
and coupling. Now there's one clear way to access standards with validation.
For Concise Style
Template:
[Concise description]
[Brief context if needed]
Example:
Centralize standards access
Standards scattered across 7 files now use single repository pattern.
For Conventional Format
Template:
[type]: [description]
[Why this matters / additional context]
Example:
refactor: Centralize standards access with repository pattern
Consolidates standards loading into single interface.
Eliminates duplication and improves testability.
Output Format
The skill displays the drafted message like this:
## 📝 Drafted Commit Message
[The actual message, ready to copy]
---
## How to Use It
1. Copy the message above
2. Stage your changes: `git add .` (or select specific files)
3. Create the commit: `git commit -m "your message"`
Or paste into your editor's commit message prompt.
---
**Changes analyzed**:
- [X files] changed
- [+Y lines] added
- [-Z lines] deleted
Important Notes
What This Does
- Analyzes your staged changes only
- Drafts a message for you to review
- Shows the message in chat for easy copying
- Does NOT commit automatically
What This Doesn't Do
- Does NOT make the commit (you do that)
- Does NOT stage changes (you do that)
- Does NOT modify your repository
Why This Matters
This keeps you in control. You:
- Stage your changes carefully
- See what we're proposing
- Decide if it's right
- Make the commit yourself
Error Handling
If we encounter issues:
- No staged changes: We'll let you know and suggest staging first
- Unclear intent: We'll ask for clarification or offer suggestions
- Config issues: We'll use defaults and let you know
Tips for Great Commit Messages
- Stage intentionally: Group related changes together
- Small commits: Easier to understand and review
- Specific: "Add validation" not "Update files"
- Why matters: Explain the reasoning, not just the changes
- Present tense: "Add feature" not "Added feature"
Examples
Example 1: Feature Addition
Staged changes: New function + tests + docs
Drafted message:
Add user authentication module
Implements JWT-based authentication for API.
Includes token generation, validation, and refresh logic.
Files:
- auth/jwt-handler.ts (main implementation)
- auth/__tests__/jwt-handler.test.ts (comprehensive tests)
- docs/AUTHENTICATION.md (usage guide)
Why: Enables secure API access. Provides foundation for role-based access control.
Example 2: Bug Fix
Staged changes: Fixed bug in error handler
Drafted message:
Fix error handling in API response middleware
Error messages weren't being properly serialized, causing 500 errors
to appear as malformed JSON. Now returns clean error objects.
Files:
- middleware/error-handler.ts (fixed serialization)
- __tests__/error-handler.test.ts (added test case)
This fixes issue #245.
Example 3: Documentation
Staged changes: Added README and guides
Drafted message:
Document setup and deployment process
Adds comprehensive guides for:
- Local development setup
- Running tests
- Building for production
- Deployment procedures
Files:
- SETUP.md (new)
- DEPLOYMENT.md (new)
- README.md (updated with links)
Why: New contributors need clear guidance. This reduces time to productivity.
Configuration Examples
For Conventional Commits
{
"style": "concise",
"format": "conventional",
"messageLength": "concise",
"includeContext": true,
"includeFileCounts": false
}
Output: feat: Add authentication module
For Detailed Messages
{
"style": "supportive",
"format": "descriptive",
"messageLength": "detailed",
"includeContext": true,
"includeFileCounts": true
}
Output: Long, detailed message with full context
For Concise Updates
{
"style": "concise",
"format": "descriptive",
"messageLength": "concise",
"includeContext": false,
"includeFileCounts": false
}
Output: Brief, to-the-point message
Troubleshooting
Q: What if I staged wrong changes?
A: Unstage them with git reset HEAD <file> and run /dac again.
Q: Can I edit the drafted message? A: Absolutely! Copy it, edit it, and use your version. It's a draft!
Q: Does this work with conventional commits?
A: Yes! Set format: "conventional" in config.json.
Q: Can I configure it differently per project? A: Yes! Each project's config.json is independent. Just edit the file.
Integration with HQB
This skill demonstrates HQB patterns:
- Supportive tone: Guides without judgment
- Focused clarity: One clear purpose
- Considerate approach: Respects your autonomy
- Skill architecture: Reusable, configurable logic
Next Steps After Using This
- Copy the drafted message
- Review your changes one more time
- Make your commit with
git commit -m "your message" - Continue building awesome things!