commit-context

Trace files, functions, or lines to the agent session that produced their commit.

3|Updated Oct 25, 2025
One-click install
npx skills add https://github.com/Prismaibrowser/prismspace-web --skill commit-context-prismaibrowser
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: commit-context
Source: https://github.com/Prismaibrowser/prismspace-web/tree/main/.agents/skills/commit-context
Command: npx skills add https://github.com/Prismaibrowser/prismspace-web --skill commit-context-prismaibrowser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When reviewing code, you often wonder why a particular line, function, or file exists and what the agent was doing when it wrote it. This Skill connects any code location back to its originating commit and the linked agent session, so you get real recorded context instead of guessing intent from the diff alone. ## Core Features & Use Cases - Line-range tracing: Uses git blame to find the commit SHA for a specific line range, then looks up the linked agent session. - Function and file lookup: Uses git log -L for functions and git log for bare paths to locate the most recent relevant commit. - Session context retrieval: Returns commit details (sha, branch, author, message) plus linked session summaries and high-importance observations via memory_commit_lookup and memory_recall. - Use Case: You point at a retry loop in refresh.ts and ask why it exists. The Skill blames lines 40-52, looks up the commit, and reports it came from the "Auth refresh rework" session where the agent handled tokens revoked mid-flight. ## Quick Start Ask why a specific line, function, or file exists in the codebase and the Skill will trace it back to its commit and linked agent session.

Frequently Asked Questions about commit-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find which commit introduced a specific line of code?▼

Use git blame with a line range, such as git blame -L 40,52 src/auth/refresh.ts, to get the commit SHA. The Skill then passes that SHA to memory_commit_lookup to retrieve the commit details and any linked agent session.

How to trace a function back to the agent session that wrote it?▼

Run git log -L :functionName:path/to/file -n 1 to find the most recent commit touching that function, then look up the full SHA with memory_commit_lookup. The response includes the linked session id, project, observation count, and summary.

What happens when a commit has no linked agent session?▼

When memory_commit_lookup returns commit: null, the commit predates session linking. The Skill reports that no recorded session exists and only describes what git show reveals, without inventing agent intent from the diff.

Can I get context for an entire file instead of a single line?▼

Yes, run git log -n 1 -- path/to/file to get the most recent commit for the file, then look up that SHA. The Skill presents the commit and linked session in the same format as a line-range lookup.

Why does the commit lookup tool not return any results?▼

The lookup requires the full 40-character SHA, not a short hash, and the memory_commit_lookup tool must be available in your environment. If the tool is missing, consult the shared troubleshooting guide referenced in the Skill.