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
Own this skill? Claim it
What it does
- Covers tracing code locations through
git blameandgit log -Lto the commit that last changed them - Includes a lookup via
memory_commit_lookupthat 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 -yInstalls 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
- 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. - Look it up:
memory_commit_lookup { "sha": "<full-sha>" }. - 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_recallwhen 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 15Similar to Commit Context
More Git & Releasescommit-historySkillrohitg00/agentmemory14.8K installsLists recent git commits linked to agent sessions, filterable by branch, repo, and limit.
ctxPluginctxrs/ctx1.2K starsFast local search and 'git blame' for agent sessions.
SemMCP serverataraxy-labs3.5K starsEntity-level code search, impact analysis, and review tooling for Git repositories, exposed to agents.
session-historySkillrohitg00/agentmemory14.9K installsClean reverse-chronological timeline of recent project sessions, pulled strictly from the memory tool with no invented history.
contextual-commitSkillberserkdisruptors/contextual-commits440 installsCommit messages that preserve the reasoning behind code changes, not just the diff, using typed action lines.
whySkillcursor/plugins7.2K installsExplains design decisions and regressions by reading the historical record instead of the current code.