commit-context
하는 일
이 스킬은 파일, 함수, 줄을 현재 커밋을 만든 에이전트 세션까지 거슬러 추적합니다. git과 메모리 조회가 실제로 반환한 것만 보고합니다.
사용하는 경우
- ✓코드베이스에 특정 코드가 왜 있는지 물을 때.
- ✓어떤 변경이 이루어졌을 때 에이전트가 무엇을 하고 있었는지 알고 싶을 때.
- ✓코드의 특정 위치에 대한 맥락이 필요할 때.
스킬 링크
https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/commit-context/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 리프레시 토큰 코드는 왜 여기 있나요? 이것을 작성한 세션까지 추적해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 git blame으로 지정한 줄의 커밋을 찾은 다음, 메모리 서버에서 그 커밋을 조회합니다. 연결된 세션과 핵심 관찰 내용을 보고하거나, 커밋이 세션 연결 기능 이전에 만들어졌다는 점을 알려 줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
The 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.
자주 묻는 질문
연결된 세션이 없으면 어떻게 되나요?
스킬은 그 커밋이 세션 연결 기능 이전이라고 말하며, 설명을 지어내지 않습니다.
git을 사용하나요?
네. git blame, git log, 또는 파일 기록으로 커밋을 찾습니다.
변경의 의도를 추측하나요?
아닙니다. 기록된 세션이 없으면 diff가 보여 주는 내용만 설명합니다.
상세 정보
작성자의 원본 설명
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.
repo: rohitg00/agentmemory
인기도
- GitHub 스타
- 30k
- 순위
- #9345
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agentmemory-agents
30k에이전트가 agentmemory 메모리 서버를 Claude Code, Cursor, Codex 같은 코딩 도구에 연결하도록 돕습니다.
agentmemory-architecture
30kagentmemory가 메모리를 저장하고, 검색하고, 관리하는 방식을 저장 순간부터 회상까지 설명합니다.
agentmemory-config
30k에이전트가 포트, 설정, 기능 플래그를 포함해 agentmemory 메모리 서버를 설정하고 점검하도록 돕습니다.
agentmemory-hooks
30k에이전트가 각 메모를 손으로 저장하지 않아도 코딩 세션에서 유용한 내용을 자동으로 캡처하도록 돕습니다.