contextual-commit

Write git commit messages with structured action lines in Conventional Commit format.

145|3|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/berserkdisruptors/contextual-commits --skill contextual-commit-berserkdisruptors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contextual-commit
Source: https://github.com/berserkdisruptors/contextual-commits/tree/main/skills/contextual-commit
Command: npx skills add https://github.com/berserkdisruptors/contextual-commits --skill contextual-commit-berserkdisruptors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write git commits that capture the reasoning behind code changes, not just the changes themselves. It prevents important context like intent, rejected options, constraints, and implementation learnings from disappearing when an AI session or development conversation ends.

Core Features & Use Cases

  • Context-rich commit writing: Extends Conventional Commits with structured action lines such as intent, decision, rejected, constraint, and learned.
  • Reasoning-aware commit scope: Uses staged changes as the source of truth when present, and distinguishes between changes with known session context and changes without it.
  • Safe context handling: Avoids fabricating motivations or constraints when the reasoning is not available from the conversation or clearly evidenced in the diff.
  • Use cases: Ideal when finishing a coding task, preparing a clean commit after implementation, documenting architectural tradeoffs, or preserving why a technical approach was chosen over alternatives.

Quick Start

Ask the AI to review the staged git diff and write a Conventional Commit with contextual action lines for the intent, decisions, rejected options, constraints, and learnings that were discussed during the task.

Frequently Asked Questions about contextual-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write git commit messages that capture implementation reasoning?

To write git commit messages that capture implementation reasoning, use Conventional Commit format with structured action lines like intent, decision, rejected, constraint, and learned. This preserves the why behind code changes by documenting architectural tradeoffs and session knowledge alongside the diff.

What are conventional commits and when do I need structured action lines?

Conventional commits standardize git commit messages with structured types and scopes. You need structured action lines like intent, decision, and rejected when you want to preserve implementation reasoning, document tradeoffs, and prevent context from disappearing after a development session ends.

How do I commit staged changes without fabricating context or motivations?

To commit staged changes without fabricating context, use git diff evidence as the source of truth and distinguish between changes with known session context and changes without it. Avoid fabricating motivations or constraints when reasoning is not available from the conversation or diff.

Does contextual-commit work with unstaged work or only staged git diffs?

Contextual-commit works with both staged and unstaged work. When staged changes are present, they serve as the source of truth for commit scope analysis. The Skill distinguishes between changes with known session context and changes without it to avoid fabricating motivations.

What is the best way to document architectural tradeoffs in a git commit?

The best way to document architectural tradeoffs in a git commit is to use Conventional Commit format with structured action lines for decisions, rejected options, and constraints. This captures why a technical approach was chosen over alternatives directly in the commit body.

Why does my commit message lose context after an AI coding session ends?

Your commit message loses context after an AI coding session ends because standard commits capture only code changes, not reasoning. Using structured action lines like intent, learned, and constraint preserves implementation context, rejected options, and constraints directly in the commit body.