aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-20 09:47:13 -0500
committerCraig Jennings <c@cjennings.net>2026-05-20 09:47:13 -0500
commitb9da9b5142f1d343378e8d4f5aa6780ee8728cd4 (patch)
tree84d9674cb3974b9d74f980742a52139fb76e395b
parent5737cc0ca1725c1ea08f28cf60048ab3a3adec7c (diff)
downloadrulesets-b9da9b5142f1d343378e8d4f5aa6780ee8728cd4.tar.gz
rulesets-b9da9b5142f1d343378e8d4f5aa6780ee8728cd4.zip
refactor(skills): convert review-code from command to skill
review-code was a command with disable-model-invocation set, so the model could never reach for it on its own. Every time a review fit the moment, the agent had to hand back to me to type the slash command. Moving it to a skill makes it model-invocable while it stays slash-invocable as /review-code. git mv keeps the file history (99% rename). The frontmatter drops disable-model-invocation and gains name: review-code; the body is unchanged. It also drops the discovery-check paragraph in commits.md, which only existed to find the command on disk when it was missing from the skills list, moot now that the skill shows up there.
-rw-r--r--claude-rules/commits.md2
-rw-r--r--review-code/SKILL.md (renamed from .claude/commands/review-code.md)4
2 files changed, 2 insertions, 4 deletions
diff --git a/claude-rules/commits.md b/claude-rules/commits.md
index 41d17e7..9e1a8e0 100644
--- a/claude-rules/commits.md
+++ b/claude-rules/commits.md
@@ -272,8 +272,6 @@ Run the `review-code` skill against the change:
- Before a PR: `/review-code` (branch diff against `main` merge-base)
- Before commenting on someone else's PR: `/review-code <PR#>`
-**Discovery check.** If `/review-code` doesn't appear in the session's available-skills list, check `~/.claude/commands/review-code.md` and `./.claude/commands/review-code.md` on disk before declaring it unavailable. The available-skills enumeration covers plugin-installed skills but can miss user commands under `~/.claude/commands/`, which are still routable as slash-commands. If either file exists, surface the discrepancy to the user before falling through to the trivial-one-liner exception in Step 2 — don't auto-skip.
-
Surface **all** findings to the user: Critical, Important, and Minor.
**Default block:** any Critical or Important finding stops the flow. Fix the
diff --git a/.claude/commands/review-code.md b/review-code/SKILL.md
index ff32a1e..84a28e5 100644
--- a/.claude/commands/review-code.md
+++ b/review-code/SKILL.md
@@ -1,9 +1,9 @@
---
+name: review-code
description: Review code changes against engineering standards. Accepts a PR number, a SHA range (BASE..HEAD), the current branch's diff against main, staged changes, or a described scope ("the last 3 commits"). Audits CLAUDE.md adherence (reads root + per-directory CLAUDE.md), intent-vs-delivery (when given a plan/ADR/ticket), security, testing (TDD evidence + three-category coverage), conventions (conventional commits + no AI attribution), root-cause discipline, architecture (layering + scope), API contracts. Produces a structured report — Strengths, per-criterion PASS/WARN/FAIL, per-issue Critical/Important/Minor severity — ending with an explicit verdict (Approve / Request Changes / Needs Discussion) plus 1-2 sentence reasoning. Self-filters low-confidence findings; never flags pre-existing issues, lint/typecheck issues (CI handles those), or changes on unmodified lines. Use before merging a PR, before pushing a branch, or when reviewing a teammate's work. Do NOT use for proposing features (use brainstorm or arch-design), drafting implementation (use start-work or add-tests), standalone security audits (use security-check), or narrow style-only checks (a linter handles those).
-disable-model-invocation: true
---
-# /review-code
+# Review Code
Review code changes against engineering standards. Produce a structured report with strengths, per-criterion audit, severity-tagged issues, and an explicit verdict.