From canonify
Audit the current diff against the canonical patterns in CANONIFY.md and the docs it points to. Run when the user types /canonify:commit or asks to check before committing/pushing/deploying/shipping, verify the changes, or perform similar pre-commit verification. Mirrors the plan-time CANON routing - same selector, opposite direction.
How this skill is triggered — by the user, by Claude, or both
Slash command
/canonify:commitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The **Commit** gate of **Canonify** - the last of three lifecycle gates, all routing through `CANONIFY.md`. Same routing logic as `/canonify:build`, opposite direction:
The Commit gate of Canonify - the last of three lifecycle gates, all routing through CANONIFY.md. Same routing logic as /canonify:build, opposite direction:
/canonify:build): task description -> match CANONIFY.md summary lines -> load implicated docs -> write code following the canonical patterns./canonify:commit): diff -> match the same summary lines -> load the same implicated docs -> check the diff against the rules in those docs.This skill does pattern adherence only. It does NOT check scope creep, intent, or "did we build the right thing." It checks "did we follow the canonical patterns the docs document."
Refresh the routing map. Read CANONIFY.md at the repo root. Note the one-line summaries for every doc - those are the routing signals.
Get the diff. In parallel:
git diff (unstaged changes)git diff --cached (staged changes)git status (to see new files not yet diffed)Combine into a working set of touched files and the actual line changes.
Walk every CANONIFY.md summary line and ask whether the diff touches that area. This is the inverse of the plan-time read: the summaries are the complete checklist of doc-covered patterns; iterate over them so nothing slips by.
For each doc-summary line in CANONIFY.md:
Output a short routing table before continuing to step 4:
Implicated: <doc-a>.md, <doc-b>.md, <project-wide-rules>.md
Skipped: <doc-c>.md (no matching surface in the diff)
<doc-d>.md (no matching surface in the diff)
<doc-e>.md (no matching surface in the diff)
The "Skipped" list proves the audit considered every doc and consciously dropped it - not that the doc was forgotten.
Load the implicated docs in parallel. Read each one. Pay attention to:
Check the diff against each rule. For each rule the implicated canons document, evaluate whether the diff complies. The canons hold the authoritative rules - re-read them at runtime; do not carry a hardcoded rule list in this skill.
Report findings. Group output by doc, then by rule. For each finding:
file:line reference into the diffEnd with a one-line summary: how many docs were checked, how many rules, how many findings.
Offer to capture canon drift (the loop's feedback edge). Sometimes the diff doesn't violate
the canon - it reveals the canon is behind: the change intentionally and consistently diverges
from a documented rule (the pattern moved on), or it surfaced a real footgun the canon never
mentions. When you see that, don't file it as a violation - note it and offer one line:
"<canon> looks behind the code here (). Capture it with /canonify:update-canon?" An
offer, never an auto-edit - the user decides whether the canon or the diff is the source of truth.
Note: in some repos, git push triggers a deploy (e.g. pushing to the default branch). Treat this gate as a real safety check, not a soft suggestion - it may be the last review before changes reach production.
## /canonify:commit - pattern adherence audit
Files touched: <N>
### Routing - CANONIFY.md summary sweep
Implicated:
- <doc-a>.md - <one-line reason: which area in the diff touched this doc>
- <doc-b>.md - <one-line reason>
Skipped:
- <doc-c>.md - <one-line reason it doesn't apply>
- <doc-d>.md - ...
### Findings
#### <doc-a>.md
- pass <Rule>: <one-line evidence>
- violation <Rule>: <what's wrong> @ `path/to/file:42`
- Fix: <one-line>
- uncertain <Rule>: <why uncertain> @ `path/to/file:N`
#### <doc-b>.md
...
### Summary
<N> docs swept, <M> implicated. <K> rules checked. <V> violations, <U> uncertain. <Free to commit | Address findings above before committing>.
<optional, only if a canon looks behind the code:>
Canon drift: <canon>.md may be behind the diff (<what changed>). Capture with /canonify:update-canon?
Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub ewebdzine/canonify --plugin canonify