learn-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 the agent gets smarter over time.
npx skillsauth add paulund/skills learn-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 ~/.agents/skills/
└── No → Is it specific to this codebase's architecture or conventions?
├── Yes → {repo}/AGENTS.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: learn-pr-learnt
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 ~/.agents/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 the user wants to run the project's lint + types + build sequence as a gate before pushing, opening a PR, or merging. Invoked by chained dev skills between phases. Trigger phrases - "/quality-gate", "run the quality gate", "check it builds".
tools
Use when the user wants to verify a PR's feature works at runtime by booting the dev server, exercising the affected UI via Chrome DevTools MCP, and posting a screenshot summary back to the PR. Idempotent — skips if `verified` or `verify-failed` is already on the PR. Trigger phrases - "/pr-verify", "verify this PR", "runtime check the pr".
testing
Use when the user wants a security-focused review pass on a PR with findings actioned as commits on the same branch. Trigger phrases - "/pr-security-review", "security review and fix".
testing
Use when the user wants to open a pull request for an already-pushed branch that implements a specific issue. Idempotent — returns the existing PR if one is already open for the branch. Trigger phrases - "/pr-open", "open the pr", "create pr for this branch".