/sessions:why a file path, path:line, commit-ish, or topicfrom sessions
Reveals the rationale behind code by linking files, lines, and commits to the AI sessions that produced them. Use before rewriting or removing code whose purpose is unclear.
Ships in sessions. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Explain why code exists by finding the session that produced it.
Call why_did_this_change with the user's target as target:
src/cache.tssrc/cache.ts:142 (pins the commit via git blame)HEAD~2The tool is read-only: it never writes to the repository.
Read the evidence. The result carries the resolved commit (subject, author
time, files, trailers; null for the free-text form) and ranked sessions. Trust
confidence: files+time (the session edited the committed files inside its window)
is stronger than time-only (same repo and window, no file overlap). Two flags change
how you read the commit: commit.merge: true means this is the merge that landed the
change, not the commit that wrote it — the reasoning lives in the sessions, not the
merge subject. A non-empty unlandedAttempts (file form only) means sessions touched
this file but no commit ever landed from them — a possible abandoned attempt.
Synthesize a short answer from each session's excerpts and headline. Explain
the reasoning and any abandoned approaches — the part git does not record. Do not
invent rationale the excerpts do not support.
Cite each session you used: its tool, date (startedAt), and headline. Distinguish
files+time matches from time-only matches so the user can weigh them.
Check closed PRs before concluding "fixed". When the question is "was this
fixed" or "does this bug still exist", git history alone is not proof: a fix may
have been tried and rejected without leaving a commit. If the repo has a GitHub
remote and gh is available, run gh search prs --state closed -- <terms> (or
gh pr list --search "<file>" --state closed) and report a closed-unmerged attempt
alongside any merged fix. Skip silently when gh or a GitHub remote is absent.
Offer a deep-dive. If the user wants more, call get_session_messages with a
session's filePath (use an excerpts[].msgIndex as the offset) to read the full
exchange.
sessions is a real answer: say no session correlates, rather than guessing.time-only match is a weak signal — present it as "around the same time", not as cause.trailers (e.g. Co-Authored-By) when present; they annotate authorship.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-annotation, code-history, session-search, code-rationale, git-blame
8 skills in this plugin
/contextLoad a context primer for the current repo before starting work. Use when the user says "what was I doing here", "catch me up on this repo", "context primer", "what's the open thread", "where did I/we leave off" — and PROACTIVELY when a session opens on work that clearly continues something ("keep going on the refactor", "finish the migration") or when resuming a codebase after a break. Past sessions carry the open thread, prior decisions, and abandoned approaches that code and git history don't show./memoryTriage context-memory candidates mined from past AI coding sessions. Use when the user says "triage memory", "review memory", "mine memory", "/memory", or asks what durable facts their session history contains. Runs the mine, clusters paraphrased candidates, judges which facts generalize beyond the session they came from, and walks approve / reject / snooze, including marking standing constraints always-on and assigning project groups./recallRecall what was done on a specific project or topic from past AI coding sessions. Use when the user says "what did I do on [project]", "recall [topic]", "history of [project]", "when did I last work on [thing]" — but also when they reference prior work without asking for history explicitly: "didn't we already fix this", "what was that approach we tried", "why did we do it this way", "what happened to [file/feature]". Use PROACTIVELY before re-deriving a decision or re-solving a problem a past session likely settled — past conversations hold rationale and dead ends that never made it into git./session-metricsShow usage metrics and analytics for AI coding sessions. Use when the user asks "how much have I been coding", "session stats", "show me metrics", "tool usage", "which tool do I use most", "active hours", or wants analytics about their AI coding tool usage./session-reflectReflect on how you work with AI coding agents using sessions history. Use when the user says "reflect on my workflow", "why do I keep correcting the agent", or asks about prompting habits, supervision, workflow friction, or what makes delegation succeed. Produces sourced observations and experiments, not an activity recap or automatic memory updates./standupGenerate a quick standup summary of yesterday and today's AI coding sessions. Use when the user says "standup", "what did I do yesterday", "daily summary", "what have I been working on", or needs a quick recap for a standup meeting.npx claudepluginhub nicknisi/sessions --plugin sessionsOther plugins' skills for the same job