원클릭으로
review-memory
Distill PR review comments into reusable lessons and save them to Claude Code memory for automatic recall in future sessions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Distill PR review comments into reusable lessons and save them to Claude Code memory for automatic recall in future sessions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | review-memory |
| description | Distill PR review comments into reusable lessons and save them to Claude Code memory for automatic recall in future sessions. |
| license | MIT |
| allowed-tools | Bash, Read, Write, AskUserQuestion |
Note: This skill is designed for Claude Code. The memory written here is surfaced automatically by the Claude Code harness as context in future sessions. Other agents will not benefit from the memory step.
You are an expert at distilling PR review feedback into generalized lessons that prevent repeat mistakes.
Determine which PR to process:
/review-memory <PR number or URL> — use that PR directly/review-memory (no args) — detect the PR for the current branch:
git branch --show-current
gh pr list --head <branch> --json number,url,state
If no PR is found, use AskUserQuestion to ask which PR to process.Resolve {owner}/{repo} from the PR URL, or fall back to:
gh repo view --json nameWithOwner --jq .nameWithOwner
Run these in parallel:
# Inline review comments (carry body / path / line / diff_hunk)
gh api repos/{owner}/{repo}/pulls/{n}/comments --paginate
# Review-level summaries (body + state: APPROVED / CHANGES_REQUESTED / COMMENTED)
gh pr view {n} --json reviews --repo {owner}/{repo}
Also resolve your own login for filtering:
gh api user --jq .login
Keep only comments that meet all of these criteria:
user.login ≠ your own login (exclude your replies)state == "APPROVED" with empty body)body is non-empty and not just "LGTM", "Looks good", ":+1:", "👍", or similarDiscard the rest silently.
If no comments pass the filter, report that and stop.
For each filtered comment, produce a draft lesson. Apply these rules:
Keep (generalizable patterns):
Discard (one-off nits):
Each lesson draft must include:
description (used by the harness to decide relevance at recall time — make it specific enough to trigger on related work, not so broad it fires on everything)**Why:** — what the reviewer's concern was (quote or paraphrase the original comment with PR #{n}, {path})**How to apply:** — concrete action to take in future codePresent the draft lessons via AskUserQuestion with multiSelect: true:
If the user selects nothing, stop cleanly.
For each selected lesson, write a memory file following the Claude Code memory protocol.
Determine the memory directory from the <system-reminder> context (the harness injects the path at session start — look for the Memory section describing ~/.claude/projects/<encoded>/memory/).
Check for duplicates first: read MEMORY.md in the memory directory. If an existing entry covers the same lesson, update that file rather than creating a new one.
For each new lesson, create <slug>.md:
---
name: <slug>
description: <one-line summary — used to decide relevance during recall>
metadata:
type: feedback
---
<lesson body>
**Why:** <reviewer's concern; cite PR #n and file path>
**How to apply:** <concrete action for future code>
Then append one line to MEMORY.md:
- [<Title>](<slug>.md) — <description>
AskUserQuestion.