Claude Skill

recall-reasoning

Recall the reasoning behind a past change from Codex session history when available, falling back to commit diff and surrounding code. Use when the user asks to "recall reasoning", "find reasoning", "look up reasoning", "recall implementation reasoning", "find the rationale", "wh

LLM Mart · 0 points · 21 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download tobihagemann-turbo-codex_skills_recall-reasoning-b903a85.zip · 1 KB
Part of tobihagemann/turbo — 147 skills

Install

skills CLI npx skills add https://github.com/tobihagemann/turbo/tree/main/codex/skills/recall-reasoning
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install tobihagemann-turbo@llmmart
Git git clone https://github.com/tobihagemann/turbo.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole tobihagemann/turbo collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Recall Reasoning

Recover the reasoning behind a change. Prefer Codex session history when it can be found; otherwise derive the explanation from git history and current code.

Inputs

Accept any of:

  • A commit SHA
  • A file path, optionally with a line number (<path>:<line>)
  • A reviewer question plus surrounding context

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

Step 1: Resolve the Commit

Resolve the target commit:

git rev-parse <sha>
git blame -L <line>,<line> -- <path>

Collect the commit subject, changed files, and relevant diff:

git show --stat --oneline <sha>
git show -- <path>

Step 2: Search Codex Session History

If Codex session files are available, search them for the commit SHA, touched file paths, branch name, and distinctive user request text:

Write the patterns to a file with apply_patch, one per line, then match them literally:

rg -F -f <pattern-file> ~/.codex/sessions

-F is required, not just safer: an unescaped $ inside request text is a regex anchor and silently drops the match.

Read only the smallest relevant transcript excerpts. Prefer sessions close to the commit time and sessions that mention both the file and the task.

If no matching session is found, continue with the fallback path.

Step 3: Synthesize

If session reasoning was found:

  • Lead with the why. The diff already shows the what.
  • Quote or paraphrase only the relevant reasoning.
  • Keep the explanation to one or two paragraphs.

If no session reasoning was found:

  • Read the commit diff and surrounding current code.
  • Infer the most likely rationale from the code, tests, plan/spec artifacts, and PR context.
  • Mark the output as fallback-derived.

Step 4: Output

When session reasoning was found:

**Commit:** <short-sha> — <subject>
**Session:** <session reference>

<one or two paragraphs of reasoning>

When no session reasoning was found:

**Commit:** <short-sha> — <subject>
**Session:** none found

<fallback explanation derived from git history and current code>

Then call update_plan to mark this step completed and continue with the next step of the active workflow.

Rules

  • Treat session excerpts as evidence, not ground truth.
  • Do not read full transcript files unless excerpts are insufficient.
  • If current code contradicts a remembered rationale, note the discrepancy.
Files (turbo)
  • SKILL.md 2.8 KB
    ---
    name: recall-reasoning
    description: "Recall the reasoning behind a past change from Codex session history when available, falling back to commit diff and surrounding code. Use when the user asks to \"recall reasoning\", \"find reasoning\", \"look up reasoning\", \"recall implementation reasoning\", \"find the rationale\", \"why did I do X\", \"recall from transcripts\", or \"find the transcript for this commit\"."
    ---
    
    # Recall Reasoning
    
    Recover the reasoning behind a change. Prefer Codex session history when it can be found; otherwise derive the explanation from git history and current code.
    
    ## Inputs
    
    Accept any of:
    
    - A commit SHA
    - A file path, optionally with a line number (`<path>:<line>`)
    - A reviewer question plus surrounding context
    
    If only a file is given, use `git blame` to resolve the commit that last touched the line.
    
    ## Step 1: Resolve the Commit
    
    Resolve the target commit:
    
    ```bash
    git rev-parse <sha>
    git blame -L <line>,<line> -- <path>
    ```
    
    Collect the commit subject, changed files, and relevant diff:
    
    ```bash
    git show --stat --oneline <sha>
    git show -- <path>
    ```
    
    ## Step 2: Search Codex Session History
    
    If Codex session files are available, search them for the commit SHA, touched file paths, branch name, and distinctive user request text:
    
    Write the patterns to a file with `apply_patch`, one per line, then match them literally:
    
    ```bash
    rg -F -f <pattern-file> ~/.codex/sessions
    ```
    
    `-F` is required, not just safer: an unescaped `$` inside request text is a regex anchor and silently drops the match.
    
    Read only the smallest relevant transcript excerpts. Prefer sessions close to the commit time and sessions that mention both the file and the task.
    
    If no matching session is found, continue with the fallback path.
    
    ## Step 3: Synthesize
    
    If session reasoning was found:
    
    - Lead with the **why**. The diff already shows the what.
    - Quote or paraphrase only the relevant reasoning.
    - Keep the explanation to one or two paragraphs.
    
    If no session reasoning was found:
    
    - Read the commit diff and surrounding current code.
    - Infer the most likely rationale from the code, tests, plan/spec artifacts, and PR context.
    - Mark the output as fallback-derived.
    
    ## Step 4: Output
    
    When session reasoning was found:
    
    ```markdown
    **Commit:** <short-sha> — <subject>
    **Session:** <session reference>
    
    <one or two paragraphs of reasoning>
    ```
    
    When no session reasoning was found:
    
    ```markdown
    **Commit:** <short-sha> — <subject>
    **Session:** none found
    
    <fallback explanation derived from git history and current code>
    ```
    
    Then call `update_plan` to mark this step completed and continue with the next step of the active workflow.
    
    ## Rules
    
    - Treat session excerpts as evidence, not ground truth.
    - Do not read full transcript files unless excerpts are insufficient.
    - If current code contradicts a remembered rationale, note the discrepancy.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related