@jguadagno/pr-guardrails
A- You need to add or repair branch and PR governance in this repository.
Install
agr install @jguadagno/pr-guardrails --target claudeWrites 1 file into .claude/skills/, pinned to git-b2ac2b30.
- .claude/skills/pr-guardrails/SKILL.md
Document
PR Guardrails
When to use
- You need to add or repair branch and PR governance in this repository.
- You need consistent local hook enforcement plus CI verification.
Rules
- Branches must target exactly one issue:
issue-<number>-<slug>feature/<number>-<slug>
- PR titles must follow
<type>(#<issue>): <summary> - PR bodies must include exactly one closing issue reference matching the branch and PR title
Implementation pattern
- Add
.githooks\pre-committo block direct commits tomainand reject branch names without a single issue number. - Add
.githooks\commit-msgto enforce Conventional Commits. - Add
scripts\setup-git-hooks.ps1to configurecore.hooksPathand the local commit template. - Add a PR-only CI job that validates branch name, PR title, and linked issue matching without changing push-to-main build/test behavior.
- Update
CONTRIBUTING.mdand.github\pull_request_template.mdso the local and CI rules are explicit.
Why
Local hooks fail fast for contributors, but CI is still required because hooks can be skipped or never installed. The branch name, PR title, and linked issue must all agree so "one issue per PR" is enforced mechanically instead of by memory.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-b2ac2b30dcbd2026-07-31