Community生产力与协作github.com

rohitg00/commit-context

追踪文件、函数或代码行到产生当前提交的代理会话。当用户问“为什么这段代码在这里”、“更改这段代码时代理在做什么”、“谁写了这段代码”或想要了解代码库中特定位置的上下文时使用。

commit-context 是什么?

rohitg00/commit-context 是一个用于 AI 代理(如 Claude Code、Cursor、Codex 等)的技能,它允许用户从代码库中的特定文件、函数或代码行反向追溯到生成当前提交的代理会话。该技能解决了开发者常见的问题:“为什么这段代码在这里?”、“更改时代理在做什么?”或“谁写了这段代码?”。它通过分析 Git 历史记录来找出与指定代码位置相关的提交,并可能提供会话日志或上下文摘要。该技能支持任何使用 Git 的代码库,并且可以与多种 AI 代理工具集成。其工作原理是利用 Git blame 或日志命令定位提交,然后映射到代理记录的会话中,从而提供详细的上下文解释。这有助于开发者快速理解代码变更背后的原因和意图。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/rohitg00/agentmemory/tree/main/skills/commit-context

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

commit-context 是做什么的?

追踪文件、函数或代码行到产生当前提交的代理会话。当用户问“为什么这段代码在这里”、“更改这段代码时代理在做什么”、“谁写了这段代码”或想要了解代码库中特定位置的上下文时使用。

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

rohitg00/commit-history

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.

rohitg00/forget

Delete specific observations or sessions from agentmemory. Use when user says "forget this", "delete memory", or wants to remove specific data for privacy.

rohitg00/handoff

Resume the most recent agent session for the current working directory, leading with any unanswered question. Use when the user says "where were we", "resume", "handoff", "pick up where I left off", or starts a session with no fresh context.

rohitg00/recall

Search agentmemory for past observations, sessions, and learnings about a topic using hybrid BM25 plus vector plus graph search. Use when the user says "recall", "what did we do about", "did we ever", "have we seen", or needs context from past sessions.

rohitg00/recap

Summarize the last N agent sessions for the current project, grouped by date, with highlight observations per session. Use when the user asks "recap", "what have we been doing", "today", "this week", or wants a rollup of recent work.

rohitg00/remember

Save an insight, decision, or learning to agentmemory's long-term storage with searchable concept tags. Use when the user says "remember this", "save this", "note that", "don't forget", or wants to preserve knowledge for future sessions.

rohitg00/session-history

Show what happened in recent past sessions on this project as a clean timeline. Use when the user asks "what did we do last time", "session history", "past sessions", or wants an overview of previous work.

相关技能