Skip to content

Commit 2dab320

Browse files
wmitsudaclaude
andcommitted
Reject non-automation PRs in summarize-changes skill
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 047fad3 commit 2dab320

File tree

1 file changed

+22
-3
lines changed
  • .claude/skills/summarize-changes

1 file changed

+22
-3
lines changed

.claude/skills/summarize-changes/SKILL.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,26 @@ The PR to analyze: $PR_URL_OR_NUMBER
1010

1111
If $PR_URL_OR_NUMBER is a full URL, extract the PR number from it. If it is just a number, use it directly. The repo is erigontech/erigon-snapshot.
1212

13-
## Step 1: Fetch PR Data and Run Analysis
13+
## Step 1: Validate PR Origin
14+
15+
Before doing any analysis, verify this PR was created by the snapshot release automation.
16+
17+
Run:
18+
```
19+
gh pr view <number> --repo erigontech/erigon-snapshot --json title,labels --jq '{title: .title, labels: [.labels[].name]}'
20+
```
21+
22+
The PR **must** satisfy **both** conditions:
23+
1. Title starts with `[automation]`
24+
2. Has the `automation` label
25+
26+
If either condition is not met, **stop immediately** and respond:
27+
28+
> This PR was not created by the snapshot release automation (expected `[automation]` title prefix and `automation` label). This skill only analyzes automated snapshot PRs.
29+
30+
Do NOT proceed with any further steps.
31+
32+
## Step 2: Fetch PR Data and Run Analysis
1433

1534
Run these commands using the Bash tool:
1635

@@ -43,7 +62,7 @@ The script (`analyze_diff.py` in the skill directory) parses the diff, classifie
4362
- **Unexpected Deletions**: removed entries not covered by any of the above (CRITICAL)
4463
- **Version Conflicts**: multiple versions of the same file type and range coexisting in the final toml (CRITICAL)
4564

46-
## Step 4: Generate Report
65+
## Step 3: Generate Report
4766

4867
### File grouping
4968

@@ -226,7 +245,7 @@ This PR contains changes that need manual review before approval:
226245
- (list each concern: N hash change(s), N unexpected deletion(s), N version conflict(s), N version downgrade(s), with brief context from the sections above)
227246
- Version conflicts and version downgrades specifically mean "do not merge" — they will cause download conflicts or regressions for nodes
228247

229-
## Step 5: Offer to Post as PR Comment
248+
## Step 4: Offer to Post as PR Comment
230249

231250
After displaying the full report, ask the user if they want you to post it as a comment on the PR.
232251

0 commit comments

Comments
 (0)