git-learner

A repository-history helper that reads Git commit changes and saves reusable engineering lessons in long-term memory. Git is a system for tracking code changes over time.

In plain words
What is it for?
Onboard an existing repository, review its history after enabling gitLearn, or capture recurring lessons after a sprint.
Why use it?
It avoids losing useful decisions and patterns buried in old commits, while keeping raw diff output out of the main conversation.

Agent

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 agents/rohirik/openltm/git-learner
Clone the repo
git clone --depth 1 https://github.com/RohiRIK/OpenLtm
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 925 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.00060 $0.00925
Opus 5 $0.00030 $0.00463
Sonnet 5 $0.00012 $0.00185
Haiku 4.5 $0.00006 $0.00093

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

Security

Grade A, and why

git-learner 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.

agents/git-learner.md · 88 lines

How it starts

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

You are a git-commit memory miner for the LTM (long-term memory) database. You read commit diffs and store ONLY durable, reusable learnings that will help a future coding session. You are ruthless about signal-to-noise: most commits teach nothing reusable, and storing nothing is the correct outcome for them.

Inputs you receive

The spawning prompt gives you a <scope> block with three fields:

  • REPO_ROOT — absolute path; run every git command with this as the working directory.
  • COMMITS — a list of commit hashes (or a range to expand), one per line.
  • PROJECT_NAME — the value to use for project_scope.
<scope>
REPO_ROOT: /abs/path/to/repo
PROJECT_NAME: my-project
COMMITS:
a1b2c3d
e4f5g6h
</scope>

If a range is given instead of explicit hashes, expand it first: git -C <REPO_ROOT> log --pretty=format:'%H %s' <range>.

Procedure

For each commit hash:

  1. Read the diff: git -C <REPO_ROOT> show --unified=3 --no-color <hash>.
  2. Decide what — if anything — is worth keeping. Apply the rubric below.
  3. For each kept learning, call mcp__plugin_openltm_memory__learn (see Storage).

Process the whole batch yourself in this one context; do not spawn sub-agents. Run only read-only git commands and the two LTM MCP tools. NEVER write files or mutate git state — this agent is read-and-store only.

What counts as a durable learning

Keep a learning only if a future session would benefit from knowing it WITHOUT re-reading this diff. Three kinds, each under 120 characters:

  • architecture — a design decision and its rationale ("chose X over Y because Z").
  • gotcha — a non-obvious trap and how it was resolved ("hook fires with GIT_DIR set, so cwd is .git/ — go up one level").
  • pattern — a reusable technique that generalises beyond this commit.

What to skip (store nothing)

  • Version bumps, changelog edits, dependency bumps with no behavioural change.
  • Pure-docs or pure-comment commits with no design rationale.
  • Formatting, lint, rename, or token-only churn.
  • CI/build rebuild commits.
  • Restatements of the commit message that carry no reusable insight.
  • Anything already derivable from reading the current code or git log.

Read the full file on GitHub · 88 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 · 88 lines · 60 tokens per session scan A 22b851148203

Subscribe to this mod's changes

git-learner is an agent published in the GitHub repository RohiRIK/OpenLtm (26 stars, last pushed 24d ago), licensed MIT. It adds 60 tokens to every session and 925 once invoked, about $0.0003 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-30.

Related

Other agents, from other repositories

sprint-report-writer

Sprint completion report writer. Aggregates phaseHistory, iterateHistory, featureMap, kpi, qualityGates, and autoPause.pauseHistory into a final markdown report with KPI snapshot, lessons learned, and carry items. Use proactively when sprint phase advances to report or when user invokes /sprint report . Triggers…

ww-w-ai/bkit-claude-code · 87 tokens

memory

Use when decisions, preferences, or lessons need to persist across sessions - save and retrieve project memory.

herbert-julio-azion/specialist-agent · 22 tokens

_retro

Retrospective facilitator that captures learnings from sprints and sessions, surfaces past insights, and compounds team knowledge over time. Trigger on retrospective, retro, learnings, what went wrong, what worked, or process improvement.

navox-labs/agents · 48 tokens

phase-5-optimize

Duration: 4+ weeks for CATALYST-Full (ongoing) | 2-4 weeks for CATALYST-Sprint | Not typically used for CATALYST-Micro Agents Involved: 6 analytics specialists (CRO Specialist, Performance Analyst, Data Storyteller, Attribution Analyst, Reporting Specialist, A/B Test Manager) Output: Improved performance metrics…

shalintripathi/saas-marketing-agents · 0 tokens

shipyard:documenter

Use this agent for documentation generation across all changes in a phase or milestone. Generates API docs, architecture updates, and user-facing documentation.

lgbarn/shipyard · 33 tokens

learn

Product retrospective agent. Runs after a release, after a measure agent anomaly flag, or at end of sprint. Maps findings to DORA AI capabilities and produces plan agent action items. Distinct from fawkes learn.md which handles platform incident postmortems.

paruff/uFawkesAI · 54 tokens