Skip to content
rohitg00 avatar

Commit Context

Trace a file, function, or line back to the agent session that produced it.

CCM score
77 of 100
skills.sh installs
14.8K
GitHub stars
30.7K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers tracing code locations through git blame and git log -L to the commit that last changed them
  • Includes a lookup via memory_commit_lookup that returns the linked agent session, its observations, and summary
  • Reports only what git and the lookup return, and says so plainly when a commit predates session linking
  • Designed for questions like "why is this code here" or "who wrote this" about a specific codebase location

Install

$ npx -y skills add rohitg00/agentmemory --skill commit-context -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

The user wants commit context for: $ARGUMENTS

Quick start

git blame -L 40,52 src/auth/refresh.ts   # -> SHA 9a1b2c3d
memory_commit_lookup { "sha": "9a1b2c3d4e5f60718293a4b5c6d7e8f901234567" }

Expected output:

9a1b2c3 on main by dev: "rotate refresh tokens"
Linked session 7f3a9c2 "Auth refresh rework", 14 obs.

Why

Report only what git and the lookup return. When the lookup gives commit: null, the commit predates session linking; do not invent intent.

Workflow

  1. Find the SHA: git blame -L <start>,<end> <file> for a line range; git log -L :<function>:<file> for a function; git log -n 1 -- <file> for a bare path.
  2. Look it up: memory_commit_lookup { "sha": "<full-sha>" }.
  3. Present the commit (sha, short sha, branch, author, message), the linked session(s) (id, project, started/ended, observation count, summary), and the importance >= 7 observations via memory_recall when available.

Anti-patterns

WRONG: lookup returns { "commit": null }, you narrate "the agent was refactoring auth" from the diff alone.

Details

Repository
github.com/rohitg00/agentmemory
Categories
Git & Releases, Memory & Context
First seen
Jul 14, 2026

Questions

What does the commit-context skill do?

It traces a file, function, or line back to the agent session that produced its current commit. It uses git blame or git log to find the SHA, then calls memory_commit_lookup to show the linked session. If the commit predates session linking, it reports that instead of inventing intent.

How do I install the commit-context skill?

Run npx -y skills add rohitg00/agentmemory --skill commit-context -y in a project. Once installed, the agent can answer questions like why code is there or who wrote a given line.

Where does commit-context rank in the Git and Releases category?

On the Git and Releases category page, commit-context ranks in the top 25. It sits alongside skills such as triage and caveman-commit, and it stands out by linking git history to recorded agent sessions.

What does commit-context need to work?

It needs the agentmemory memory tools, specifically memory_commit_lookup, to be available to the agent. It also relies on git being present in the project to find the commit SHA.

More from rohitg00/agentmemory

All 15

Similar to Commit Context

More Git & Releases