Skip to content
Back to skills

Commit

ASecurity

Generate a commit message from staged changes and let the user review before committing. Use when the user wants to commit changes or create a git commit.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added May 27, 2026
data-aibashgit

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add ncaq/konoka --skill commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit?

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

Security grade badge for Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ncaq-commit/badge)](https://www.skillsdirectory.com/skills/ncaq-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: commit
description: Generate a commit message from staged changes and let the user review before committing. Use when the user wants to commit changes or create a git commit.
allowed-tools: AskUserQuestion, Bash(commit-prepare:*), Bash(git commit:*), Bash(konoka-commit-editor:*), Edit, Read, Write, Skill(commit-style)
---

Gitリポジトリの変更をコミットします。
AIがコミットメッセージを生成し、
ユーザが確認してからコミットします。

# スタイルガイドラインの適用

`Skill`ツールで`commit-style`スキルを呼び出し、
スタイルガイドラインに従ってください。

# コミットメッセージファイルの生成

!`commit-prepare`

上の埋め込みコマンドが失敗した場合はエラーメッセージを報告してスキルを終了してください。

埋め込みコマンドはJSON形式で結果を出力します。

- `editmsgPath`には`COMMIT_EDITMSG`ファイルのパスが書かれています。
- `patchPath`にはステージされた差分のパッチファイルのパスが書かれています。

# コミットメッセージの内容の生成

`Read`ツールで`patchPath`のパスのファイルを読み、
差分の内容を把握して分析し、
適切なコミットメッセージを生成してください。

`Write`ツールで`editmsgPath`のファイルにコミットメッセージを書き込んでください。

# コミットメッセージの確認

`AskUserQuestion`ツールを使って、
生成したコミットメッセージの扱いをユーザに確認してください。

質問文にはコミットメッセージの全文を含めてください。
ユーザがメッセージの内容を見て判断できるようにするためです。

選択肢は以下の2つを設定してください。

1. このままコミットする(Recommended): 生成されたメッセージをそのままコミットする。
2. テキストエディタで編集する: エディタでコミットメッセージを編集してからコミットする。

`AskUserQuestion`ツールはこれらに加えて`Other`(自由テキスト入力)の選択肢を自動的に追加します。
`Other`が選ばれた場合はユーザがコミットメッセージの修正指示を入力したものとして扱います。

## このままコミットする場合

一時ファイルに書き出したコミットメッセージをそのまま使用して、
コミットの実行に進んでください。

## テキストエディタで編集する場合

以下のコマンドでユーザにコミットメッセージを編集してもらいます。

値は実際のファイルのパスに置き換えてください。

タイムアウトは最大の600秒(10分)に設定してください。

```bash
konoka-commit-editor <editmsgPathの値> <patchPathの値>
```

エディタが正常終了したら、
`COMMIT_EDITMSG`ファイルを`Read`ツールで読み直してください。
誤字があれば修正してファイルを上書きしてから、
コミットの実行に進んでください。

エディタが異常終了した場合、
ユーザがコミットをキャンセルしたいという意思表示であると解釈して、
コミット作業をキャンセルしてください。

## `Other`(修正指示)の場合

ユーザの修正指示に従ってコミットメッセージを修正してください。
`Edit`ツールでコミットメッセージ部分のみを修正してください。
修正後に`コミットメッセージの確認`ステップに戻ってください。

## 選択がキャンセルされた場合

ユーザがコミットをキャンセルしたいという意思表示であると解釈して、
コミット作業をキャンセルしてください。

# コミットの実行

以下のコマンドでコミットを実行してください。

値は実際のファイルのパスに置き換えてください。

```bash
git commit -F <editmsgPathの値>
```

# 完了報告

コミットが完了したら報告してください。

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.