ワンクリックで
pr-validate
Validate a PR title and branch name against repository contributing guidelines
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Validate a PR title and branch name against repository contributing guidelines
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Perform deep analysis of the codebase, recent changes, and the requested task. Create a validated, expert-reviewed implementation plan
Review a pull request and provide constructive feedback with structured verdict. Used by awinogradov/code-review-action
Plan, implement, commit, create PR, and monitor until approved
Analyze staged changes and create conventional commits with intelligent grouping. Use when creating commits, or when invoked from other skills.
Create a GitHub issue with a structured body (Context, What, Why, Scope, Solution) and curated labels via the gh CLI. Use when filing new issues, or when invoked from other skills.
Create a Linear issue with a structured body (Context, What, Why, Scope, Solution) and wizard-selected status, label, and assignee via the Linear MCP. Use when filing a Linear ticket on a linear-tracked project.
| name | pr:validate |
| description | Validate a PR title and branch name against repository contributing guidelines |
| argument-hint | PR_TITLE: "<title>" BRANCH_NAME: "<branch>" PR_AUTHOR: "<author-login>" |
| allowed-tools | ["Bash(gh *)","Read"] |
Arguments: $ARGUMENTS
Expected form (typically supplied by awinogradov/code-review-action):
PR_TITLE: "<title>" BRANCH_NAME: "<branch>" PR_AUTHOR: "<author-login>"PR_TITLE — $ARGUMENTS → gh pr view --json title --jq .title as a fallback when invoked interactively.BRANCH_NAME — $ARGUMENTS → gh pr view --json headRefName --jq .headRefName → git branch --show-current as a last resort. Empty is allowed for bot PRs (skip branch validation).PR_AUTHOR — $ARGUMENTS → gh pr view --json author --jq .author.login.Do NOT prompt the user. If all fallbacks fail, return a structured validation error in the output JSON.
$ARGUMENTS
You are validating the PR title and branch name provided above. Apply the following rules exactly. These rules are the canonical encoding of CONTRIBUTING.md — do not invent alternatives.
<Business-valuable description>
Standard title rules:
feat(scope): ... is invalid as a PR title)<LINEAR-ID>: <Business-valuable description>
Linear title rules:
package.json agents.trackers lists a linear entry whose effective keys (the entry's keys, defaulting to [team]) include the ID's key — read package.json with the Read tool. Without a matching linear tracker, a TEAM-N: prefix is invalid.LINEAR-ID is the uppercase ticket id matching [A-Z][A-Z0-9]*-[0-9]+, followed by a colon and a single space<team>-<number> uppercased — branch frtns-28-pr-gate requires the title to start with FRTNS-28: exactly; a different id (e.g., FRTNS-82:) or a missing prefix is invalidissue-<number>- or special-prefix branch is invalidThese prefixes are valid alternatives to a plain business description:
HOTFIX: — Emergency production fixesTRIVIAL: — Changes not affecting production: typos, docs, comments, formattingMAINTENANCE: — Infrastructure updates: deps, CI, configsPROPOSAL: — Suggest a change without filing an issue first; discussion happens on the PRSECURITY: — Fixes for GitHub code-scanning alerts (alerts close on re-scan, not via PR magic words; no Closes #)Special prefix rules:
Release PRs are created automatically by release workflows.
Release [<name>] <version>
Release title rules:
Release keyword is required, capitalized exactly as shownname is the package or service name (optional for single-package repos, required for monorepos)version is a SemVer number (e.g., 1.2.0, 22.0.0) — no v prefixReleaseIf BRANCH_NAME is provided and not empty, validate it against one of these formats:
Standard format:
issue-<number>-<short-description>
issue- is the literal lowercase keywordnumber is the GitHub issue number (digits only, no #)short-description is required, lowercase, hyphens only (no underscores)Linear ticket format (Linear-tracked repositories):
<team>-<number>-<short-description>
package.json agents.trackers lists a linear entry whose effective keys include the branch's team key uppercased — otherwise the branch is invalid, so a typo like isue-42-fix is not silently accepted as Linearteam is the Linear team key lowercased (letters and digits, starting with a letter); number is the ticket number (digits only)issue- keyword, the special prefixes, and release- — those literal prefixes always win over the generic Linear shapeshort-description is required, lowercase, hyphens only (no underscores)Special prefix format:
<prefix>-<short-description>
prefix must be one of: hotfix, trivial, maintenance, proposal, security (all lowercase)short-description is required, lowercase, hyphens only (no underscores)Release branch format:
release-<version>
version is a SemVer number (e.g., 1.2.0, 22.0.0) — no v prefixValid branch examples:
issue-123-add-password-resetissue-123-update-dtoissue-45-fix-editor-crashissue-789-update-protoeng-123-add-auth — when a linear tracker with key ENG is configuredhotfix-memory-leak-editortrivial-fix-typo-readmemaintenance-upgrade-node-22proposal-add-vim-keybindingssecurity-tainted-format-stringrelease-1.2.0Invalid branch examples:
add-user-auth — missing issue-<number> prefix or special prefixissue_123_add_auth — underscores not allowedeng_123_add_auth — underscores not allowed in Linear branches eitherrepo-123-add-auth — Linear shape without a matching linear tracker key REPO in agents.trackerswip — no issue ref, no descriptionISSUE-123-add-auth — must be lowercaserelease-v1.2.0 — no v prefixIf BRANCH_NAME is empty, skip branch name validation entirely (Dependabot and similar bots cannot follow branch naming conventions).
Allow editor theme selection per workspaceAdd annotation events for playback duration reportingRefactor annotation codec for streaming supportRemove legacy plan-import endpointsENG-123: Allow theme selection — Linear-tracked repo, branch eng-123-…HOTFIX: Memory leak in editorTRIVIAL: Fix typo in READMEMAINTENANCE: Upgrade Node to 22 LTSPROPOSAL: Add Vim keybindingsSECURITY: Sanitize tainted format string in runClaudeRelease 1.2.0Release Symbiot Editor 1.2.0feat(editor): add theme routing — Conventional Commits format, not PR title format#123: Add feature — GitHub issue numbers must NOT appear in the title123: Add feature — Same; link the issue via Closes #123 in the bodyENG-123: Add feature — on an issue-…/special-prefix branch, or when no linear tracker matches key ENGAdd PR quality gate on branch frtns-28-pr-gate — a gated Linear branch requires the FRTNS-28: title prefixAdded theme options — Vague, past tense, missing business valueAllow editor theme selection per workspace. — Trailing period not allowedchore: bump deps — Conventional Commits formatrelease 1.2.0 — Release must be capitalizedRelease v1.2.0 — no v prefix in versionThe contributing-check CI action validates the title and the branch independently, so it accepts some combinations these rules reject. The title↔branch consistency rule, the mandatory colon + space after the Linear id (the CI header pattern makes the colon optional), and the agents.trackers gating are deliberately stricter and have no CI counterpart — a PR that passes CI but fails here is working as designed, not drift.
For issue-<number>- branch names (skip for HOTFIX/TRIVIAL/MAINTENANCE/PROPOSAL/SECURITY prefixes, Linear branches, and Release branches), perform these additional checks:
Extract the issue number from the branch name (e.g., 123 from issue-123-add-password-reset).
Check issue existence:
gh issue view <NUMBER> --json title,body,state
If not found, mark invalid with reason: "GitHub issue # referenced by branch does not exist"
Validate relevance: Compare the PR title against the issue title and body. The title must be meaningfully related to the issue — it should capture the essence of what's being done. Non-meaningful or generic titles that don't relate to the issue content are invalid.
If the gh call fails (auth/network), skip this section and validate format only.
For Linear branches, skip ticket-existence and relevance verification entirely — in CI only gh is available, with no Linear read path. The format rules plus the title↔branch consistency rule are the full check.
When the PR is invalid, generate a full GitHub PR comment in the comment field. Be sarcastic and use emojis generously. Address the PR author by @-mentioning PR_AUTHOR. Explain what went wrong, show how to fix it, and link to the [contributing guidelines](/CONTRIBUTING.md). When the PR is valid, set comment to an empty string.
Return structured JSON output with exactly these fields:
titleValid (boolean): Whether the PR title passes all title rulesbranchValid (boolean): Whether the branch name passes all branch rules (always true when BRANCH_NAME is empty)reason (string): If any check failed, a brief technical summary of what failed. If all valid, an empty string.comment (string): If any check failed, the full GitHub PR comment body (markdown) as described in Comment Generation. If all valid, an empty string.These rules govern references — when you point the reader at a real file, standard, section, commit, or issue. (A token named only as an example, with no real target, is a code specimen in backticks, like any code identifier.) Every reference must resolve: render it as a real link whose target exists, and prefer the most stable link form so it does not rot. Render the same kind of reference the same way everywhere:
buildReviewComments, reviewOutput.ts. A backticked token names a thing as an example; it is not a reference and carries no link.[release field spec](<repo-blob-url>/docs/06-release-field.md). Use a repo-relative path in repository files and the absolute <repo-blob-url> form in generated output posted outside the repo (PR/issue bodies, review comments, release notes), where relative paths do not resolve. Any prose mention of a file or path that exists in the repo is such a reference — link it so it resolves on the default branch at writing time; a path that does not exist yet (a file the text proposes to create) or one shown inside a command or fenced block is a code specimen, not a reference.[RFC-0001](<repo-blob-url>/rfc/0001-reference-formatting.md); an Accepted RFC is immutable except through an explicit version bump, so the link never rots.[title](url) to the canonical source, taking the title from the source (or the site name). Use only a URL present in your input or context — never produce one from memory; a source with no known URL stays plain prose. When several sources back one document, they may be gathered into a short references list.#anchor, e.g. [Phase 6](#phase-6-reply-to-review-threads). Another document: path#anchor — a repo-relative path in repository files, the absolute <repo-blob-url>/path#anchor form in generated output. A GitHub anchor is the heading lower-cased, spaces turned to hyphens, punctuation dropped.[0328a61](<repo-commit-url>/0328a61); a commit is immutable. If you cannot build the URL, leave the bare SHA un-backticked.ENG-123) is dead text when bare: in prose, ALWAYS render it as a markdown link, e.g. [ENG-123](https://linear.app/<workspace>/issue/ENG-123) — a slug-less issue URL resolves. On a magic-word line (Closes/Fixes/Related to in a PR body's **Issues:** section) use plain forms only: bare #N for GitHub, the plain issue URL for other trackers — never a markdown-bracket link, which breaks the close-parsers.Backticks suppress GitHub autolinking: a commit SHA or issue/PR number inside a code span renders as dead text — that is why a backticked SHA was un-clickable in a prior review. Never wrap a SHA or issue/PR number in backticks; link it, or leave it bare so GitHub auto-links it.
Write the most helpful, readable output you can: plain, direct prose; every reference resolvable; explain the "why", not the obvious "what".