Agent skill

Contextual Commit Messages

by yamadashy in yamadashy/repomix

Writes Conventional Commits whose bodies carry action lines recording the intent, decisions and constraints behind a change, not only what changed.

MITAuto-check passedDevelopment

Install Contextual Commit Messages

skills CLI
$ npx skills add yamadashy/repomix --skill contextual-commit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yamadashy/repomix contextual-commit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yamadashy/repomix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/contextual-commit .claude/skills/contextual-commit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
contextual-commit
GitHub stars
29k
Used in
1 other repo
Token cost
~2.7k tokens
SKILL.md length
1,139 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Writes Conventional Commits whose bodies carry action lines recording the intent, decisions and constraints behind a change, not only what changed.

  • Works in 4 steps: Check for staged changes first — run git… → Identify what you have session context… → Identify what you don't — files or… → …
  • Committing code at the end of a task
  • SKILL.md covers The Problem You Solve, Commit Format, Action Types and Before You Write the Commit, plus 4 more sections
  • Calls git

What it does

The skill keeps a standard Conventional Commit subject line and adds typed, scoped action lines to the body, each in the form action-type(scope): description. The scope is a human-readable concept label such as auth or payment-flow, kept consistent across commits. The aim is to preserve reasoning the diff cannot show, such as what the user asked for, which alternatives were weighed and what was learned, which otherwise vanishes when the session ends.

Most commits need one to three action lines, and the skill warns against padding with noise. Intent lines record what the user wanted and why, in their own voice. Decision lines record the approach chosen when alternatives existed, and are skipped for obvious choices. The examples cover social login across several providers, batch notifications instead of per-event emails, a weekly digest schedule and multi-currency payments.

When your agent uses it

  • Committing code at the end of a task
  • Recording why an approach was chosen over its alternatives
  • Writing commit messages that reviewers and later sessions can learn from

Example prompts

  • “Commit my changes and explain in the body why we picked passport.js.”
  • “Commit this work and include the intent behind the notification batching change.”
  • “Write a contextual commit for the currency rounding fix.”

Requirements

  • Git

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Check for staged changes first — run git diff --cached --stat.
  2. Identify what you have session context for — changes you produced, discussed, or observed reasoning for during this conversation.
  3. Identify what you don't — files or changes from a prior session, another agent, or manual edits outside this conversation.
  4. Write action lines accordingly

What it can do on your machine

Read from SKILL.md and the folder at commit 8d64291. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Contextual Commit Messages loads about 2.7k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 1,139 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yamadashy/repomix at commit 8d64291, republished under its MIT licence (© yamadashy). 1,139 words, ~2,657 tokens.

Download SKILL.mdSave it as .claude/skills/contextual-commit/SKILL.md (or your agent's skills folder).
name
contextual-commit
description
Write contextual commits that capture intent, decisions, and constraints alongside code changes. Use when committing code, finishing a task, or when the user asks to commit. Extends Conventional Commits with structured action lines in the commit body that preserve WHY code was written, not just WHAT changed.
license
MIT
metadata.internal
true

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.

decision(scope): ...

What approach was chosen when alternatives existed. Brief reasoning.

  • decision(oauth-library): passport.js over auth0-sdk for multi-provider flexibility
  • decision(digest-schedule): weekly on Monday 9am, not daily — matches user research
  • decision(currency-handling): per-transaction currency over account-level default

When to use: When you evaluated options. Skip for obvious choices with no real alternatives.

rejected(scope): ...

What was considered and explicitly discarded, with the reason. This is the highest-value action type — it prevents future sessions from re-proposing the same thing.

  • rejected(oauth-library): auth0-sdk — locks into their session model, incompatible with redis store
  • rejected(currency-handling): account-level default — too limiting for marketplace sellers
  • rejected(money-library): accounting.js — lacks support for sub-unit (cents) arithmetic

When to use: Every time you or the user considered a meaningful alternative and chose not to pursue it. Always include the reason.

constraint(scope): ...

Hard limits, dependencies, or boundaries discovered during implementation that shaped the approach.

  • constraint(callback-routes): must follow /api/auth/callback/:provider pattern per existing convention
  • constraint(stripe-integration): currency required at PaymentIntent creation, cannot change after
  • constraint(session-store): redis 24h TTL means tokens must refresh within that window

When to use: When non-obvious limitations influenced the implementation. Things the next person working here would need to know.

learned(scope): ...

Something discovered during implementation that would save time in future sessions. API quirks, undocumented behavior, performance characteristics.

  • learned(passport-google): requires explicit offline_access scope for refresh tokens, undocumented in quickstart
  • learned(stripe-multicurrency): presentment currency and settlement currency are different concepts
  • learned(exchange-rates): Stripe handles conversion — do NOT store our own rates

When to use: "I wish I'd known this before I started" moments. Library gotchas, API surprises, non-obvious behaviors.

Before You Write the Commit

Determine the commit scope, then compose action lines:

  1. Check for staged changes first — run git diff --cached --stat.
    • If staged changes exist: these are the commit scope. Do not consider unstaged or untracked files — the user has already expressed what belongs in this commit by staging it.
    • If nothing is staged: consider all unstaged modifications and untracked files as candidates. Use session context and the diff to decide what to stage and commit.
  2. Identify what you have session context for — changes you produced, discussed, or observed reasoning for during this conversation.
  3. Identify what you don't — files or changes from a prior session, another agent, or manual edits outside this conversation.
  4. Write action lines accordingly:
    • For changes you have context for: full action lines from session knowledge.
    • For changes you don't: apply the "When You Lack Conversation Context" rules below — write only what the diff evidences.

The commit message must account for ALL changes in the commit scope, not just the ones you worked on. Ignoring changes you didn't produce is worse than writing thin action lines for them.

Show full SKILL.md (452 more words)Show less

Examples

Simple fix — no action lines needed
fix(button): correct alignment on mobile viewport

The conventional commit subject is sufficient. Don't add noise.

Moderate feature
feat(notifications): add email digest for weekly summaries

intent(notifications): users want batch notifications instead of per-event emails
decision(digest-schedule): weekly on Monday 9am — matches user research feedback
constraint(email-provider): SendGrid batch API limited to 1000 recipients per call
Complex architectural change
refactor(payments): migrate from single to multi-currency support

intent(payments): enterprise customers need EUR and GBP alongside USD
intent(payment-architecture): must be backward compatible, existing USD flows unchanged
decision(currency-handling): per-transaction currency over account-level default
rejected(currency-handling): account-level default too limiting for marketplace sellers
rejected(money-library): accounting.js — lacks sub-unit arithmetic, using currency.js instead
constraint(stripe-integration): Stripe requires currency at PaymentIntent creation, cannot change after
constraint(database-migration): existing amount columns need companion currency columns, not replacement
learned(stripe-multicurrency): presentment currency vs settlement currency are different Stripe concepts
learned(exchange-rates): Stripe handles conversion, we should NOT store our own rates
Mid-implementation pivot

When intent changes during work, capture it on the commit where the pivot happens:

refactor(auth): switch from session-based to JWT tokens

intent(auth): original session approach incompatible with redis cluster setup
rejected(auth-sessions): redis cluster doesn't support session stickiness needed by passport sessions
decision(auth-tokens): JWT with short expiry + refresh token pattern
learned(redis-cluster): session affinity requires sticky sessions at load balancer level — too invasive

When You Lack Conversation Context

Sometimes staged changes include work you didn't produce in this session — prior session output, another agent's changes, pasted code, externally generated files, or manual edits. For any change where you lack the reasoning trail:

Only write action lines for what is clearly evidenced in the diff. Do not speculate about intent or constraints you cannot observe.

What you CAN infer from a diff alone:

  • decision(scope) — if a clear technical choice is visible (new dependency added, pattern adopted, library switched). Example: decision(http-client): switched from axios to native fetch is visible from the diff.

What you CANNOT infer — do not fabricate:

  • intent(scope) — why the change was made is not in the diff. Don't restate what the diff shows.
  • rejected(scope) — what was NOT chosen is invisible in what WAS committed.
  • constraint(scope) — hard limits are almost never visible in code changes.
  • learned(scope) — learnings come from the process, not the output.

A clean conventional commit subject with no action lines is always better than fabricated context.

Git Workflows

Contextual commits work with every standard git workflow. No special handling needed.

  • Regular merges: Commit bodies preserved intact.
  • Squash merges: All commit bodies concatenated into the squash commit body. The result is a chronological trail of typed, scoped action lines — agents parse, filter, and group these without issue.
  • Rebase and cherry-pick: Commit bodies preserved.

Rules

  1. The subject line is a Conventional Commit. Never break existing conventions or tooling.
  2. Action lines go in the body only. Never in the subject line.
  3. Only write action lines that carry signal. If the diff already explains it, don't repeat it. If there was nothing to decide, reject, or discover, write no action lines.
  4. Be concise but complete. Each action line should be a single clear statement. No artificial length limits, but don't write essays either.
  5. Use consistent scopes within a project. If you called it auth in one commit, don't call it authentication in the next.
  6. Capture the user's intent in their words. For intent lines, reflect what the human asked for, not your implementation summary.
  7. Always explain why for rejected lines. A rejection without a reason is useless — the next agent will just re-propose it.
  8. Don't invent action lines for trivial commits. A typo fix, a dependency bump, a formatting change — the conventional commit subject is enough.
  9. Don't fabricate context you don't have. If you weren't part of the reasoning, don't pretend you were. See "When You Lack Conversation Context" above.

© yamadashy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/contextual-commit of yamadashy/repomix.

Open the folder on GitHubat commit 8d64291

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in yamadashy/repomix, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Contextual Commit Messages next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Contextual Commit Messages compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Contextual Commit Messages this skillyamadashy/repomix29k1 repos~2.7kAutomated safety check: PassMIT
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0
Git Workflow and Versioningaddyosmani/agent-skills102k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Emoji Commit ConventionsbaptisteArno/typebot.io11k—~424Automated safety check: PassCustom licence

Similar skills

  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    102k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated today
    DevelopmentAuto-check passed
  • Emoji Commit Conventions

    baptisteArno/typebot.io

    Sets the repository's convention for commit messages and pull request titles: one emoji prefix for the main intent, a concise title and clean follow-up commits.

    11k GitHub stars~424 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Commit And PR Messages

    superplanehq/superplane

    Write Git commit messages and pull request titles/descriptions using the Chris Beams / Tim Pope conventions (subject/body split, ~50-char subject, imperative mood, why-not-how body) plus ASD-STE100…

    7.7k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed

More from yamadashy/repomix

  • Agent Carnet Notebook

    yamadashy/repomix

    Saves and recalls markdown notes between agent sessions with the agent-carnet CLI, tracking which notes proved useful so stale ones expire and good ones stay.

    29k GitHub stars~1.2k tokensUpdated 3 days ago
    Auto-check passed
  • Repomix Codebase Explorer

    yamadashy/repomix

    Packs a local or remote repository into a single AI-friendly file with the Repomix CLI, then reads and searches that output to explain structure, find patterns or report metrics.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content…

    29k GitHub starsUsed in 1 repo~288 tokens
    Auto-check passed
  • Repomix Codebase Packer

    yamadashy/repomix

    Packs a local directory or remote GitHub repository into one AI-friendly file with Repomix, then searches it to explore structure, find patterns and count tokens.

    29k GitHub stars~1.3k tokensUpdated 3 days ago
    Auto-check: notes
  • Guides edits to the Repomix documentation site's VitePress configuration, per-language content, and translation workflow across 14 languages.

    29k GitHub starsUsed in 1 repo~342 tokens
    Auto-check passed

Categories

Questions about Contextual Commit Messages

What does Contextual Commit Messages do?

Writes Conventional Commits whose bodies carry action lines recording the intent, decisions and constraints behind a change, not only what changed. The skill keeps a standard Conventional Commit subject line and adds typed, scoped action lines to the body, each in the form action-type(scope): description. The scope is a human-readable concept label such as auth or payment-flow, kept consistent across commits.

When should I use Contextual Commit Messages?

Contextual Commit Messages fits situations like: committing code at the end of a task; recording why an approach was chosen over its alternatives; writing commit messages that reviewers and later sessions can learn from.

How do I install Contextual Commit Messages in Claude Code?

Run `npx skills add yamadashy/repomix --skill contextual-commit -a claude-code`. Or copy the skill folder (.agents/skills/contextual-commit in yamadashy/repomix) into .claude/skills/contextual-commit in your project. Claude Code loads it when a task matches its description.

How do I install Contextual Commit Messages in Codex?

Run `npx skills add yamadashy/repomix --skill contextual-commit -a codex`. Or copy the skill folder (.agents/skills/contextual-commit in yamadashy/repomix) into .agents/skills/contextual-commit in your project. Codex loads it when a task matches its description.

Can I use Contextual Commit Messages in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yamadashy/repomix --skill contextual-commit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/contextual-commit, .gemini/skills/contextual-commit, .github/skills/contextual-commit and .opencode/skills/contextual-commit in your project.

What does Contextual Commit Messages need to run?

Going by SKILL.md and its folder, Contextual Commit Messages needs the command-line tools its instructions call (git). Our summary lists: Git.

Does Contextual Commit Messages access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Contextual Commit Messages safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Contextual Commit Messages use?

Contextual Commit Messages is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Contextual Commit Messages use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Contextual Commit Messages?

Skills that share tags, products or a category with Contextual Commit Messages: ToolJet Multi-Repo Commit (ToolJet/ToolJet, 41k stars), Git Workflow and Versioning (addyosmani/agent-skills, 102k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars) and Saleor Commit Workflow (saleor/saleor, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Contextual Commit Messages?

yamadashy (a GitHub user) maintains it in yamadashy/repomix, which has 28,734 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 3, 2026.

Source: yamadashy/repomix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.