Skills rohitg00 agentmemory agentmemory
commit-context
- Use it when:
- You ask why some code is here, who wrote it, or what the agent was doing when it changed.
- It does:
- Finds the commit with git blame or git log, then looks it up in agentmemory for the agent session linked to it.
- You get:
- The commit's sha, branch, author and message, the linked session's summary and observation count, and its important observations.
- Needs:
- agentmemory's memory server and MCP tools, and git.
- Older commits:
- Made before session linking show no session, and the agent says so rather than guessing intent from the diff.
Skill 8 of 8 in the agentmemory bundle, after commit-history.
TL;DR
Part of agentmemory, a memory server that records what coding agents do in each session as observations. commit-context works backwards from code to the session linked to its commit. For a line range the agent runs git blame, for a function git log -L, and for a bare file path the last commit that touched it. It looks the full sha up in agentmemory and presents the commit, the linked sessions with their project, start and end, observation count and summary, and the observations of importance 7 or more when memory recall is available. When the lookup finds no commit record, the commit predates session linking: the agent says so and describes only what git shows, claiming no intent beyond what the observations state. commit-history lists many linked commits at once.
Summarizes the skill at f0f7378.
npx skills add https://github.com/rohitg00/agentmemory --skill commit-context skills.sh pageSource on GitHubAll skills from rohitg00/agentmemory
- Total Downloads
- 14,300 on skills.sh, Nov 9, 2026
- Repo stars
- 30,216 rohitg00/agentmemory
- First seen
- May 18, 2026 on skills.sh
Weekly values
| Week to | Installs |
|---|---|
| Sep 21 | 396 |
| Sep 28 | 372 |
| Oct 5 | 342 |
| Oct 12 | 312 |
| Oct 19 | 331 |
| Oct 26 | 319 |
| Nov 2 | 294 |
| Nov 9 | 256 |
| Category |
Build agents, orchestrate workers and give agents memory. Test-first work, implementation from specs, git hygiene and scope control. Everything for building software: planning, coding, debugging, design, frameworks, cloud, agents and skills. |
|---|---|
| Type |
Operates a CLI, API, app or bundled script to get something done. |
| Effect |
Adds no side effects of its own. It shapes how the agent thinks, writes or reviews. Guidelines and routers are always effect:none, even when the task they support edits code. |
| Needs |
Needs an MCP server connected. |
| Publisher |
A verified publisher on skills.sh, or the company or maintainer behind the product the skill operates. |
| Topics | |
| Stack |
SKILL.md
From rohitg00/agentmemory at f0f7378. Checked daily, last changed Nov 6, 2026.
Frontmatter
name: commit-context
description: Trace a file, function, or line back to the agent session that produced its current commit. Use when the user asks "why is this code here", "what was the agent doing when this changed", "who wrote this", or wants context on a specific location in the codebase.
argument-hint: "[file, function, or line]"
user-invocable: trueThe 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.
RIGHT: "This commit predates session linking, so there is no recorded agent
session. From git show: it changed token rotation in refresh.ts."
Checklist
- SHA came from git blame/log, not a guess.
commit: nullreported as "predates linking", no fabricated session.- Session details quote the lookup response verbatim.
- No intent claimed beyond what observations state.
See also
commit-history: list many agent-linked commits at once.recall: dig deeper into the linked session's observations.
Troubleshooting
See TROUBLESHOOTING.md if memory_commit_lookup is not available.