Best for
- A PR is being prepared and the author wants "who should review this?"
- A CI job needs to compute the reviewer suggestion block for a sticky
- The agent is self-reviewing a diff and wants historical-pattern hits
event4u-app/agent-config/src/skills/review-routing/SKILL.md
Use when preparing a PR description, suggesting reviewers, or flagging risk — produces owner-mapped roles plus historical bug-pattern matches from project-local YAML.
Decision brief
You are the reviewer-routing specialist. Your only job is to resolve reviewer roles and matched historical patterns for a given diff, from the consumer project's ownership-map.yml and historical-bug-patterns.yml. You do not format PR descriptions end-to-end, you do not audit dif…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/review-routing"Inspect the Agent Skill "review-routing" from https://github.com/event4u-app/agent-config/blob/798a65522c7a73b90526641d6d1589fe0937cb5f/src/skills/review-routing/SKILL.md at commit 798a65522c7a73b90526641d6d1589fe0937cb5f. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Inspect the diff: from git (git diff --name-only ...) or from an explicit list supplied by the caller. If the list is empty, stop and report "no changes — routing skipped".
A PR is being prepared and the author wants "who should review this?"
Inspect the diff: from git (git diff --name-only ...) or from an explicit list supplied by the caller. If the list is empty, stop and report "no changes — routing skipped".
Parse each with YAML. Validate version: 1 is present. If a file is malformed, stop and report the parse error — never silently fall back. If neither file exists, emit the generic role-based fallback using reviewer-awareness.
Skill: review-routing Diff: changed file(s) Overall: 🔴 high / 🟡 medium / 🟢 low
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
You are the reviewer-routing specialist. Your only job is to resolve reviewer roles and matched historical patterns for a given diff, from the consumer project's
ownership-map.ymlandhistorical-bug-patterns.yml. You do not format PR descriptions end-to-end, you do not audit diffs for correctness, you do not invent ownership — sibling skills and rules handle those.
Do NOT use when:
reviewer-awareness defaults.create-pr-description and let
it call this skill for the routing block.threat-modeling.Inspect the diff: from git (git diff --name-only <base>...<head>) or
from an explicit list supplied by the caller. If the list is empty,
stop and report "no changes — routing skipped".
Check, in order:
.github/ownership-map.yml → fallback agents/ownership-map.yml.github/historical-bug-patterns.yml → fallback
agents/historical-bug-patterns.ymlParse each with YAML. Validate version: 1 is present. If a file is
malformed, stop and report the parse error — never silently fall
back. If neither file exists, emit the generic role-based fallback
using reviewer-awareness.
Also pull agent-written signals via the shared abstraction (see
memory-access):
agent-config memory:lookup \
--types ownership,historical-patterns,incident-learnings \
--key <changed file path> \
--limit 5
# Repeat --key per changed path.
Treat source: "curated" as equal-trust to the project YAML.
Treat source: "intake" as low-confidence — surface matches in a
separate "provisional" bullet so reviewers can discount them.
Entries are additive: they never override a YAML match, only
supplement it.
For every changed file, find the first matching entry in
ownership-map.yml (fnmatch semantics, same as pr-risk-config.yml).
Collect the union of:
Files with no match fall through to defaults.roles if defined, else
to the generic-role fallback.
Walk every pattern in historical-bug-patterns.yml. A pattern matches
when any of its paths globs matches any changed file. For each
match, record:
id, label, severityrequired_test (verbatim)references (verbatim)Take the max severity across matched patterns:
high pattern matched → overall highmedium → overall mediumlowIf a PR-risk classifier has already labeled the PR, keep the higher of the two levels. Do not downgrade.
If ownership-map.yml has an updated field older than 6 months,
include a staleness warning in the output. Still use the data — just
flag it.
Before returning:
reviewer-awareness) or sourced
from an ownership entry — never invented.id and required_test
verbatim.Every routing result must satisfy these requirements:
Skill: review-routing followed by diff size and
overall severity emoji (🔴 / 🟡 / 🟢).id, severity emoji, label, verbatim required_test and
reference.ownership-map.yml + historical-bug-patterns.yml or
no project data — generic roles).Canonical layout:
Skill: review-routing
Diff: <N> changed file(s)
Overall: 🔴 high / 🟡 medium / 🟢 low
Ownership (from ownership-map.yml, updated: YYYY-MM-DD):
• primary: <role> — focus: <focus notes merged>
• secondary: <role> — focus: <focus notes merged>
(additional roles as needed, anchored to specific files)
Historical patterns matched:
🔴 <id> — <label>
required test: <verbatim from YAML>
reference: <verbatim from YAML>
🟡 ...
Staleness: <none | "ownership map last updated N months ago">
Data source: <"ownership-map.yml + historical-bug-patterns.yml"
| "no project data — generic roles">
ownership-map.yml or historical-bug-patterns.yml as
a side effect of routing a diff. Data edits are a separate task.reviewer-awareness — role vocabulary + data-source rulesreview-routing-data-formatcreate-pr-descriptionjudge-test-coverage — consumes
the required_test entries from matched patterns.