commit-history
它能做什么
这项技能列出智能体会话产生的提交,可以按分支或代码仓库筛选。每个提交都会显示它来自哪个会话。
适用场景
- ✓当你想查看智能体最近提交的内容时。
- ✓当你想列出某个分支或代码仓库中关联的提交时。
- ✓当你希望每个提交都显示其会话详情时。
技能链接
https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/commit-history/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请显示智能体在 main 分支上最近的 20 次提交,以及它们所属的会话。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用你指定的分支和数量调用提交列表工具,然后按从新到旧的顺序显示结果。每条记录包括短 SHA、提交信息、关联的会话以及观察数量。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
The user wants a list of agent-linked commits. Filter args: $ARGUMENTS
Quick start
memory_commits { "branch": "main", "limit": 20 }
Expected output:
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
- Parse
$ARGUMENTSforbranch=<name>,repo=<url-or-fragment>,limit=<n>. A bare numeric token is the limit. Defaults: no branch, no repo, limit 100, max 500. - Call
memory_commitswith the parsed filters. - 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
filesis present. - 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 if memory_commits is not available.
常见问题
如果列表是空的怎么办?
这意味着筛选条件没有匹配到任何内容。可以尝试去掉分支或代码仓库的筛选。
最多能显示多少个提交?
默认为 100 个,最多为 500 个。
它会显示更改过的文件吗?
会。当提交有文件信息时,会显示更改过的文件。
详情
作者的原始描述
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.
repo: rohitg00/agentmemory
热度
- GitHub 星标
- 30k
- 排名
- #9346
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agentmemory-agents
30k帮你的智能体把 agentmemory 记忆服务器连接到 Claude Code、Cursor 和 Codex 等编程工具。
agentmemory-architecture
30k解释 agentmemory 如何为编程智能体存储、搜索和管理记忆,从记录到回忆的整个过程。
agentmemory-config
30k帮你的智能体设置并检查 agentmemory 记忆服务器,包括端口、配置和功能开关。
agentmemory-hooks
30k帮你的智能体自动从编程会话中记录有用的笔记,而不需要你逐条手动保存。