← ClaudeAtlas

commit-messagelisted

Generate a conventional commit message by analyzing staged git changes. Use when the user wants to create, write, or generate a git commit message from their current staged diff. Trigger on phrases like "commit", "commit message", "commit msg", "寫 commit", "提交訊息", "generate commit", or when the user has just finished making code changes and wants to commit them. Also trigger when the user runs /commit-message.
appleboy/skills · ★ 0 · Code & Development · score 60
Install: claude install-skill appleboy/skills
# Generate Commit Message Generate a conventional commit message from staged git changes following a structured prompt pipeline. ## Steps ### 1. Stage changes and get the diff Only stage files that were modified as part of the current session's work. Do not blindly run `git add -A` or `git add .` — pick specific files relevant to the task. If unsure which files to stage, show the user `git status` and let them decide. Then get both an overview and the full diff: ```bash git diff --staged --stat git diff --staged ``` If the diff is empty after this, inform the user that there are no staged changes and stop. If the diff is very large (e.g., more than 2000 lines), focus on the `--stat` output and the most important hunks. For files where changes are too extensive, note that those diffs were omitted and base the summary on the stat overview and available context. If the staged changes span many unrelated modules or more than 10 files across different concerns, suggest splitting into multiple focused commits before proceeding. ### 2. Check existing commit style Run a quick scan of recent commits to match the repo's conventions: ```bash git log --oneline -20 ``` If the repo already follows a consistent style (e.g., specific scope naming, prefix preferences, or language), adapt the generated message to match. The conventions in this skill are defaults — defer to the repo's existing patterns when they differ. ### 3. Analyze the diff Produce a bullet-point summary of th