chore(skills): add branch guard to pr-review skill
Reviews must run from main. Added step 0 hard stop if current branch is not main, preventing repeated misuse from team branches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,11 +16,20 @@ on the branch type. All reviewers must approve for a clean review.
|
|||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
### 1. Determine the branch
|
### 0. Branch guard — MUST be on `main`
|
||||||
|
|
||||||
If the user provided a branch name as argument, use it. Otherwise use the
|
```bash
|
||||||
current branch (`git branch --show-current`). If on `main`, ask the user
|
git branch --show-current
|
||||||
which branch to review.
|
```
|
||||||
|
|
||||||
|
If the current branch is **not `main`**, stop immediately and tell the user:
|
||||||
|
"PR reviews must be run from the `main` worktree. Switch to `main` first."
|
||||||
|
Do NOT proceed with the review from a team branch.
|
||||||
|
|
||||||
|
### 1. Determine the branch to review
|
||||||
|
|
||||||
|
If the user provided a branch name as argument, use it. Otherwise list open
|
||||||
|
PRs and ask the user which branch to review.
|
||||||
|
|
||||||
To list open PRs on Gitea:
|
To list open PRs on Gitea:
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user