From rules-review
Reviews git diff changes for compliance with .claude/rules/ files. Matches rules to changed files via globs, groups by category, parallel agent checks. Invoke /rules-review.
npx claudepluginhub hiroro-work/claude-plugins --plugin apply-rulesThis skill is limited to using the following tools:
Check code changes for compliance with `.claude/rules/` rule files.
Validates git changes against .hoyeon/rules/ checklists, reports PASS/WARN for missed cascading changes, and proposes new rules for unmatched patterns before push.
Reviews code against project rules and reference files, flagging violations in correctness, security, reliability, architecture, dead code, complexity, and conventions.
Conducts tiered code reviews for security (OWASP top 10), performance, and quality on staged git changes, PRs, or files before commits or releases.
Share bugs, ideas, or general feedback.
Check code changes for compliance with .claude/rules/ rule files.
/rules-review --base-commit <sha> # Check diff from specified commit
/rules-review # Check diff from HEAD~1
--base-commit <sha> from $ARGUMENTS. If not provided, use git rev-parse HEAD~1git diff --name-only <base-commit>Glob(".claude/rules/**/*.md")*.examples.md from the check targets (they are reference material, not enforceable rules)For each rule file:
paths: globspaths: exists: match each glob against the changed file list. If at least one changed file matches, include this rulepaths: does not exist (e.g., project.md): apply to all changed filesGroup matched rules into categories based on their directory path:
.claude/rules/ (e.g., project.md, project.local.md).claude/rules/{subdirectory}/ (e.g., languages, frameworks, integrations, or any custom directory)Within a category, group related rules by filename prefix into families (e.g., rails.md, rails-controllers.md, rails-models.md = one family). Keep related rules together for consistent judgment.
Discard empty groups. If a group is too large for a single agent, split by family. If groups are small enough, merge into a single group.
If no rules matched any changed files, output "No applicable rules for changed files" and stop.
Launch one Agent per group in parallel (use a single message with multiple Agent tool calls).
Each Agent receives the following prompt:
You are a rules compliance reviewer. Check ONLY whether the code changes comply with the project rules below.
Do NOT report general code quality, bugs, or design issues — only check what is explicitly stated in the rules.
## Rules to Check
<Rule file contents with file paths>
## Reference: Code Examples
<Corresponding .examples.md content, if available>
## Diff to Review
<Scoped git diff for the matched files>
## Report Format
For each violation, report:
- **Rule file**: <.claude/rules/... path>
- **Violated rule**: <exact rule text>
- **Location**: <file:line>
- **Description**: <what violates the rule and why>
- **Suggested fix**: <specific fix to become compliant>
If no violations are found, respond with exactly: "No violations found"
Before launching Agents, prepare the data to embed in each prompt (do NOT rely on Agents running git commands themselves):
git diff <base-commit> -- <matched-files> and capture the output.examples.md exists (same basename, e.g., rails-controllers.md → rails-controllers.examples.md) and read its contentFor each Agent:
description to the group category name (e.g., "Review rules: frameworks")All rules compliant
## Rules Compliance Violations
### .claude/rules/frameworks/rails-controllers.md
- **Violated rule**: <rule text>
- **Location**: app/controllers/users_controller.rb:15
- **Description**: <description>
- **Suggested fix**: <suggestion>
### .claude/rules/languages/ruby.md
- **Violated rule**: <rule text>
- **Location**: app/models/user.rb:42
- **Description**: <description>
- **Suggested fix**: <suggestion>