본문으로 건너뛰기
Skillpedia
일반 코딩30k · #9345

commit-context

하는 일

이 스킬은 파일, 함수, 줄을 현재 커밋을 만든 에이전트 세션까지 거슬러 추적합니다. git과 메모리 조회가 실제로 반환한 것만 보고합니다.

사용하는 경우

  • ✓코드베이스에 특정 코드가 왜 있는지 물을 때.
  • ✓어떤 변경이 이루어졌을 때 에이전트가 무엇을 하고 있었는지 알고 싶을 때.
  • ✓코드의 특정 위치에 대한 맥락이 필요할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/commit-context/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  1. 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.
  2. Look it up: memory_commit_lookup { "sha": "<full-sha>" }.
  3. 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_recall when 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: null reported 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬