본문으로 건너뛰기
cccskills
무료GitHub에 공개

recall-rationale

Recall why a past change was made by locating the Claude Code transcript that produced it. Use when the user asks to "recall the rationale", "find the rationale", "look up the rationale", "why did I do X", "why did we do X", "why was this changed", or "find the transcript for this commit".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md5.2 KB
  • scripts/find_transcript.py19.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Recall Rationale

Locate the Claude Code transcript that produced a given change and recover why it was made. Useful for answering reviewer questions, writing post-hoc explanations, or recovering forgotten context.

Inputs

Accept any of:

  • A commit SHA
  • A file path, optionally with a line number (<path>:<line>)
  • A reviewer question plus surrounding context (file and line)
  • A passage with no commit behind it, because the project is not a git repository or the change is uncommitted

If only a file is given, git blame resolves the commit that last touched the line.

Step 1: Resolve the Commit and Run the Script

Call scripts/find_transcript.py with either --commit <sha> or --file <path>[:<line>]. Pass --cwd /path/to/repo when searching a different repo than the current working directory.

python3 <skill-dir>/scripts/find_transcript.py --file <path>:<line>
python3 <skill-dir>/scripts/find_transcript.py --commit <sha>

When there is no commit to resolve, because the project is not a git repository or --file returns no-commit for an uncommitted line, run --phrase with a distinctive stretch of the passage's current text, taken from a single line, instead. It skips git, ranks the project's transcripts by how often they handle the phrase, and returns the same JSON with commit: null.

python3 <skill-dir>/scripts/find_transcript.py --phrase "<distinctive text from the passage>"

With --commit or --file, the script:

  1. Resolves the commit via git rev-parse or git blame
  2. Enumerates directories under the effective Claude configuration home's projects/ tree and filters their transcripts by authoritative cwd records, covering path encoding, truncation, collisions, and subdirectory launches
  3. Ranks candidate transcripts whose mtime is within --window-days of the commit (default 14)
  4. Scores candidates by mentions of touched files and tool-use edits on them
  5. Extracts cleaned user prompts and substantive assistant text from the top candidates

The JSON output has status, commit, project_dir (the top candidate's directory when matched), project_dirs (directories with matching cwd records, limited to the time window when there is a commit), and candidates with session_id, score, match_reasons, and excerpts.

Status values:

  • ok — candidates returned
  • no-commit — couldn't resolve a commit
  • no-transcripts — the effective Claude configuration home has no project transcript directories
  • no-match — transcripts exist but none match the touched files in the window, or none mention the phrase

Step 2: Read and Synthesize

If status is ok:

  1. Start with the top candidate (highest score). Read its excerpts first.
  2. If the excerpts already explain the change, stop. If they are thin or ambiguous, read the full transcript at jsonl_path directly for more context.
  3. Ignore candidates with low scores or scores far below the top — they are false positives.
  4. When the rationale spans multiple excerpts, quote the most specific one.
  5. In phrase mode, the last match at reason marks the last time the session handled the passage. When the question is about the passage's current state, read the transcript around that point.

Synthesize a concise summary tied to the question being answered:

  • Lead with the why. The diff already shows the what.
  • Quote the implementer's own words when they already say it well.
  • Keep it to one or two paragraphs. Don't narrate the whole session.

If status is anything other than ok, report that no rationale was found and fall back to reading the commit diff, when there is one, and the surrounding code. Say so explicitly so it's clear whether the answer still holds up.

Step 3: Output

Return the rationale in this shape:

**Commit:** <short-sha> — <subject>
**Transcript:** <session-id> (score <N>)

<one or two paragraphs of rationale, quoting the implementer where useful>

If no transcript was found:

**Commit:** <short-sha> — <subject>
**Transcript:** none found (<status>)

<fallback explanation derived from reading the commit and current code>

In either shape, without a commit, write the first line as **Commit:** none (not a git repository) or **Commit:** none (uncommitted).

Then use the TaskList tool and proceed to any remaining task.

Rules

  • Treat excerpts as evidence, not ground truth. The implementer's intent at the time may have changed. If the current code contradicts an excerpt, note the discrepancy.
  • Only read the full .jsonl if the excerpts are insufficient. These files are large.
  • Never quote noise prefixes like <command-message> or skill-loading stubs. The script filters these out, but stay alert if reading a transcript directly.
  • If multiple candidates have similar high scores, name both and prefer the one whose time window contains the commit, or, without a commit, the one whose tool calls carry the phrase.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Apply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to "apply findings", "apply fixes", "apply suggestions", "apply accepted findings", "fix the findings", or "apply the review results".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tobihagemann/turbo4152026년 10월 22일 업데이트

Audit the turbo skill lessons that /self-improve writes into this repo's .turbo/handoff/ from other projects, apply the ones the user approves, delete the consumed handoffs, commit and push, and update the installed Turbo skills. Use when the user asks to "read .turbo/handoff and let me know what you think", "read the handoff files and let me know what you think", "review the lesson handoffs", "apply the self-improve handoffs", or "process the turbo handoffs".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tobihagemann/turbo4152026년 10월 22일 업데이트

Assess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, architecture rot, and low-value tests. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to "assess technical debt", "find technical debt", "review technical debt", "what should we refactor", "find refactoring candidates", "where is the code rot", "what's our worst code", "find low-value tests", or "which tests can we delete". Analysis-only — does not modify code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tobihagemann/turbo4152026년 10월 22일 업데이트

Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tobihagemann/turbo4152026년 10월 22일 업데이트

Shared changelog conventions and formatting rules referenced by $create-changelog and $update-changelog. Not typically invoked directly.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tobihagemann/turbo4152026년 10월 22일 업데이트

Run a non-interactive Claude Code print-mode call from Codex. Use when the user asks to "claude print", "ask claude", "run claude", "consult claude", or when a Codex Turbo skill needs Claude as an independent peer reviewer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tobihagemann/turbo4152026년 10월 22일 업데이트

tobihagemann의 스킬 모두 보기

이 스킬의 문제 신고