跳到正文
Skillpedia
通用编程30k · #9346

commit-history

它能做什么

这项技能列出智能体会话产生的提交,可以按分支或代码仓库筛选。每个提交都会显示它来自哪个会话。

适用场景

  • ✓当你想查看智能体最近提交的内容时。
  • ✓当你想列出某个分支或代码仓库中关联的提交时。
  • ✓当你希望每个提交都显示其会话详情时。

技能链接

https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/commit-history/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/commit-history/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  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 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能