Skip to content
Back to skills

Commit Msg

ASecurity

[コミット] 日本語コミットメッセージを生成(ステージ差分)

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 8, 2026
toolsbashgit

Security analysis

A100/100

Scanned February 10, 2026

npx -y skills add mae616/ai-template --skill commit-msg --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit Msg?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Commit Msg
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mae616-commit-msg/badge)](https://www.skillsdirectory.com/skills/mae616-commit-msg)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
user-invocable: true
description: "[コミット] 日本語コミットメッセージを生成(ステージ差分)"
---

# [コミット] 日本語コミットメッセージを生成

## 入力: $ARGUMENTS
- なし(ステージング済みの差分から自動生成)

---

## 目的
- `git diff --staged` からコミットメッセージを日本語で生成する
- Conventional Commits 形式に準拠
- Co-Authored-By を自動付与

---

## 共通前提(参照)
- 口調・出力規約は `CLAUDE.md` に従う
- コミットは **ユーザーの明示的な指示があった場合のみ** 実行する

---

## 実行手順

### 1. ステージング状態の確認
```bash
git status
git diff --staged
```

### 2. 差分がない場合
```
⚠️ ステージングされた変更がないにゃ。

先に `git add` で変更をステージングしてにゃ。
```

### 3. コミットメッセージ生成

差分を分析して以下の形式で提案:

```
<type>: <概要(日本語、50文字以内)>

<本文(日本語、変更内容を箇条書き)>

Co-Authored-By: Claude <noreply@anthropic.com>
```

#### type の選択基準
| type | 用途 |
|------|------|
| `feat` | 新機能追加 |
| `fix` | バグ修正 |
| `docs` | ドキュメントのみの変更 |
| `style` | コードの意味に影響しない変更(空白、フォーマット等) |
| `refactor` | バグ修正や機能追加を伴わないコード変更 |
| `perf` | パフォーマンス改善 |
| `test` | テストの追加・修正 |
| `chore` | ビルドプロセスやツールの変更 |

### 4. 提案と確認

```
📝 コミットメッセージ案

feat: ユーザー認証機能を追加

- ログイン/ログアウト処理を実装
- JWTトークンによるセッション管理
- パスワードハッシュ化(bcrypt)

Co-Authored-By: Claude <noreply@anthropic.com>

---
このメッセージでコミットする? [y/n]
```

### 5. コミット実行(⚠️ 確認あり)

ユーザーが承認した場合のみ:
```bash
git commit -m "$(cat <<'EOF'
feat: ユーザー認証機能を追加

- ログイン/ログアウト処理を実装
- JWTトークンによるセッション管理
- パスワードハッシュ化(bcrypt)

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
```

---

## 品質チェックリスト
- [ ] 概要が50文字以内
- [ ] type が変更内容に適切
- [ ] 本文が変更の「何を」「なぜ」を説明している
- [ ] Co-Authored-By が付与されている

---

## 注意事項
- **コミットはユーザーの明示的な承認後にのみ実行**
- 機密情報(.env、credentials等)がステージングされている場合は警告
- 大量の変更がある場合は分割を提案

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…