hiroro-work/claude-plugins/rules-review
Claude Code and agent skill by hiroro-work/claude-plugins
- community
Checking that the SKILL.md file is still in the repository.
Check code changes for .claude/rules/ compliance. Use this skill when you need to verify that code changes follow project coding rules, whether as part of dev-workflow or standalone. Triggers on: rule compliance check, rules review, verify conventions, check coding standards. Best suited for hard rules (naming, imports, placement, explicit prohibitions); intent-style rules are checked on a best-effort basis.
Install
npx vskill@latest install hiroro-work/claude-plugins/rules-reviewSKILL.md
Rules Review
Usage
Two optional values may also be passed as natural-language arguments. Each is an independent optional field, not part of a fixed-arity mode gate.
Model:— one of the model ids the currentAgenttool'smodelparameter accepts (check the tool's live schema loaded in the current session). When present and valid it becomes themodelparameter on each reviewerAgentdispatch in § 5. Review; absent or invalid, the reviewer inherits the session model. It is only effective on the Claude Code `Agent`-dispatch path — on the inline / Codex fallback path the executing agent's own model governs.Files:— a comma- or newline-separated list of repo-relative file paths. When present, § 1. Prepare narrows the changed-file set to its intersection with the diff's changed files, so the review covers only those; absent or invalid, all changed files are reviewed. An empty intersection fires § 1. Prepare'sNo changed filesearly exit (a loudno-issues), so an empty scope never silently passes.
Dispatch authorization
This skill's procedure dispatches subagents, so invoking the skill is the request to use that mechanism: an ambient instruction allowing subagent dispatch only when the user asked for it — a permission-shaped restriction — is already satisfied by this invocation. Do not ask the user to re-confirm the dispatch, and do not silently substitute inline execution for a dispatch this procedure specifies. Only two things justify that substitution: technical availability (the dispatch tool is not present and callable on the current tool surface), and an explicit contract term from the caller bounding this skill to its own thread. A permission-shaped restriction is neither.
Processing Flow
1. Prepare
- Parse
--base-commit <sha>from$ARGUMENTS; if not provided, usegit rev-parse HEAD~1. Parse the optionalModel:andFiles:values per § Usage - Get changed files:
git diff --name-only <base-commit>. WhenFiles:was provided, narrow this set to its intersection with the parsed paths (repo-relative match). Every downstream step operates on this possibly-narrowed set - If no changed files, output
No changed filesas the final prose result, then emit the verdict per## Return contractand end the processing flow
2. Collect Rules
- Find rule files:
Glob(".claude/rules/**/*.md"). AlsoGlob(".claude/rules-extras/**/*.examples.md") - Exclude
*.examples.mdfrom the check targets. Keep them in step 1's path lists — § 5. Review's pre-split fallback reads the co-located ones from there - If the check targets are empty after step 2's exclusion — output
No rule files found in .claude/rules/as the final prose result, then emit the verdict per## Return contractand end the processing flow
3. Match Rules to Changed Files
For each rule file:
- Read the file and parse YAML front-matter for
paths:globs - If
paths:exists: match each glob against the changed file list. If at least one changed file matches, include this rule - If
paths:does not exist (e.g.,project.md): apply to all changed files - Record which changed files each rule applies to
4. Group Rules by Category
Group matched rules into categories based on their directory path:
- project: Files directly under
.claude/rules/(e.g.,project.md,project.local.md) - {subdirectory}: Files under
.claude/rules/{subdirectory}/(e.g.,languages,frameworks, or any custom directory)
Within a category, group related rules by filename prefix into families (rails.md, rails-controllers.md, rails-models.md = one family).
Grouping policy (deterministic):
- Default: 1 group per category (one Agent per category).
- Split a category by family only when it contains more than 3 matched rule files. A family of more than 3 matched files is its own group. Pack the other families in filename order, starting a new group once the current one holds 3 or more files. Never split a family across groups.
- Never merge across categories, even if each category has only 1 rule file.
- Discard empty groups.
If no rules matched any changed files, output No applicable rules for changed files as the final prose result, then emit the verdict per ## Return contract and end the processing flow.
5. Review
Launch one reviewer per group through the current host's reviewer-dispatch mechanism, in parallel where the host allows it:
- Claude Code path: when the
Agenttool is exposed and callable and no caller-imposed nesting bound applies (see the Fallback path bullet), launch one reviewerAgentper group — passing the parsedModel:value (§ 1. Prepare) as theAgentmodelparameter when present, omitting it when absent (inherit). - Codex path: when Codex exposes a subagent / delegation mechanism in the current session, launch one reviewer per group through that mechanism.
- Fallback path: when no host-provided reviewer dispatch is available — the
Agenttool is absent from the tool surface (e.g. a nested subagent context), or the invoking request explicitly bounds this skill to its own thread (a caller-imposed nesting bound) — execute the same reviewer prompt inline sequentially for each group; the current agent acts as the reviewer, reading the embedded rules / examples / diff and producing the reviewer report in the same format. Decide by whetherAgentis exposed and callable and whether such a bound applies, not by invocation lineage: being invoked as a sub-skill does not trigger this path, and neither does a permission-shaped restriction (see§ Dispatch authorization).
Detect availability by inspecting the current tool surface. Do not attempt speculative tool calls just to probe availability. Do not substitute claude -p, codex, or other external CLIs; the inline path is the defined fallback. Collect results identically in all paths.
No stall after dispatch: once the reviewer Agents are launched (Claude Code path) or the subagent / delegation mechanism is invoked (Codex path), do not end the response with a status-only message such as "dispatched — will report when complete". Continue to § 6. Aggregate Results as soon as the dispatched reviewers' results are available in the same flow; a dispatch is not itself a stopping point.
Scoped re-check note: when Files: narrowed the changed-file set (§ 1. Prepare), append this sentence to the end of the reviewer prompt's **Scope** paragraph — This review is scoped to a caller-specified subset of the changed files. If you suspect a change in these files has a rule-relevant ripple effect on files outside this subset, raise it as a finding. Omit it when Files: was absent.
Each reviewer (dispatched or inline) receives the following prompt:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/rules-review/SKILL.md
Popularity
- Repository stars
- 47
- Repository forks
- 3
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hiroro-work/claude-plugins/rules-review)