Skip to content

Commit c494765

Browse files
committed
Simplify skills
1 parent 394dfc9 commit c494765

File tree

2 files changed

+33
-32
lines changed

2 files changed

+33
-32
lines changed

.github/skills/pr-review/SKILL.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
---
22
name: pr-review
3-
description: Address review comments from GitHub PR using gh CLI and resolve feedback
3+
description: Address review comments and CI failures for the current branch's PR
44
---
55

6-
## When to use
7-
8-
- Current branch has a PR with review comments requiring responses
9-
- Need to systematically evaluate and resolve reviewer feedback
10-
116
## Constraints
127

13-
- **ALWAYS** set `PAGER=cat` before calling `gh` to avoid pagination issues
14-
- Use `gh pr view <PR_NUMBER> --comments` to fetch review comments
15-
- Use `gh pr list --head <CURRENT_BRANCH>` to find the PR number for the current branch
8+
- Prepend `GH_PAGER=` to every `gh` command (bash/zsh), or set `$env:GH_PAGER=""` in PowerShell — never modify global config
9+
- Key commands: `gh pr list --head <BRANCH>` · `gh pr view <PR> --comments` · `gh pr checks <PR>` · `gh run view <RUN_ID> --log-failed`
10+
- Workflow fixes **cannot be verified locally**the fix is only confirmed once the remote CI re-runs and passes
1611

1712
## Procedure
1813

19-
1. **Find Issues**: Use `gh` to locate the PR for current branch and retrieve all review comments
20-
2. **Evaluate**: Analyze each comment in project context:
21-
- If valid: implement the necessary code improvements
22-
- If invalid: document reasons and address any underlying real issues
23-
3. **Summarize**: Provide a summary covering:
24-
- Valid points and how they were resolved
25-
- Invalid points and reasons for rejection
26-
- Any additional issues discovered and fixed
27-
4. **Commit**: Generate commit message, then `git commit` and `git push`
14+
1. **Locate PR** — get PR number for current branch
15+
2. **Fix CI failures** — for each failing check:
16+
- Fetch logs: `gh run view <RUN_ID> --log-failed`
17+
- **Workflow issue** (wrong config, missing step, bad path):
18+
1. Fix `.github/workflows/` directly
19+
2. Commit & push the workflow change
20+
3. Wait for the re-triggered run to complete: poll with `GH_PAGER= gh pr checks <PR>` (or `GH_PAGER= gh run watch <RUN_ID>`) until the affected check finishes
21+
4. If it **passes** → continue to the next failing check
22+
5. If it **still fails** → fetch new logs (`gh run view <NEW_RUN_ID> --log-failed`) and repeat from step i
23+
- **Code issue, non-breaking**: fix source code directly
24+
- **Code issue, breaking change required**: stop and report to developer for a decision
25+
3. **Address review comments** — implement valid feedback; document why invalid ones are rejected
26+
4. **Commit & push** — single commit covering all non-workflow fixes (workflow fixes are pushed incrementally during step 2)
27+
5. **Final verification** — once all fixes are applied, confirm every check is green: `GH_PAGER= gh pr checks <PR>`
2828

2929
## Output
3030

31-
- Clear mapping between review comments and their resolutions
31+
- Per CI failure: root cause and resolution (or escalation reason)
32+
- Per review comment: resolution or rejection reason
33+
- After all fixes: summary of check statuses confirming all green

.github/skills/pr-submit/SKILL.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
---
22
name: pr-submit
3-
description: Create or update a GitHub Pull Request after completing code changes
3+
description: Create or update a GitHub Pull Request — use ONLY when explicitly asked to create/submit/open a PR
44
---
55

66
## When to use
77

8-
- Code changes are complete and ready for review
9-
- Need to create a new PR or update an existing one with new commits
8+
**Only** when the user explicitly asks to create, submit, or open a Pull Request.
9+
Do NOT invoke this skill for plain commit or push requests.
1010

1111
## Constraints
1212

13-
- **ALWAYS** set `PAGER=cat` before calling `gh` to avoid pagination issues
13+
- Prepend `GH_PAGER=` to every `gh` command (bash/zsh), or set `$env:GH_PAGER=""` in PowerShell — never modify global config
1414

1515
## Procedure
1616

17-
1. **Verify**: Review conversation history and current changes—ensure completeness, correctness, no performance issues
18-
2. **Clean**: Remove temporary files, debug artifacts, and unintended changes
19-
3. **Commit & Push**:
20-
- If on `master`, create a new feature branch (avoid name conflicts)
17+
1. **Verify & clean** — ensure changes are complete, correct, and free of debug artifacts
18+
2. **Commit & push**:
19+
- If on `master`, create a new feature branch first (avoid name conflicts)
2120
- Commit all changes and push to remote
22-
4. **PR**: Use `gh` to create or update the Pull Request:
23-
- Check if current branch has an existing PR
24-
- **If exists**: Fetch title/description, incorporate new commits, update the PR
25-
- **If not**: Create PR against remote `master`, draft title/description from changes
21+
3. **Create or update PR**:
22+
- Check if current branch already has a PR (`gh pr list --head <BRANCH>`)
23+
- **Exists**: update title/description to reflect new commits
24+
- **None**: create PR against `master` with title/description derived from changes
2625

2726
## Output
2827

29-
- Focus on: what changed, why, impact, verification
28+
- What changed, why, impact, and how to verify

0 commit comments

Comments
 (0)