ai-pr-learnt/SKILL.md
Use at the end of a sprint or week to extract lessons from PR review comments. Scans pull request reviews and inline comments from the last 7 days across all your repos, picks out corrections, decisions, and validated patterns, and saves them to the right place so Claude gets smarter over time.
npx skillsauth add paulund/skills ai-pr-learntInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scan PR review comments from the last 7 days across all your repositories and extract non-obvious lessons worth keeping. The goal is to make future sessions smarter, not to record every comment.
Look for:
Ignore:
gh search prs --involves @me --updated ">$(date -v-7d +%Y-%m-%d 2>/dev/null || date -d '7 days ago' +%Y-%m-%d)" --json number,repository,title,url --limit 50
# Inline code review comments
gh api repos/{owner}/{repo}/pulls/{number}/comments --jq '[.[] | {body, path, user: .user.login}]'
# Review-level summaries (state: APPROVED, CHANGES_REQUESTED, COMMENTED)
gh api repos/{owner}/{repo}/pulls/{number}/reviews --jq '[.[] | {state, body, user: .user.login}]'
# General PR discussion
gh api repos/{owner}/{repo}/issues/{number}/comments --jq '[.[] | {body, user: .user.login}]'
Focus first on any review with state: "CHANGES_REQUESTED" — those are corrections.
Read the project MEMORY.md before saving anything. Skip lessons already captured.
Is this a universal rule for a language, framework, or tool?
├── Yes → the relevant global skill file in ~/.claude/skills/
└── No → Is it specific to this codebase's architecture or conventions?
├── Yes → {repo}/CLAUDE.md
└── No → Is it about the user, or project context?
├── Working preference / correction → auto-memory (type: feedback)
├── Project fact / decision → auto-memory (type: project)
└── Personal context about the user → auto-memory (type: user)
The project memory directory is shown in your system prompt context — look for the path ending in /memory/. This is project-specific and changes per repo.
File naming: feedback_<slug>.md, project_<slug>.md, user_<slug>.md
Frontmatter:
---
name: Short title
description: One-line hook used to decide relevance in future sessions — be specific
type: feedback | project | user
---
Body for feedback: Lead with the rule. Then Why: (the reason given). Then How to apply: (when this kicks in).
Body for project: Lead with the fact or decision. Then Why: (the motivation). Then How to apply: (how this should shape suggestions).
After writing each memory file, add a one-line pointer to MEMORY.md under the right section heading. Check MEMORY.md first — update an existing entry rather than duplicating.
Append to the relevant file at ~/.claude/skills/. Keep additions concise — one rule, one short explanation.
Add to the most relevant section, or create a new one.
After saving:
Keep it to a few bullet points. No waffle.
development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.