Skip to content
Back to skills

Git Add Commit

ASecurity

git addとgit commitを自動化し、変更内容に基づいて適切なコミットメッセージを生成します。ユーザーがコミットを作成したい時、変更をコミットしたい時に使用します。

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

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill git-add-commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Add Commit?

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

Security grade badge for Git Add Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-git-add-commit/badge)](https://www.skillsdirectory.com/skills/majiayu000-git-add-commit)

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
---
name: git-add-commit
description: git addとgit commitを自動化し、変更内容に基づいて適切なコミットメッセージを生成します。ユーザーがコミットを作成したい時、変更をコミットしたい時に使用します。
allowed-tools: Bash
---

# Git Add Commit

このスキルは、Gitの変更を自動的にステージングし、適切なコミットメッセージを生成してコミットを作成します。

## 処理フロー

1. **現状確認**
   - `git status` で全ての変更ファイルを確認
   - `git diff` でステージング前の差分を確認
   - `git diff --staged` で既にステージングされた差分を確認

2. **変更のステージング**
   - 全ての変更をステージングする場合: `git add .`
   - 特定ファイルのみの場合: `git add [ファイル名]`

3. **コミットメッセージ生成**
   - 変更内容を分析して、簡潔で意味のあるメッセージを生成
   - 1行目: 50文字以内で変更の要約
   - 2行目: 空行
   - 3行目以降: 詳細な説明(必要に応じて)

   **コミットメッセージの形式:**
   ```
   [変更の種類] 簡潔な要約

   - 詳細な変更内容1
   - 詳細な変更内容2
   ```

4. **コミット実行**
   - `git commit -m "メッセージ"`
   - 複数行の場合は heredoc を使用

5. **結果確認**
   - `git log -1` で作成されたコミットを確認
   - `git status` で現在の状態を確認

## コミットメッセージの種類

- `feat:` 新機能の追加
- `fix:` バグ修正
- `docs:` ドキュメントのみの変更
- `style:` コードの意味に影響しない変更(空白、フォーマット等)
- `refactor:` バグ修正や機能追加ではないコードの変更
- `test:` テストの追加や修正
- `chore:` ビルドプロセスやツールの変更

## 使用例

### 例1: 新機能の追加
```bash
# 変更確認
git status
git diff

# ステージング
git add src/handlers/ingest.ts

# コミット
git commit -m "feat: OTLP/HTTPトレース受信機能を追加

- ExportTraceServiceRequestのデコード処理を実装
- protobufjs を使用したバイナリデータのパース
- KVへの保存ロジックを追加"
```

### 例2: バグ修正
```bash
git add src/storage/kv.ts
git commit -m "fix: トレースマージ時の重複スパン問題を修正"
```

### 例3: 全変更をコミット
```bash
git add .
git commit -m "chore: プロジェクト初期セットアップ

- package.json, tsconfig.json, wrangler.toml を追加
- 依存パッケージをインストール"
```

## 注意事項

- コミット前に必ず差分を確認する
- センシティブな情報(.env、credentials.json等)は含めない
- コミットメッセージは英語または日本語で、内容を正確に表現する
- 大きすぎる変更は複数のコミットに分割することを検討する

## ユーザーへの確認

コミット実行前に、以下の情報をユーザーに提示して確認を取る:
1. ステージングされるファイルのリスト
2. 主要な変更内容の要約
3. 生成されたコミットメッセージ

ユーザーが承認した後にコミットを実行する。

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.