commit skill
diffを分析し、既存のリポジトリのスタイルに従って、適切に構成されたgit commitメッセージを生成します。
- GitHubスター
- 75
- ファイル
- 1
- 最終コミット
- 2026年9月14日
- ライセンス
- MIT
- 許可されたツール
- 3
commit skillは何をしますか
commitはAgent Skillsです。 diffを分析し、既存のリポジトリのスタイルに従って、適切に構成されたgit commitメッセージを生成します。.
skillのSKILL.mdから生成された要約。
commit skill について
このSKILLは、コード変更の目的を説明する記述的なgit commitメッセージの作成を、開発者に代わって自動化します。エージェントがタスクを完了する必要があるとき、このSKILLをロードして、ステージング済みおよび未ステージングのdiffをリポジトリの最近の履歴とともに分析します。直近の10個のコミットを調査することで、エージェントはプロジェクトで使用されている特定のフォーマットスタイルを学習し、コードベース全体の一貫性を確保します。
このツールは、メッセージのドラフトを作成する前に、git status、git diff HEAD、git branchなどのbashコマンドを使用してコンテキストを収集します。単に変更されたファイルを列挙するのではなく、変更の背後にある理由に焦点を当てます。プロセスは、関連するファイルをステージングし、heredoc構文を使用してgit commitコマンドを実行することで完了します。リポジトリの整合性を維持するため、このSKILLはインタラクティブなフラグを避け、許可なく既存のコミットを修正することを拒否し、.envやcredentials.jsonのような機密情報を含むと思われるファイルはスキップします。
エージェントができること
- 1記述的なコミットメッセージの自動化最近のコード変更の理由を説明するコミットメッセージを作成するようエージェントに依頼します。
- 2リポジトリのスタイルの一貫性を維持プロジェクトの履歴における既存のフォーマットやトーンに一致するコミットをエージェントに作成させます。
- 3安全なファイルのステージング機密性の高い設定ファイルが誤ってバージョン管理履歴に含まれないようにします。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
commit skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。プラグインにcommit skillをインストールする
/plugin marketplace add sneg55/agent-starter /plugin install agent-starter@agent-starter
Claude Codeにcommit skillをインストールする
~/.claude/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit ~/.claude/skills/commitClaude Code (project)にcommit skillをインストールする
.claude/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit .claude/skills/commitCodexにcommit skillをインストールする
~/.agents/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit ~/.agents/skills/commitGemini CLIにcommit skillをインストールする
~/.gemini/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit ~/.gemini/skills/commitClaude.aiにcommit skillをインストールする
npx degit sneg55/agent-starter/skills/commit commit && zip -r commit.zip commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → commit.zip
SKILL.md
GitHubで表示Git Commit
Context
Gather this context before committing:
- Current git status:
git status - Current git diff (staged and unstaged):
git diff HEAD - Current branch:
git branch --show-current - Recent commits:
git log --oneline -10
Git Safety Protocol
- NEVER update the git config
- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
- CRITICAL: ALWAYS create NEW commits. NEVER use git commit --amend, unless the user explicitly requests it
- Do not commit files that likely contain secrets (.env, credentials.json, etc). Warn the user if they specifically request to commit those files
- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit
- Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported
Task
Based on the changes, create a single git commit:
-
Analyze all staged changes and draft a commit message:
- Look at the recent commits to follow this repository's commit message style
- Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
- Ensure the message accurately reflects the changes and their purpose (i.e. "add" means a wholly new feature, "update" means an enhancement to an existing feature, "fix" means a bug fix, etc.)
- Draft a concise (1-2 sentences) commit message that focuses on the "why" rather than the "what"
-
Stage relevant files and create the commit using HEREDOC syntax:
git commit -m "$(cat <<'EOF'
Commit message here.
EOF
)"
Stage and create the commit in a single message. Do not do anything else.
このスキルのファイル
1commit skillに関する質問
Claude Codeにcommit skillをインストールするには
npx degit sneg55/agent-starter/skills/commit ~/.claude/skills/commitを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
commit skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
エージェントはどのようにしてコミットメッセージのスタイルを決定しますか?
エージェントはリポジトリ内の最近のコミットを分析し、新しいメッセージが確立されたコミットメッセージのスタイルに従うようにします。
エージェントは既存のコミットを修正(amend)しますか?
いいえ、エージェントは常に新しいコミットを作成するように指示されており、ユーザーから明示的な要求がない限り、git commit --amendを使用することはありません。
コミットすべき変更がない場合はどうなりますか?
未追跡のファイルや変更がない場合、エージェントは空のコミットを作成しません。