contextual-commit

contextual-commit is a skill for Claude Code, Codex from berserkdisruptors/contextual-commits. It costs 62 tokens per session (2,157 once invoked), scanned A, a copy of contextual-commit, MIT.

A commit-writing convention that records the reason behind a code change alongside its title. It uses standard Conventional Commits for the subject and structured lines for intent, decisions, constraints, and lessons.

In plain words
What is it for?
Use it when committing code or completing a task to preserve the requirements, trade-offs, and reasoning that shaped the change.
Why use it?
A normal commit often says what changed but not why, so important context can disappear after the work is finished.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/berserkdisruptors/contextual-commits/contextual-commit
Any agent
npx skills add berserkdisruptors/contextual-commits --skill contextual-commit
Clone the repo
git clone --depth 1 https://github.com/berserkdisruptors/contextual-commits

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for contextual-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/berserkdisruptors/contextual-commits/contextual-commit.svg)](https://agentmods.dev/skills/berserkdisruptors/contextual-commits/contextual-commit)
Your own site
<a href="https://agentmods.dev/skills/berserkdisruptors/contextual-commits/contextual-commit"><img src="https://agentmods.dev/badge/skills/berserkdisruptors/contextual-commits/contextual-commit.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,157 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.02157
Opus 5 $0.00031 $0.01078
Sonnet 5 $0.00012 $0.00431
Haiku 4.5 $0.00006 $0.00216

Measured 5d ago against content hash 5629c23e41eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

contextual-commit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

97% identical to contextual-commit — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/contextual-commit/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Contextual Commits

You write commits that carry development reasoning in the body — the intent, decisions, constraints, and learnings that the diff alone cannot show.

The Problem You Solve

Standard commits preserve WHAT changed. The diff shows that too. What gets lost is WHY — what the user asked for, what alternatives were considered, what constraints shaped the implementation, what was learned along the way. This context evaporates when the session ends. You prevent that.

Commit Format

The subject line is a standard Conventional Commit. The body contains action lines — typed, scoped entries that capture reasoning.

type(scope): subject line (standard conventional commit)

action-type(scope): description of reasoning or context
action-type(scope): another entry

Subject Line

Follow Conventional Commits exactly. Nothing changes here:

  • feat(auth): implement Google OAuth provider
  • fix(payments): handle currency rounding edge case
  • refactor(notifications): extract digest scheduling logic

Action Lines

Each line in the body follows: action-type(scope): description

scope is a human-readable concept label — the domain area, module, or concern. Examples: auth, payment-flow, oauth-library, session-store, api-contracts. Use whatever is meaningful in this project's vocabulary. Keep scopes consistent across commits when referring to the same concept.

Action Types

Use only the types that apply. Most commits need 1-3 action lines. Never pad with noise.

intent(scope): ...

What the user wanted to achieve and why. Captures the human's voice, not your interpretation.

  • intent(auth): social login starting with Google, then GitHub and Apple
  • intent(notifications): users want batch notifications instead of per-event emails
  • intent(payment-flow): must support EUR and GBP alongside USD for enterprise clients

When to use: Most feature work, refactoring with a purpose, any change where the motivation isn't obvious from the subject line.

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 194 lines · 62 tokens per session scan A 5629c23e41eb

Subscribe to this mod's changes

contextual-commit is a skill published in the GitHub repository berserkdisruptors/contextual-commits (153 stars, last pushed 4mo ago), licensed MIT. It adds 62 tokens to every session and 2,157 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to contextual-commit, differing in 2 lines, and is treated as a copy.