← スキル一覧に戻る

smart-commit
by vicc
Generate clean, consistent git commit messages using AI. Preview before commit, extract issue keys from branches, zero magic.
⭐ 8🍴 0📅 2026年1月15日
SKILL.md
name: smart-commit description: Generate git commit messages from staged changes using the smart-commit style (emoji-first, imperative, issue key from branch). Trigger when a user invokes /smart-commit or asks for a commit message from a git diff.
Smart Commit
Overview
Self-contained workflow to mirror the smart-commit CLI: staged diff → structured prompt → clean commit message. Use inside a git repo when someone calls /smart-commit or requests a commit message.
Workflow
- Check repo and staging
- Confirm you are in a git repo (
git rev-parse --is-inside-work-tree) and showgit status -sb. - If nothing is staged, ask before staging (
git add <files>); do not stage automatically unless the user approves.
- Gather context
- Run
bash scripts/collect_context.shto capture branch, issue key (from branch), staged files, and staged diff. If it exits because nothing is staged, stage the intended files first. - If the script is unavailable, collect manually: branch (
git rev-parse --abbrev-ref HEAD), issue key (echo "$branch" | grep -oE '[A-Za-z]+-[0-9]+' | head -n1), staged files (git diff --cached --name-status), and staged diff (git diff --cached).
- Generate the message
- Drop the collected context into
references/prompt.md. - Keep the subject ≤ 72 chars, emoji-first, imperative; include the issue key when present.
- Add bullets only when they add clarity; keep them short.
- Present and act
- Show the proposed commit message.
- Only commit if the user asks (
git commit -m "message"orgit commit -e -m "message"); default is to return the message.
Resources
scripts/collect_context.sh: emits branch, issue key, staged files, and diff; exits non-zero when nothing is staged.references/prompt.md: ready-to-use prompt with emoji guide and sample formatting.
Packaging (for distribution)
- Validate:
python /Users/vicc/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/public/smart-commit - Package:
python /Users/vicc/.codex/skills/.system/skill-creator/scripts/package_skill.py skills/public/smart-commit ./dist
スコア
総合スコア
70/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です