commit-history — Claude Code skill: what it does, how to install
Lists git commits linked to agent sessions with optional filters for branch, repo, and limit.
npx skills add rohitg00/agentmemory --skill commit-history -a claude-codeWhat commit-history does
The skill calls the memory_commits tool to inspect git commits recorded during agent runs. Output arrives in reverse-chronological order. Each entry displays the short sha, branch name, author timestamp, commit subject line, linked session IDs, and observation counts.
Arguments accept branch=<name>, repo=<url-or-fragment>, and limit=<n>. A bare numeric token acts as the limit, with a default of 100 and a ceiling of 500. When falling back to REST requests against GET /agentmemory/commits, the workflow URL-encodes every parameter.
The tool cannot return data if memory_commits is not available in the environment. An empty list simply means the filter matched nothing, so dropping the branch or repo argument is the first step to verify.
What it helps with
- inspect git commits created across agent sessions
- filter agent commit history by branch or repository
- find linked session identifiers and observation counts for commits
- cap the returned commit list with custom limits up to 500
Example prompts for the agent
- show agent commits branch=main limit=20
- what has the agent shipped recently?
- list linked commits repo=my-org/project
How to install commit-history
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill commit-history -a claude-code2Manually: put the files in place
~/.claude/skills/commit-history/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/commit-history/
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill commit-history -a codex2Manually: put the files in place
.agents/skills/commit-history/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill commit-history -a cursor2Manually: put the files in place
.cursor/skills/commit-history/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rohitg00/agentmemory commit-history2Manually: put the files in place
.github/skills/commit-history/SKILL.md1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill commit-history -a gemini-cli2Platform CLI
gemini skills install https://github.com/rohitg00/agentmemory --path plugin/skills/commit-historyManually: put the files in place
.devin/skills/commit-history/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill commit-history -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set11
The whole set →Similar
Questions about commit-history
How to install commit-history in Claude Code?
Run npx skills add rohitg00/agentmemory --skill commit-history -a claude-code.
What does commit-history do?
It queries the memory_commits tool to show git commits linked to agent sessions, sorted newest first.
What arguments does commit-history take?
It accepts branch, repo, and limit up to 500, parsing any bare number as the limit.
Source text
SKILL.md · Apache-2.0
---
name: commit-history
description: List recent git commits linked to agent sessions, optionally filtered by branch or repo. Use when the user asks "show agent commits", "what has the agent shipped", "list linked commits", or wants commits with their session context.
argument-hint: "[branch=... repo=... limit=...]"
user-invocable: true
---
The user wants a list of agent-linked commits. Filter args: $ARGUMENTS
## Quick start
```json
memory_commits { "branch": "main", "limit": 20 }
```
Expected output:
```text
9a1b2c3 main 2026-06-07 "rotate refresh tokens" · session 7f3a9c2 (14 obs)
b21d004 main 2026-06-05 "rate limiter audit" · session b21d004 (9 obs)
```
## Why
Render only the commits the tool returned, newest first. An empty result means
the filter matched nothing, not that work is missing.
## Workflow
1. Parse `$ARGUMENTS` for `branch=<name>`, `repo=<url-or-fragment>`,
`limit=<n>`. A bare numeric token is the limit. Defaults: no branch, no repo,
limit 100, max 500.
2. Call `memory_commits` with the parsed filters.
3. Render reverse-chronologically: short sha, branch, authored timestamp, first
line of the message, linked session id(s) (first 8) with observation counts,
and file count when `files` is present.
4. Empty result: tell the user the filter matched nothing and suggest dropping
the branch or repo filter.
## Anti-patterns
WRONG (REST fallback): concatenate `?branch=` + raw branch name, so a name with
`?`, `&`, or `#` corrupts the query string.
RIGHT: URL-encode every value with `URLSearchParams`/`encodeURIComponent` before
appending to `GET /agentmemory/commits`.
## Checklist
- Filters parsed; bare number treated as limit; limit capped at 500.
- Output is reverse-chronological.
- Session ids and observation counts come straight from the response.
- REST fallback URL-encodes branch, repo, and limit.
## See also
- `commit-context`: drill into one commit's session.
- `recall`: search the observations behind a linked session.
## Troubleshooting
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) if `memory_commits` is not available.
© rohitg00 · Apache-2.0 · rohitg00/agentmemory