← ClaudeAtlas

commit-contextlisted

Commit staged (or unstaged) changes with a git commit message automatically derived from the current conversation context. Use this skill whenever the user says "/commit-context", "commit with context", "commit context", or asks to commit using the conversation/session context as the commit message. This skill should NOT auto-trigger — only invoke it when the user explicitly requests it.
mthli/skills · ★ 2 · Code & Development · score 69
Install: claude install-skill mthli/skills
# Commit Context Generate a rich git commit message by combining **what changed** (from `git diff`) with **why it changed** (from the conversation context — the questions asked, decisions made, bugs discussed, features planned). A good commit message tells a story that `git log` readers can follow months later. The diff already shows *what*; this skill's job is to capture the *why* and *how* from the session so future readers don't have to guess. ## Workflow ### 1. Gather the raw materials Run these commands to understand the current state of the repo: ```bash git status git diff --staged git log --oneline -5 ``` - If there **are** staged changes → use those as the basis for the commit. - If there are **no** staged changes but there **are** unstaged changes → show the user what's unstaged (`git diff --stat`) and ask whether to: - Stage everything (`git add -A`) - Stage specific files (let the user pick) - Abort - If there are **no changes at all** → tell the user there's nothing to commit and stop. ### 2. Load the module registry & map changes When the `# Decisions` block in Step 5 is written, every decision must be tagged with a `MODULE` that exists in `.claude/MODULES.md` — the registry that makes `git log --grep="MODULE: <id>"` mechanical. (The block may also be skipped entirely; see the conditions below.) **First check whether Decisions apply at all**. Skip the entire `# Decisions` block (and the rest of this step) when **any** of the following holds — t