pr-context
Skill2 starsChanged 3 months agoMITView on GitHub
Phase 4 of ACF. Builds a PR body that carries the issue's acceptance criteria, test commands, CI check names, and scope lock. Use when ACF delegates PR creation, or when the user asks to "open a PR", or "create a pull request with context".
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Joshua-Palamuttam/workbench-templatetheir own version, first seen Mar 7, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Joshua-Palamuttam/workbench-template★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- context-loadSkill
- stack-auditSkill
- issue-craftSkill
- frontend-previewSkill
- label-metadataSkill
- compactionSkill
- cavemanSkill
- graph-scopeSkill
- acfSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 71
Do not assume the base branch is main.
- Very specific: line 85
Use the detected base branch in --base for gh pr create and in the pre-launch checklist.
- Distinctive: line 120
Verify CI checks start running
- Distinctive: line 121
If frontend-preview was used, attach the screenshot to the PR
- Very specific: line 130
ghnot authenticated: run gh auth status. If not authed, report "gh not authenticated — run gh auth login and retry." Save the draft. - Very specific: line 132
GitHub API rate limits: if gh pr create fails with a rate limit error, save the draft and report "Rate limited — retry after [reset time].
- Very specific: line 137
Commands fail: if gh pr create fails (network, permissions, branch push failure), save the draft and report the error.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR-Context
Produces PR bodies that give reviewers (human or AI) everything needed to verify the change — without re-reading the issue or the codebase.
Prerequisites
- Context-load snapshot is complete (test commands, CI check names)
- The issue being closed is known (from issue-craft or stack-audit)
- Implementation is complete and tests pass locally
PR Body Structure
## Summary
[1-2 sentences: what changed and why]
## Closes
Closes #N
## Scope Lock
- [x] This PR stays within the issue scope
- [ ] Out-of-scope changes: [none / list]
## Changes
- `path/to/file` — [what changed, one line per file]
- `path/to/test` — [test added/modified]
## Verification
- [x] `[test command 1 from context-load]` — [N tests pass]
- [x] `[test command 2 from context-load]` — [N tests pass]
- [x] `[build command]` — build succeeds
- [x] `[typecheck command]` — no new errors
## CI Checks Expected
- [ ] `[check name 1]` (from workflow: `[workflow file]`)
- [ ] `[check name 2]` (from workflow: `[workflow file]`)
## Acceptance Criteria
- [x] [AC 1 from issue — copied verbatim]
- [x] [AC 2 from issue — copied verbatim]
- [ ] [AC 3 — if not yet verified, leave unchecked]
## Production Plan (if applicable)
- Verification: [how to verify in production]
- Rollback: [how to revert]Rules
Closes #Nis mandatory — every PR must reference an issue- AC are copied verbatim from the issue — don't paraphrase
- Test commands are exact — from context-load, not invented
- CI check names are real — from workflow files, not guessed
- Scope lock is explicit — checkbox confirming no out-of-scope changes
- Unverified AC stay unchecked — don't lie about verification status
Base Branch Detection
Do not assume the base branch is main. Detect it automatically:
- Primary method — read the remote HEAD symbolic ref:
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null \ | sed 's@^refs/remotes/origin/@@' - Fallback — query the repo's default branch via
gh:gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' - Last resort — if both fail, default to
mainbut warn the user: "Could not detect base branch — assumingmain. Verify withgit branch -r."
Use the detected base branch in --base for gh pr create and in the
pre-launch checklist.
Pre-Launch Checklist
Before gh pr create:
- All tests pass locally (exact commands from context-load)
- Build succeeds
- No secrets, API keys, or tokens in the diff
- PR body has
Closes #N - AC checkboxes match actual verification status
- CI check names match workflow job names
- Branch is based on the detected base branch (see Base Branch Detection)
- Branch naming follows convention (
feature/,fix/, etc.)
Launch
# Detect base branch (do not assume "main")
BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null \
| sed 's@^refs/remotes/origin/@@' || \
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
gh pr create \
--title "fix: flashlight uses :FireServer() instead of :Fire()" \
--body-file /tmp/pr-body.md \
--base "$BASE" \
--head fix/flashlight-fireserverRecord the PR number in the progress file.
Post-Launch
- Verify CI checks start running
- If frontend-preview was used, attach the screenshot to the PR
- Monitor for
scc-failing-checksor equivalent labels (if the project uses autonomous SDLC labels)
Error Handling
ghCLI not installed: pr-context cannot create PRs withoutgh. Report "gh CLI not found — PR body saved to /tmp/pr-body.md. Install gh to create: https://cli.github.com/" and save the draft.ghnot authenticated: rungh auth status. If not authed, report "gh not authenticated — rungh auth loginand retry." Save the draft.- GitHub API rate limits: if
gh pr createfails with a rate limit error, save the draft and report "Rate limited — retry after [reset time]. PR body at /tmp/pr-body.md." - Base branch detection fails: see Base Branch Detection — fall back to
mainwith a warning. Do not silently assumemain. - Commands fail: if
gh pr createfails (network, permissions, branch push failure), save the draft and report the error. Do not lose the PR body.
Example
Complete PR body for a bug fix:
## Summary
Fixed the flashlight tool to use `:FireServer()` instead of `:Fire()` so the
server authorizes the action before it replicates.
## Closes
Closes #17
## Scope Lock
- [x] This PR stays within the issue scope
- [ ] Out-of-scope changes: none
## Changes
- `src/client/Controllers/ToolController.luau` — changed `:Fire()` to `:FireServer()`
- `scripts/test_tools.luau` — added regression test for server authorization
## Verification
- [x] `lune run scripts/test_core.luau` — 26 tests pass
- [x] `selene src/` — no new lint warnings
- [x] `luau-analyze src/` — no new type errors
## CI Checks Expected
- [ ] `test (lune)` (from workflow: `.github/workflows/ci.yml`)
- [ ] `type-check (luau-analyze)` (from workflow: `.github/workflows/ci.yml`)
## Acceptance Criteria
- [x] `ToolController:activateTool()` calls `:FireServer()` instead of `:Fire()`
- [x] Regression test added in `scripts/test_tools.luau`
- [x] 26 tests pass — `lune run scripts/test_core.luau`Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

