contextual-commit

Write Conventional Commit messages with typed scoped action lines for git commits.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/mistakenot/auto-stack --skill contextual-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contextual-commit
Source: https://github.com/mistakenot/auto-stack/tree/main/.agents/skills/contextual-commit
Command: npx skills add https://github.com/mistakenot/auto-stack --skill contextual-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Commits and diffs document what changed but rarely capture why decisions were made, what constraints existed, or which alternatives were rejected. This Skill helps preserve the development reasoning — intent, decisions, rejections, constraints, and learnings — directly in commit messages so future maintainers and agents understand the rationale behind code changes.

Core Features & Use Cases

  • Structured Commit Bodies: Enforces a Conventional Commit subject plus typed, scoped action lines (intent, decision, rejected, constraint, learned) in the body.
  • Context-Aware Guidance: Advises when to write action lines based on staged vs unstaged changes and when context is missing to avoid fabrication.
  • Use Case: When finishing a feature or fixing a bug, produce a commit that records the user's intent, chosen approach, discarded alternatives, and important constraints so replaying or reflecting on the session is easier.

Quick Start

Use the contextual-commit skill to write a commit for staged changes that captures intent, decisions, and constraints.

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 why code changed?

To write git commit messages that capture why code changed, use a structured format with a Conventional Commit subject and typed body lines for intent, decisions, rejections, constraints, and learnings. This preserves development reasoning directly alongside the diff.

What is a conventional commit format for documenting development decisions?

A conventional commit format for documenting decisions pairs a standard subject line with scoped action lines in the body. These typed lines summarize intent, chosen approaches, discarded alternatives, and constraints to help future maintainers understand the rationale.

How do I document rejected alternatives and constraints in a git commit?

You document rejected alternatives and constraints in a git commit by adding typed, scoped action lines to the commit body. This structured approach explicitly records what was discarded and which limitations existed without fabricating missing context.

Can I generate contextual commit messages for unstaged changes?

You can generate contextual commit messages for staged changes, but the skill advises caution with unstaged changes. It provides context-aware guidance on when to write action lines and warns against fabricating missing context when development reasoning is unavailable.

Why does my git diff not explain the intent behind code changes?

Your git diff does not explain intent because diffs only document what changed. To capture why decisions were made, you need structured commit messages with typed body lines that record intent, constraints, and discarded alternatives alongside the code changes.

When do I need contextual commit messages in my development workflow?

You need contextual commit messages when finishing features, fixing bugs, or documenting multi-step decisions. They record user intent, chosen approaches, discarded alternatives, and important constraints so replaying or reflecting on the session is easier for future maintainers.