From principled-github
Validate that a pull request follows principled conventions: references a plan or proposal, has correct labels, includes required sections in the description, and links to relevant documents. Use in CI or before merging to enforce PR quality.
How this skill is triggered — by the user, by Claude, or both
Slash command
/principled-github:pr-checkThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Validate that a pull request follows principled conventions for cross-referencing, labeling, and description quality.
Validate that a pull request follows principled conventions for cross-referencing, labeling, and description quality.
/pr-check [<pr-number>] [--strict] [--json]
| Argument | Required | Description |
|---|---|---|
<pr-number> | No | PR number to check. Defaults to the current branch's open PR. |
--strict | No | Fail on warnings (by default, only errors cause failure). |
--json | No | Output results as JSON instead of human-readable text. |
gh CLI must be installed and authenticatedResolve PR. Determine which PR to check:
<pr-number> provided: use it directlygh pr view --json numberFetch PR metadata. Get PR details:
bash scripts/fetch-pr-metadata.sh --pr <number>
Returns: title, body, labels, base branch, head branch, file count, and file paths.
Run checks. Execute each validation:
bash scripts/validate-pr.sh --pr-body "<body>" --pr-labels "<labels>" --branch "<head-branch>" --files "<files>" [--strict]
The script checks:
Required (errors):
## Summary section## Test plan or ## Checklist sectionRecommended (warnings, errors in --strict):
Closes #N, Fixes #N, Relates to #N)Plan-NNN) or proposal (RFC-NNN)type:*, plan:*, proposal:*)impl/, feat/, fix/)Report results. Display check results:
--json: structured JSON outputscripts/check-gh-cli.sh --- Verify gh CLI availability (copy)scripts/fetch-pr-metadata.sh --- Fetch PR details from GitHubscripts/validate-pr.sh --- Run PR validation checksnpx claudepluginhub alexnodeland/principled --plugin principled-githubValidates PR titles for conventional commit format (<type>(<scope>)?: <description>), bodies for issue linking keywords (Closes/Fixes #N), and template compliance (Summary, Changes, Type of Change).
Creates GitHub PRs after validating git state, running quality checks (lint/test/build/security), detecting templates, linking issues, and applying labels.