/lfx-skills:lfx-pr-resolvefrom lfx-skills
Resolves PR review comments by fetching unresolved threads, making code changes, responding to each comment, committing with a summary, dismissing stale reviews, and re-requesting review. Offers opt-in monitoring rounds.
Ships in lfx-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before working any thread, check whether the PR's repo owns its PR iteration
elsewhere. Run this check after Step 1 has identified the PR's repository
— the PR may live in a different repo from the current checkout — and read only
that repository's root CLAUDE.md. If it carries both a
## Review lifecycle configuration section and a ## Pre-PR review section,
two lifecycles are declared: say so and stop — a broken migration, routed to
neither owner. If it carries exactly one
## Review lifecycle configuration section and no ## Pre-PR review
section, the repo has adopted
/lfx-skills:lfx-local-review as the sole owner of its review lifecycle: hand
the work to that skill and stop; that skill validates the declaration and fails
closed itself. It also verifies the checkout it runs in against its origin,
so if the current checkout is not that repository, do not hand off from here —
tell the user to open a checkout of the PR's repository and run it there. If
there is no such section, the repo is not an adopter and this skill is the
right one — unless its ## Pre-PR review section carries a PR driver:
value: that repo skill owns its PR iteration, so hand the work to it and stop.
The driver is a repo-local skill, so the same checkout rule applies as above:
if the current checkout is not that repository, do not hand off from here —
tell the user to open a checkout of the PR's repository and run it there.
If there is more than one such section, say so and stop
— that is a broken adoption, not an absent one, and running this skill instead
would answer a configuration error with a different workflow.
You address PR review feedback end-to-end: read the comments, make the code changes, commit, respond to each reviewer, resolve the threads, and post a summary. The goal is to close the feedback loop completely, reviewers should see exactly what was done and why.
Determine which PR to work on. The user may provide:
#142)https://github.com/org/repo/pull/142)Before making any gh calls, verify authentication:
gh auth status 2>&1
If auth fails, stop and tell the user to run gh auth login.
Once the PR's org/repo and base branch are known, run the adoption check
from the top of this skill against that repository's root CLAUDE.md. If
it is not the current checkout, read the file from the identified repository
at the PR's base branch, as raw text rather than the JSON envelope:
gh api "repos/<org>/<repo>/contents/CLAUDE.md?ref=<base-branch>" \
-H "Accept: application/vnd.github.raw"
Do not read CLAUDE.md from wherever this session happens to be running.
# Get current branch
BRANCH=$(git branch --show-current)
# Find PR for this branch
gh pr list --head "$BRANCH" --state open --json number,url,title --jq '.[0]'
If no PR is found for the current branch, ask:
"I don't see an open PR for this branch. Which PR would you like to address? (Give me a number or URL)"
Extract the owner, repo, and PR number from the identified PR. If the user provided a URL, parse it. If auto-detected, derive from the current repo:
# From the current repo's remote
OWNER=$(gh repo view --json owner -q '.owner.login')
REPO=$(gh repo view --json name -q '.name')
# NUMBER comes from Step 1 (user input or auto-detection)
Read complete unresolved conversations before deciding which feedback needs action.
references/graphql-queries.md, "Scan PR
review threads" and "Fetch general PR feedback". This scan enumerates sources;
thread metadata alone cannot reveal new replies or edited comments.Before processing threads, identify which reviewers are AI bots. Common bot indicators:
[bot] (e.g., copilot[bot], coderabbitai[bot], github-actions[bot])copilot, coderabbitai, codeclimate, sonarcloud, deepsource,
sourcery-ai, ellipsis-dev, korbit-ai, bito-ai, pr-agentBot rather than UserMaintain a list of bot reviewer logins for this PR. These reviewers must never be @mentioned in any content posted
to GitHub (comments, commit messages, summary). Tagging bots causes them to re-trigger and attempt to act on
already-resolved feedback.
Bot comments are still actionable, address their feedback like any other reviewer. The restriction is only on
@mentioning them in GitHub-posted content.
From the response, collect only unresolved threads (isResolved == false). Skip threads that are already resolved,
someone else handled them or they were resolved in a previous iteration.
For each unresolved thread, extract:
| Field | Source |
|---|---|
| Thread ID | id (needed for resolving later) |
| File path | path |
| Line(s) | line, startLine |
| Reviewer | Author of the comment being assessed; retain the first comment's author as thread-opener context |
| Comment body | All comments in the thread (the conversation) |
| Outdated? | isOutdated (file has changed since the comment was made) |
Track enough source state to avoid duplicate handling while keeping the workflow readable.
Initialize the assessed-feedback record in this step, before deciding whether there is anything to address. Treat each distinct actionable claim, requested change, or question as a separate feedback item, even when several appear in the same thread or general comment.
For each review thread, general review body, or PR conversation comment, retain
enough state to recognize it later: source identity, author, bot
classification, current body or last-updated signal, latest disposition, and
any response permalink. For hydrated thread conversations, keep enough comment
detail to detect new replies or edited feedback. Classify authors using the API
type (__typename in GraphQL, user.type in REST) together with the bot
indicators above so attribution and reply rules stay correct.
Count a source as handled only when all of its actionable items have been specifically addressed and any claimed code fix is confirmed published on the PR. Acknowledgments, status updates, or a reply that covers only some items do not count as full handling. If the evidence is unclear, keep the item unaddressed.
On reruns, use this record plus existing workflow replies and summaries to avoid duplicate work. Do not reprocess unchanged items already answered, rejected with user approval, deferred, or awaiting input. New replies or edited feedback reopen assessment. Record this workflow's own replies and summaries so they are not mistaken for new reviewer feedback.
@; use plain bot names to avoid re-triggering them.Validate only the feedback items that are still eligible and unaddressed.
Before categorizing or acting on any comment, validate whether the reviewer's feedback is actually correct. Reviewers can make mistakes; blindly implementing every comment can introduce regressions.
For each eligible unaddressed item from an unresolved thread, general review
body, or PR conversation comment, follow the four-step validation flow in
references/validation-heuristics.md.
Attribute each item to the author of the specific comment or source being
assessed, not automatically to the thread opener. Use that author's bot
classification when drafting replies and summaries; a later bot reply must not
be @mentioned.
If a claim has no file or line, map it to current code/docs when possible; otherwise keep it as a discussion item instead of inventing a defect.
grep.Lean toward implementing when in doubt, but always surface your assessment to the user.
Plan by feedback item, not by thread; use source permalinks and include code locations only when available.
After validation, categorize each feedback item from an unresolved thread, general review body, or PR conversation comment. Keep a stable item number, reviewer, source permalink, and optional code location. Attribute each item to the actual comment author being assessed so bot-mention rules remain correct. A general source may contain several actionable items; track each separately without duplicating findings already represented by a thread.
| Category | Description | Action |
|---|---|---|
| Code change | Reviewer requests a specific modification and the suggestion is valid | Make the change |
| Question | Reviewer asks "why did you...?" or "what about...?" | Respond with explanation |
| Nitpick / style | Minor formatting, naming suggestion, or preference | Make the change (quick wins build goodwill) |
| Approval with comment | "Looks good, but consider..." or "Nit: ..." with no blocking intent | Assess, fix if trivial, explain if not |
| False positive | Reviewer's suggestion conflicts with repo patterns or is based on a misread | Flag for user, recommend a polite response explaining why |
| Discussion | Architectural debate, trade-off, or open-ended feedback | Flag for user decision |
Before making changes, present the categorized item plan to the user with validation notes and source permalinks.
═══════════════════════════════════════════
PR #[number], REVIEW COMMENTS TO ADDRESS
═══════════════════════════════════════════
[N] actionable feedback items from [reviewers]: [T] unresolved threads and
[G] general review/PR comment items
CODE CHANGES NEEDED
───────────────────
1. ✓ [reviewer] — [source permalink] ([optional file:line]), "[summary of what they want]"
Validated: [brief reason, e.g., "matches pattern in other components"]
2. ✓ [reviewer] — [source permalink] ([optional file:line]), "[summary of what they want]"
Validated: [brief reason]
QUESTIONS TO ANSWER
───────────────────
3. [reviewer] — [source permalink] ([optional file:line]), "[the question]"
LIKELY FALSE POSITIVES
──────────────────────
4. ⚠ [reviewer] — [source permalink] ([optional file:line]), "[what they suggested]"
Assessment: [why this appears incorrect, e.g., "Reviewer suggests
BehaviorSubject but this repo uses signals for component-local state.
Found 12 components using signal() vs 3 legacy BehaviorSubjects."]
Recommendation: Respond explaining the repo convention. No code change.
NEEDS YOUR INPUT
────────────────
5. [reviewer] — [source permalink] ([optional file:line]), "[the discussion point]"
→ What would you like me to do here?
═══════════════════════════════════════════
Shall I proceed with items 1-2? Items 4-5 need your direction.
═══════════════════════════════════════════
Wait for user approval before making changes. The user has final say on whether to implement, push back, or discuss further, especially for items flagged as potential false positives.
When the user confirms a comment is a false positive, draft a respectful response (acknowledge intent, explain the repo
convention with evidence, offer to discuss). See references/validation-heuristics.md,
"Responding to a confirmed false positive" for the response template and tone.
Work through the approved comments systematically.
Only address these after the user provides direction in Step 4.
For complex changes that span multiple files or require repo-specific pattern
knowledge (e.g., "refactor this to use signals instead of BehaviorSubject"),
route to the owning repo's local workflow. Use /lfx-skills:lfx when the
owner is unclear, then use that repo's CLAUDE.md and local skills.
Skill(skill: "<repo-local-skill>", args: "FIX PR REVIEW: [description of the change needed]. File: [path]. Context: reviewer asked for [what they said]. Follow the existing pattern in [example file].")
Skill(skill: "<repo-local-skill>", args: "FIX PR REVIEW: [description of the change needed]. Repo: [path]. Context: reviewer asked for [what they said].")
For simple, targeted fixes (rename a variable, add a null check, fix an import), make the change directly, no need to delegate.
Skip this step for a response-only round.
If this round includes approved code changes, run validation before replying. Use the repo's normal quick validation path for an iteration, for example:
# Quick validation, format, lint, build yarn format && yarn lint && yarn build # Or for Go repos: go vet ./... && go build ./...If validation fails, fix the issues before proceeding. Do not commit broken code.
Skip this step for a response-only round. Do not create an empty commit.
When code changes were approved and validation passed, create one commit that summarizes the approved changes for this review iteration.
The commit message must clearly state what review feedback was addressed, so that both git history readers and PR reviewers
can understand what happened. Do NOT include real reviewer GitHub handles in the commit message body — the LFX
plugin-wide PII rule at skills/lfx/SKILL.md (hard rule 4 in skills/lfx/references/data-privacy.md) treats GitHub handles
as linked pseudonyms and prohibits them in commit messages except in the DCO Signed-off-by: trailer and consenting
Co-authored-by: trailers. A reviewer is neither the DCO signer nor a coauthor, so their handle does not qualify. Bot
reviewer names (e.g. copilot[bot], coderabbitai[bot]) are tool identifiers, not linked pseudonyms, and may appear in
commit bodies. Human reviewer identity is captured by the linked PR — readers can consult the PR thread history for who
requested what:
fix(review): address PR #[number] review feedback
Address review comments from the reviewers on PR #[number]:
- [file]: [what was changed and why]
- [file]: [what was changed and why] (per botname[bot])
- [file]: responded to question about [topic]
Resolves [N] review threads.
Note: The --signoff flag automatically appends the Signed-off-by: trailer, do not include it manually in the message
body.
copilot[bot]) are tool identifiers
and may appear — but never with an @ prefix, since tagging bots causes them to re-trigger. Human reviewer identity belongs
in the PR thread reply and the PR summary comment (Steps 9 and 11), which are not persistent commit-message content and
are not in the scope of hard rule 4.--signoff and -S, --signoff is required for DCO compliance, -S for GPG-signed commits. Both are enforced
on LFX repos.git add [specific files that were changed]
git commit -S --signoff -m "$(cat <<'EOF'
fix(review): address PR #[number] review feedback
Address review comments from the reviewers on PR #[number]:
- path/to/file.ts: renamed variable per reviewer suggestion
- path/to/component.html: added loading guard for stats display (per copilot[bot])
- path/to/service.ts: explained error handling approach (no code change)
Resolves 3 review threads.
EOF
)"
Skip this step for a response-only round.
When code changes were made, push the fixing commit before posting replies, resolving threads, or posting the summary so reviewers can inspect the published changes being claimed.
git push
If the push fails because the branch moved, rebase, re-run quick validation, and push again.
git pull --rebase origin $(git branch --show-current)
# Re-run quick validation after rebase
yarn lint && yarn build
git push
Reply after any fixing commit is published, or immediately in a response-only round.
Respond on GitHub to each addressed feedback source so reviewers can see what was answered and whether code changed.
Use the thread reply mutation for inline review threads and PR-level comments for general feedback.
addPullRequestReviewThreadReply from
references/graphql-queries.md, "Reply to a
review thread", bound to $THREAD_ID and $RESPONSE_BODY.Do not mark a source handled until all of its actionable items are addressed. General review bodies and PR conversation comments have no thread ID, so Step 10's resolution mutation does not apply.
Use the same content either in a thread reply or a PR-level reply, depending on the source type.
For code changes made:
Done, [specific description of the change made]. See commit [short SHA]: [one-line summary of what changed in this file].For questions answered (no code change):
[Clear, specific answer to the question with code references where helpful]. No code change needed, [brief explanation of why the current approach is correct].For nitpicks fixed:
Fixed, [what was changed]. Good catch!For discussion items where user provided direction:
[Explanation of the decision and reasoning]. [Description of what was changed, or why no change was made].For false positives (user confirmed no change needed):
Thanks for flagging this, I can see why it looks [wrong/inconsistent/off]. [Explanation with evidence: "This repo uses [pattern X] for [reason]. You can see the same approach in [file1], [file2], etc."] [If applicable: "Happy to discuss further if you think we should reconsider."]Response rules: be specific, reference the published fixing commit when a fix was made, omit commit references for response-only outcomes, keep replies concise, and never
@mentionbot reviewers.
Resolve only actual review threads, and only when their feedback is fully handled.
After replying, resolve an inline review thread with the resolveReviewThread
mutation in references/graphql-queries.md,
"Resolve a review thread", bound to $THREAD_ID. General review bodies and PR
conversation comments cannot be resolved this way because they have no thread.
Leave a thread open if it still needs discussion, was deferred or skipped by the user, could not be completed, or you are unsure whether the reviewer will consider it addressed.
Post one PR summary for the iteration, including response-only rounds.
After replying to addressed feedback and resolving any eligible review threads, post a single PR summary covering inline threads, general review bodies, and PR conversation comments. Include locationless sources too.
For a response-only round, omit commit fields and any empty "Changes Made" section. Report the answers, explanations, resolutions, and anything still open.
gh pr comment $NUMBER --repo $OWNER/$REPO --body "$(cat <<'EOF'
## Review Feedback Addressed
[If this iteration published a fixing commit:]
Commit: [full SHA]
[If code changes were made:]
### Changes Made
- **[file]**: [what changed] ([source permalink]; per @[human-reviewer])
- **[file]**: [what changed] ([source permalink]; per botname[bot])
### Questions Answered
- **[source permalink]** ([optional file:line]): [brief answer] (asked by @[human-reviewer])
[If any comments were identified as false positives:]
### No Change Needed
- **[source permalink]** ([optional file:line]): [brief explanation of why the current code is correct and what repo pattern it follows] (flagged by botname[bot])
### Feedback Items Addressed
[N] of [M] actionable feedback items addressed in this iteration, including
[G] general review/PR comment items. Count items separately from thread resolutions.
### Threads Resolved
[T] of [U] initially unresolved threads resolved in this iteration. General review
bodies and PR conversation comments have no thread to resolve.
[If any feedback items were left unaddressed or threads remain open:]
### Still Open
- **[source permalink]** ([optional file:line]): [why it was left open, e.g., "deferred to follow-up PR", "awaiting reviewer confirmation"]
EOF
)"
@mention human reviewers only; never @mention bots in the summaryIf changes were pushed in Step 8, dismiss any CHANGES_REQUESTED reviews from reviewers whose feedback was fully addressed
in this iteration, then re-request their review so they receive a notification. If no code changes were made (e.g., only
questions answered), skip this step.
See references/dismiss-rerequest.md for the full flow (identify reviews, dismiss,
re-request, edge cases).
Use one final report outside monitoring, and a shorter round-status report during monitoring.
Outside monitoring, present the final status with the template below. During a
monitoring round, report Monitoring round [N]/2 plus what was assessed, what
action was taken, whether a commit was published, what threads were resolved,
and what remains open. Do not repeat the monitoring offer inside the loop.
For a response-only round, omit commit and pushed-branch fields and report the approved replies and any applicable thread resolutions without implying that code was published.
═══════════════════════════════════════════
PR #[number], REVIEW FEEDBACK ADDRESSED
═══════════════════════════════════════════
[If this iteration published a fixing commit:]
Commit: [SHA], [commit subject]
Pushed to: [branch]
Feedback items addressed: [N] of [M]
✓ [N] code-change items addressed
✓ [N] questions answered
✓ [N] general review/PR comment items addressed (included above)
Threads resolved on GitHub: [T] of [U] initially unresolved threads
[- [N] feedback items left unaddressed; [N] threads still open]
Sources: [item numbers and source permalinks, with code locations when available]
[If reviews were dismissed:]
Reviews refreshed:
✓ Dismissed "changes requested" from @[reviewer1], @[reviewer2]
✓ Re-requested review from @[reviewer1], @[reviewer2]
Summary comment posted: [PR URL]
What's next:
[- Reviewers have been re-requested and will be notified (only if refreshed)]
- Optionally monitor this PR for feedback in up to 2 follow-up rounds
[- [N] feedback items still need discussion, follow up at their source permalinks]
═══════════════════════════════════════════
After the final report (or Step 2 finds nothing to address), use
AskUserQuestion to ask:
"Would you like me to monitor this PR for new comments and remaining unresolved feedback, validate what needs fixing, and run this same resolution workflow for up to 2 follow-up rounds? I'll wait 60 seconds before each check and still ask for approval before making changes."
Offer Monitor (up to 2 rounds) and Finish now. Do not start monitoring without an explicit opt-in. If the user declines, finish without further checks.
The initial resolution pass does not count toward the limit. Maintain one
session-local counter for this PR, initially 0, and reuse the assessed-feedback
record initialized in Step 2. Unassessed feedback remains eligible.
For each of at most 2 follow-up rounds:
sleep 60), then increment the counter
before fetching. Every check consumes a round, even if no new or valid
feedback appears. Honor a user's request to stop immediately.Monitoring round [N]/2, feedback assessed, actions taken, commit/publication
state (if any), and anything still unresolved. Do not repeat the monitoring
offer. If there is no eligible feedback, say so and continue to the next check
within the limit.When Step 13 completes inside this loop, return to the next numbered round, not to a fresh Step 14 prompt. Never recursively invoke this skill, reset the counter after a push, or automatically extend/restart monitoring. After round 2, stop and report any remaining unresolved feedback and that the monitoring limit was reached; do not claim that future comments are covered.
If the user runs this skill again on the same PR:
0; it does not silently inherit consent.
Within an active loop, retain the existing counter and consent after a push.This skill DOES:
CLAUDE.mdThis skill does NOT:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub linuxfoundation/lfx-skills --plugin lfx-skills20 skills in this plugin
/lfxLFX cross-repo topology and ownership router. Use when the task spans more than one LFX repo, asks "which repo owns X", "where does Y live", "what repos does this touch", "what consumes Z", or needs a peer-repo file path from inside a single repo. Loads per-repo configs when invoked from the LFX workspace root with a full task prompt; gives targeted cross-repo guidance when invoked from inside a single repo. Also answers LFX glossary and topology questions, and performs read-only discovery when the user asks whether a contract, API, event, field, workflow, or repo capability exists. Do not fire for single-repo implementation tasks where the active repo's own CLAUDE.md already governs (those belong to the repo's local skills). Do not fire for V2 platform composition, service classes, or cross-service handoffs (use `/lfx-skills:lfx-platform-architecture`), ITX wrapper plumbing (`/lfx-skills:lfx-itx-integration`), or Intercom app/Fin workflows (`/lfx-skills:lfx-intercom`).
/lfx-cdp-snowflake-connectorsUse when adding a new snowflake-connector data source to crowd.dev — a new platform or a new source within an existing platform that needs buildSourceQuery, transformer, activity types, migration, and all associated type registrations scaffolded./lfx-data-engineerGuide non-dbt developers through building PR-ready data models, tests, and transformations in the lf-dbt repo. Encodes the medallion architecture (bronze/silver/gold/platinum), Snowflake SQL conventions, sqlfluff formatting, dbt testing patterns, key macros, and data governance rules. Use this skill any time someone asks about writing dbt models, adding data tests, creating SQL transformations, fixing pipeline failures, or contributing to the lf-dbt repository.
/lfx-general-code-reviewThe general code-review method for LFX local reviews — correctness, security, data privacy, error handling, simplicity, naming, DRY, testing, performance and style, plus the target repo's own written conventions, rules and checklists — over the one explicit pinned range the caller supplies. Reads the repo's rules from the repo; carries none of its own. Loaded by the `general` background reviewer that `/lfx-skills:lfx-pre-pr-review` launches. Returns an ordinary Markdown review./lfx-git-setupInteractive setup guide for LFX contributors to configure Git for DCO signoff and GPG-signed commits. Use this skill whenever someone asks about setting up Git signing, DCO signoff, GPG keys for commits, configuring `~/.gitconfig` for signing, adding a GPG key to GitHub, or any variation of "how do I sign my commits?". Also trigger it when a user says their commits aren't showing as "Verified" on GitHub, when they're onboarding to an LFX project and need to meet contribution requirements, or when they ask about `git commit -s`, `--signoff`, `Signed-off-by`, or `commit.gpgSign`. This skill works for technical and non-technical users alike.
/lfx-intercomEverything Intercom for LFX — Angular app integration (code) and Fin AI optimization (support/CX). Use this skill for: adding or fixing Intercom in an LFX Angular app, auditing integrations against the LFX canonical pattern, correcting missing JWT pre-set, broken shutdown, missing Auth0 claim, wrong app IDs, or absent CSP entries — AND for Fin Guidance writing, Help Center optimization, resolution rate improvement, Fin escalation patterns, Copilot tips, Topics Explorer, Fin Attributes, daily review rituals, Fin best practices, and writing or reviewing support content (Intercom articles or LFX in-app docs pages). Routes to the right section based on context. Trigger on: any Intercom question, "Fin tips", "improve Fin", "Fin guidance", "Fin resolution rate", "Help Center optimization", "Copilot tips", "Angular Intercom", "IntercomService", "JWT Intercom", "Fin re-engagement", "Fin handoff", "write a Help Center article", "rewrite this article", "review this article", "article standards", "write a docs page", "update the docs", "in-app docs", or any Intercom-related support or development question.
Other plugins' skills for the same job