recall
Reconstruct and narrate the current development context from contextual commits. Run at session start, when resuming work, or when switching branches. Produces…
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
$ npx -y skills add berserkdisruptors/contextual-commits --skill contextual-commit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/contextual-commitContext preview
The summary Claude sees to decide when to auto-load this skill.
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
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
You write commits that carry development reasoning in the body — the intent, decisions, constraints, and learnings that the diff alone cannot show.
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.
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
Follow Conventional Commits exactly. Nothing changes here:
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.
Use only the types that apply. Most commits need 1-3 action lines. Never pad with noise.
What the user wanted to achieve and why. Captures the human's voice, not your interpretation.
**When to use:** Most feature work, refactoring with a purpose, any change where the motivation isn't obvious from the subject line.
What approach was chosen when alternatives existed. Brief reasoning.
**When to use:** When you evaluated options. Skip for obvious choices with no real alternatives.
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.
**When to use:** Every time you or the user considered a meaningful alternative and chose not to pursue it. Always include the reason.
Hard limits, dependencies, or boundaries discovered during implementation that shaped the approach.
**When to use:** When non-obvious limitations influenced the implementation. Things the next person working here would need to know.
Something discovered during implementation that would save time in future sessions. API quirks, undocumented behavior, performance characteristics.
**When to use:** "I wish I'd known this before I started" moments. Library gotchas, API surprises, non-obvious behaviors.
Determine the commit scope, then compose action lines:
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:**
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.
fix(button): correct alignment on mobile viewport
The conventional
Conventional Commits standardised WHAT changed. Contextual Commits add WHY. A convention for embedding decision traces in git commit bodies.
Repo: berserkdisruptors/contextual-commits
Reconstruct and narrate the current development context from contextual commits. Run at session start, when resuming work, or when switching branches. Produces…