convention-audit
Skill16 starsChanged 25 days agoMITView on GitHub
Audit repository code against `.claude/conventions/` in full or incremental mode while maintaining bounded coverage checkpoints. Use when asked to inspect convention violations, establish a complete convention baseline, continue a recurring or daily convention audit, or report and safely fix convention drift.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- EtanHey/golemstheir own version, first seen Oct 28, 2026
- 5hseok/hanipman-gatetheir own version, first seen Oct 20, 2026
- ChenyCHENYU/Robot_Admintheir own version, first seen Oct 8, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- ChenyCHENYU/Robot_Admin★ 1ksame name
- 5hseok/hanipman-gate★ 0same name
- EtanHey/golems★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/conventions/AGENTS.mdAGENTS.md
- python/AGENTS.mdAGENTS.md
- swift/AGENTS.mdAGENTS.md
- typescript/AGENTS.mdAGENTS.md
- .claude/conventions/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- python/CLAUDE.mdCLAUDE.md
- swift/CLAUDE.mdCLAUDE.md
- typescript/CLAUDE.mdCLAUDE.md
- add-conventionSkill
- ci-optimizationSkill
- code-reviewSkill
- create-prSkill
- dependabot-alertsSkill
- e2e-debuggingSkill
- frontend-designSkill
- github-markdown-bodiesSkill
- living-spec-auditSkill
- openapi-client-genSkill
- python-dependency-managementSkill
- python-dependency-tree-analysisSkill
- python-dependency-updateSkill
- python-quality-checkSkill
- ship-featureSkill
- ship-prSkill
- skill-creatorSkill
- spec-reviewSkill
- stacked-prsSkill
- technical-feature-designSkill
- typescript-dependency-tree-analysisSkill
- typescript-dependency-updateSkill
- typescript-quality-checkSkill
- ui-visual-reviewSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 20 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run commands from the repository root.
- Distinctive: line 14
Keep the audit checkout at the planned commit until checkpoint completion.
- Distinctive: line 22
Use full mode only when the requester asks for one complete audit at a single commit.
- Distinctive: line 36
Use incremental mode for recurring audits.
- Distinctive: line 40
every tracked file changed since the last successful change checkpoint.
- Very specific: line 68
Treat never_checked_ranges, stale_ranges, and overdue_ranges as outstanding coverage.
- Distinctive: line 90
Read the applicable AGENTS.md files and convention index.
- Distinctive: line 91
Use convention titles to identify rules relevant to the files under inspection.
- Distinctive: line 92
Read the relevant convention bodies before judging compliance.
- Distinctive: line 94
Run deterministic checks first: existing linters, type checkers, tests, targeted grep, or AST-aware tools.
- Distinctive: line 101
Do not treat generated, vendored, or explicitly excluded code as manually editable.
- Distinctive: line 102
Follow the owning path's repository instructions when deciding whether a convention applies.
- Distinctive: line 125
If there are no findings, state that explicitly.
- Distinctive: line 146
Create a repository issue only for a true blocker that needs durable handoff.
- Distinctive: line 152
every confirmed code location.
- Very specific: line 158
Write the issue body to a temporary Markdown file and pass it with --body-file.
- Distinctive: line 159
Do not build multiline issue text in an inline shell argument.
- Distinctive: line 176
all work represented by the plan is complete.
- Distinctive: line 178
every actionable finding has been corrected, validated, and submitted through the required pull request or pull request stack.
- Distinctive: line 180
every true blocker has been reported and any required handoff issue has been created successfully.
- Distinctive: line 191
After completion writes the state file, submit that checkpoint change through the normal pull request workflow.
- Distinctive: line 201
Do not complete a partially executed or failed plan.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Convention Audit
Audit tracked repository files against the convention bodies referenced by
.claude/rules/*-conventions.md. Keep only coverage checkpoints in
.claude/convention-audit-state.json; keep findings and reasoning out of that file.
Run commands from the repository root.
Keep the audit checkout at the planned commit until checkpoint completion. If fixes are needed, create them in a separate worktree so that opening a fix pull request does not move or dirty the audit checkout.
Select a mode
Full audit
Use full mode only when the requester asks for one complete audit at a single commit. Recurring audits can bootstrap incrementally from an empty checkpoint.
Full mode checks every current audit range at one target commit. Do not complete the plan unless every planned range was inspected.
python .agents/skills/convention-audit/scripts/audit_state.py plan \
--mode full \
--output /tmp/convention-audit-plan.jsonIncremental audit
Use incremental mode for recurring audits.
Incremental mode checks:
- every tracked file changed since the last successful change checkpoint; and
- enough full ranges to refresh all current ranges within the target rotation period.
python .agents/skills/convention-audit/scripts/audit_state.py plan \
--mode incremental \
--rotation-days 30 \
--output /tmp/convention-audit-plan.jsonThe planner computes ceil(current ranges / rotation days) and selects
never-checked ranges first, then stale convention rulesets, then the
least-recently checked ranges. Use --range-limit N only when a caller needs an
explicit fixed limit.
Incremental mode may start with no prior checkpoint. The first completed plan establishes the change checkpoint while leaving uninspected ranges visibly unchecked. Later runs check every changed file since that checkpoint in addition to the rotation ranges. Never invent or manually advance the starting commit.
Inspect rotation health at any time:
python .agents/skills/convention-audit/scripts/audit_state.py status \
--rotation-days 30Treat never_checked_ranges, stale_ranges, and overdue_ranges as outstanding
coverage. max_range_age_days reports the oldest completed range checkpoint.
Inspect the plan
The plan is disposable execution data and must stay outside the repository.
changed_checkscontains exact changed files grouped by automatically assigned repository range.full_rangescontains every range for full mode.legacy_rangescontains the bounded full-range work selected for incremental mode.- Each range includes its exact tracked files and the convention body paths that may apply.
New files require no manual shard assignment. The planner derives a path-based base range and a deterministic hash bucket from each tracked path. It reconciles added or removed ranges automatically, and each bucket remains bounded as the repository grows.
For each planned range:
- Read the applicable
AGENTS.mdfiles and convention index. - Use convention titles to identify rules relevant to the files under inspection.
- Read the relevant convention bodies before judging compliance. Do not bulk-read unrelated bodies.
- Run deterministic checks first: existing linters, type checkers, tests, targeted grep, or AST-aware tools.
- Perform semantic inspection only where automated evidence is insufficient.
- Ground every finding in an exact convention and code location.
Inspect only the exact files listed for each changed-file or full-range check.
Do not treat generated, vendored, or explicitly excluded code as manually editable. Follow the owning path's repository instructions when deciding whether a convention applies.
Report and fix
Report inspection details to the current conversation context. Use this structure:
## Convention Audit
- Mode: full | incremental
- Target commit: `<sha>`
- Ranges checked: `<ranges>`
- Changed files checked: `<count>`
### Findings
- **<severity> — `<file>:<line>` — `<convention path>`**
<grounded explanation and recommended correction>
### Result
<finding count, fixes created, and remaining uncertainty>If there are no findings, state that explicitly. Do not create placeholder issues or changes.
Classify each finding by whether the required correction is already authoritative:
- Actionable finding: current conventions, requirements, specs, and ADRs establish the expected behavior. Correct it during the audit workflow, validate it, and create the required pull request or pull request stack.
- True blocker: the correction requires a material product-behavior decision, the applicable convention is incorrect or contradicts another authority, required requester authority or information is unavailable, or an external prerequisite prevents execution. Report the blocker and request the missing decision or prerequisite.
- Likely false positive: evidence shows the convention does not apply. Report the reasoning without editing code or creating an issue.
Work size, affected-file count, cross-module coordination, test burden, and ordinary regression risk do not turn an actionable finding into a blocker. Split large corrections into bounded focused or stacked pull requests and continue until the planned remediation is implemented and validated.
Create a repository issue only for a true blocker that needs durable handoff. Do not use an issue to defer an actionable finding.
For a handoff issue, include:
- the exact convention path and requirement;
- every confirmed code location;
- severity and concrete impact;
- the exact product decision, convention correction, authority, information, or external prerequisite that is missing;
- a suggested remediation direction and the audited commit.
Write the issue body to a temporary Markdown file and pass it with --body-file.
Do not build multiline issue text in an inline shell argument.
gh issue create \
--title "chore(conventions): <concise violation summary>" \
--body-file /tmp/convention-audit-issue.md
rm /tmp/convention-audit-issue.mdReport the created issue in the current conversation. Never place findings, excerpts, reasoning, issue or pull request identifiers, or conversation identifiers in the audit state file.
Complete the checkpoint
Advance the checkpoint only after:
- all work represented by the plan is complete;
- the result has been successfully reported to the current conversation; and
- every actionable finding has been corrected, validated, and submitted through the required pull request or pull request stack;
- every true blocker has been reported and any required handoff issue has been created successfully; and
- any other intended pull request has been created successfully.
A completed checkpoint means that the range was inspected, not that it is free of violations. Advance the checkpoint for a confirmed unresolved finding only when a true blocker prevents correction and its required handoff succeeds. Keep the plan incomplete while an actionable finding remains deferred, including when the remaining work is large or carries ordinary regression risk.
The planner and completion command reject tracked working-tree or index changes. After completion writes the state file, submit that checkpoint change through the normal pull request workflow. It may be copied into a related focused fix pull request, or submitted as a state-only pull request when there is no code correction.
python .agents/skills/convention-audit/scripts/audit_state.py complete \
--plan /tmp/convention-audit-plan.json
rm /tmp/convention-audit-plan.jsonDo not complete a partially executed or failed plan. The completion command rejects plans when the plan payload, repository HEAD, convention revision, or state file changed after planning.
State boundaries
.claude/convention-audit-state.json is a bounded snapshot, not a run log.
It stores only:
- the latest successfully checked commit, time, and rulesets for changed files;
- current repository ranges; and
- each range's latest checked commit, time, and convention revision; and
- one deduplicated convention-path manifest per referenced ruleset revision.
Ranges reference ruleset revisions instead of repeating convention paths. State reconciliation prunes ranges and ruleset manifests that are no longer referenced. Inspection content belongs in the current conversation, true blockers that require durable handoff belong in repository issues, and actionable corrections belong in pull requests.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

