commitlore-commits

A guide for adding a CommitLore decision record to a Git commit. A Git commit is a saved set of code changes; the record preserves constraints, rejected alternatives, and warnings that the diff may not show.

In plain words
What is it for?
Use it before a non-trivial commit to prepare, verify, and stage a record from the session transcript and staged changes.
Why use it?
It helps future developers understand why a change was made while preventing unsupported claims from entering project history. It also avoids adding records to trivial commits.

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/monglong0214/commitlore/commitlore-commits
Any agent
npx skills add MongLong0214/commitlore --skill commitlore-commits
Clone the repo
git clone --depth 1 https://github.com/MongLong0214/commitlore

Made for: Claude Code, Codex.

Per session 235 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,881 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00235 $0.02881
Opus 5 $0.00118 $0.01440
Sonnet 5 $0.00047 $0.00576
Haiku 4.5 $0.00023 $0.00288

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

Security

Grade A, and why

commitlore-commits 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 2d 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.

skills/commitlore-commits/SKILL.md · 206 lines

How it starts

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

CommitLore commits

A CommitLore record is the trailer block at the end of a commit message — ordinary git trailers, parsed by git interpret-trailers. It captures what the diff itself cannot show: the conditions that shaped the decision, the alternatives that were dropped and why, and warnings for the next agent or person who touches this code.

Record through capture. It binds the record to a nonce, hashes the transcript and staged diff it was drafted from, and refuses any quote absent from those bytes — so a record citing something nobody said never reaches history. Hand-writing trailers skips all of that; it is the fallback at the end of this file, not the default.

When to record, and when not to

Trivial commits — typo fixes, formatting, a rename with no behavior change — get no trailers. A record costs a future reader attention, and spending that on noise is worse than recording nothing. Record only a real constraint, a real alternative that was seriously considered and rejected, or a real warning worth leaving. Answering {"records": []} is correct, and common.

Capture

This skill is the host-side initiator when the host selects it for a commit request. The prepare-commit-msg hook that commitlore init installs only attaches an already staged transaction; an ordinary git commit never starts capture because it has no session transcript. Without the hook, nothing staged reaches a commit message. Stage the change first — capture hashes git diff --cached.

1. Prepare. Write the relevant part of the session to a transcript, in the words actually exchanged rather than a summary: it is the source every quote is checked against, so paraphrasing is how a record ends up citing a sentence that was never said.

  • MCP: commitlore_prepare_capture { transcript }{ nonce, prompt, guard_advisory, policy_error, ... }
  • CLI: commitlore capture --transcript session.txt prints the same prompt.

2. Draft. That prompt is a self-contained contract — the full vocabulary, the rule cite or omit, and the JSON to answer in: a records array, each with trailers (key, value) and evidence (key, source of transcript or diff, quote, locator). A quote is copied character for character; a locator is L<start>-L<end> for transcript lines or the @@ ... @@ hunk header for the diff. Follow the printed contract — it is the authority, and it carries rules this file does not repeat.

Read the full file on GitHub · 206 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. 2d ago First seen · 206 lines · 235 tokens per session scan A c91492e6fd48

Subscribe to this mod's changes

commitlore-commits is a skill published in the GitHub repository MongLong0214/commitlore (9 stars, last pushed 4d ago), licensed MIT. It adds 235 tokens to every session and 2,881 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

Effective Memory

The essential habits for an AI agent with memory — session bookends, learning triggers, verification, safety, and the operational discipline that turns raw recall into compounding intelligence. Pinned, always-injected.

plur-ai/plur · 44 tokens

recall

Recall this repository's OwnMem local memory before changing code, and keep it healthy. Use when a repository contains .ownmem/, when past debugging lessons could apply ("have we hit this before", "why is it done this way"), or when the user mentions ownmem, project memory, or recalling across sessions.

grpcer/ownmem · 66 tokens

mnemo-cortex

Installs and wires Mnemo Cortex (local-first persistent memory) into OpenClaw and other MCP-capable agents. Use for cross-session recall, decision history, or multi-agent shared memory.

GuyMannDude/mnemo-cortex · 44 tokens

init

Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.

grpcer/ownmem · 43 tokens

ori-memory

Persistent agent memory with learning retrieval. Knowledge graph on markdown files — capture insights, decisions, research, and learnings during work, then retrieve them weeks or months later. Use when knowledge is too valuable to lose but too much to inject into every prompt.

aayoawoyemi/Ori-Mnemos · 54 tokens

ogham-research

Structured memory capture for Ogham shared memory. Use when the user wants to store findings, remember something, save what was learned, or capture a decision. Triggers on "remember this", "store this", "save this finding", "save what we learned", "capture this decision", "log this", or any request to persist…

ogham-mcp/ogham-mcp · 113 tokens