Skip to content

Commit 44e6f09

Browse files
committed
Add PR Feedback skill
1 parent b1a2fd3 commit 44e6f09

File tree

1 file changed

+94
-0
lines changed
  • .claude/skills/apply-pr-feedback

1 file changed

+94
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
name: apply-pr-feedback
3+
description: "Evaluates PR review feedback (file, line, comment), classifies it as valid or false-positive, applies fixes for valid feedback, runs acceptance checks, and pushes updates via Graphite. Use when applying code review comments to an open PR."
4+
argument-hint: "<file-path:line-range> <feedback-text>"
5+
---
6+
7+
# Apply PR Feedback
8+
9+
Evaluates and applies PR review feedback one item at a time. For each piece of feedback: assess validity, fix if valid, then after all feedback is processed run checks and push.
10+
11+
## Inputs
12+
13+
Each feedback item consists of:
14+
15+
- **File path** and **line range** — the code location being reviewed.
16+
- **Feedback text** — the reviewer's comment describing the issue or suggestion.
17+
18+
The user may provide multiple feedback items in sequence. Process them one at a time in conversation order.
19+
20+
## Feedback Evaluation
21+
22+
For each feedback item:
23+
24+
1. Read the referenced file and line range with full surrounding context.
25+
2. Evaluate the feedback against the actual code:
26+
- **Valid** — the feedback identifies a real issue (bug, safety concern, spec violation, missing edge case, etc.)
27+
- **Improvement** — the feedback suggests a better approach that is correct but not strictly a bug.
28+
- **False positive** — the feedback describes a problem that does not actually exist in the code.
29+
30+
3. Report your assessment concisely:
31+
32+
```text
33+
[file:lines] — <Valid | Improvement | False positive>
34+
Reason: <1-2 sentence explanation>
35+
```
36+
37+
4. If **false positive**, explain why and ask the user to confirm before skipping.
38+
5. If **valid** or **improvement**, apply the fix immediately.
39+
40+
## Applying Fixes
41+
42+
When applying a fix:
43+
44+
- Make the minimal change that addresses the feedback.
45+
- If the fix changes function signatures or behavior, update all callers.
46+
- If the fix changes error handling or edge cases, add or update tests to cover the new behavior.
47+
- Do not make unrelated changes or refactor surrounding code.
48+
49+
## Batch Flow
50+
51+
The user will provide feedback items one at a time or in batches. Follow this flow:
52+
53+
1. For each item: evaluate, report assessment, apply fix (or flag false positive).
54+
2. After applying a fix, confirm it's done and ask if there is more feedback.
55+
3. When the user says all feedback is provided, proceed to **Verification & Push**.
56+
57+
## Verification & Push
58+
59+
After all feedback items are resolved:
60+
61+
1. Run the repository acceptance criteria:
62+
- Build commands (including no_std if applicable).
63+
- Linter / clippy with warnings as errors.
64+
- Formatter check.
65+
- Full test suite.
66+
2. If any check fails, fix the issue and rerun until passing.
67+
3. Once all checks pass, push the update:
68+
- `git add <changed-files>` — stage only the files that were modified.
69+
- `gt modify` — amend the changes into the current branch commit.
70+
- `gt submit` — push the updated branch.
71+
72+
## Reporting
73+
74+
After push, summarize:
75+
76+
```text
77+
PR feedback applied:
78+
- [file:lines] — <assessment> — <what was changed>
79+
- [file:lines] — <assessment> — <what was changed>
80+
81+
Checks passed:
82+
- <command 1>
83+
- <command 2>
84+
85+
Pushed via: gt modify + gt submit
86+
```
87+
88+
## Rules
89+
90+
- Never push before all acceptance checks pass.
91+
- Keep fixes minimal and targeted to the feedback.
92+
- Do not use `git commit` directly — use `gt modify` to amend into the existing branch commit.
93+
- If a fix introduces a test failure elsewhere, investigate and fix before pushing.
94+
- If feedback is ambiguous, ask the user to clarify before making changes.

0 commit comments

Comments
 (0)