code-check
Use for code review, quality audits, SOLID/DRY consistency checks, pattern audits across the codebase, or verifying anti-pattern compliance across a scope.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 15
- Forks
- 1
01 前言 Front Matter
- name
- code-check
- triggers
- [ "code quality check", "audit the code", "quality audit", "anti-pattern scan", "solid check" ]
- description
- Use for code review, quality audits, SOLID/DRY consistency checks, pattern audits across the codebase, or verifying anti-pattern compliance across a scope.
- argument-hint
- scope: all | crate | path/to/dir
- user-invocable
- true
03 SKILL.md 正文
Codebase Health Auditor
Role: audit Grimoire code for Clean Code, SOLID, DRY, pattern consistency.
Workflow
- Fan out — launch one reviewer per audit dimension in parallel
- Audit — SOLID, DRY, smells, consistency, context-rule freshness
- Report — prioritized findings with file:line refs + remediation
Audit Dimensions
- SOLID — one responsibility per module, interface narrowness, dependency inversion
- DRY — knowledge duplication (MUST fix) vs incidental similarity (evaluate)
- Smells — long methods, god objects, primitive obsession, feature envy, message chains
- Consistency — error handling, async/await, naming, import strategy match existing patterns
- Context freshness — verify
subsystem-*.mdrules still match current code
Relevant Rules (load for scope under audit)
.claude/rules/quality-core.md— universal SOLID/DRY/YAGNI, severity tiers, review checklist.claude/rules/quality-rust.md— Rust block/warn-tier anti-patterns (.unwrap(),MutexGuard, blocking I/O,.clone()discipline, JoinSet, bounded channels).claude/rules/arch-principles.md— crate layout, pattern catalog, code style (descriptive type names, nomod.rs).claude/rules/subsystem-cli.md— CLI shell + single-table output rule.claude/rules/subsystem-cli-api.md— report data layer conventions.claude/rules/subsystem-file-structure.md— storage layout constraints (core and index; install-layout, vendor-path, state and anchor parts:subsystem-*.mdlisted there)
Tool Preferences
- Grep/Glob first — verify patterns before flagging
task duplo:diff— structural duplication scan (Rust-aware)cargo-geiger— unsafe code auditcargo-bloat— binary size hotspots
Output Format
## Codebase Health Report
### Executive Summary
**Health Score**: [A/B/C/D/F]
**Critical Issues**: [count]
### Pattern Violations
| Pattern | File:Line | Description | Remediation |
### SOLID Violations
| Principle | File:Line | Description | Remediation |
### Context Staleness
| Rule File | Stale Reference | Current State |
Constraints
- NO flagging incidental duplication as critical
- NO recommending public API breakage without migration
- ALWAYS provide specific file:line refs + concrete remediation
Handoff
- To Builder — with specific fixes + refactoring items
- To /hex-architect — for systemic architectural issues
$ARGUMENTS
04 同仓库更多 Skills
rca
Use when a bug ticket, GitHub issue or error report needs a root cause analysis before code is touched — "is this a bug", "why does this fail". Read-only. Gives a verdict (bug or not-a-bug kind), file:line evidence, ruled-out hypotheses, other affected sites, fix direction and size. A ticket, not a diff (hex-review).
fix
Use when a bug ticket or GitHub issue should go from report to an approved fix plan — "plan a fix", "fix this issue". Root-causes it via rca, then plans in plan mode with the failing regression test first. Routes to hex-plan instead when the fix is large or moves an interface contract.
p9-skill
Principle 9 differential fixture skill (v2).
p9-member
Bundle member skill for the Principle 9 fixture (v2).
p9-hookish
Hook-free skill carrying an ignored hook.toml (v2).
p9-skill
Principle 9 differential fixture skill (v1).