Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

Contextual Commit

Writes commits that keep the WHY — intent, decisions, rejected options, constraints and learnings — as typed action lines in the commit body.

Dev & CodingIntermediate1463AI score 10/10Last updated: May 7, 2026

What it does

  • Keeps the subject line as a plain Conventional Commit (feat(scope): ...), so existing tooling keeps working.
  • Adds structured action lines to the body in the form action-type(scope): description.
  • Supported types: intent (what the human asked for), decision (chosen approach), rejected (discarded alternative + reason), constraint (hard limits found while building), learned (gotchas worth remembering).
  • Defines commit scope by first running git diff --cached --stat; staged changes win, otherwise unstaged/untracked files are considered.
  • Includes anti-fabrication guardrails: intent, rejected, constraint and learned cannot be inferred from a diff alone, so the agent must omit them rather than invent them. Trivial commits get no action lines at all.

Who it's for

  • Developers who keep asking "why did we do it this way?" months later.
  • Anyone pairing with AI agents who loses all reasoning when the session ends.
  • Team leads who want git history to double as onboarding documentation.
  • Teams already on Conventional Commits looking for a non-breaking extension.

Examples

  1. Multi-currency payments refactor → body records rejected(money-library): accounting.js — lacks sub-unit arithmetic, preventing a future agent from re-proposing it.
  2. Google OAuth feature → intent(auth): social login starting with Google plus learned(passport-google): needs explicit offline_access scope for refresh tokens.
  3. Commit contains someone else's staged edits → only diff-evident lines like decision(http-client): switched from axios to native fetch, no speculated intent.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/berserkdisruptors/contextual-commits/HEAD/skills/contextual-commit/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/contextual-commit folder from the GitHub repo berserkdisruptors/contextual-commits into my ~/.claude/skills/contextual-commit/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/berserkdisruptors/contextual-commits.git && mkdir -p ~/.claude/skills && cp -r contextual-commits/skills/contextual-commit ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/berserkdisruptors/contextual-commits.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill in: cp -r contextual-commits/skills/contextual-commit ~/.claude/skills/
  5. Verify that ~/.claude/skills/contextual-commit/SKILL.md exists.
  6. Restart Claude Code, then finish a task and say "commit this" — the skill triggers automatically.
  7. (Optional) For a single project only, copy the folder into .claude/skills/ inside that repository instead.