Agent skill
ce-code-quality-auditor
Audit source and tests for ADR-030 anti-patterns, determinism failures, API-boundary violations, and test-helper leakage with Option A/B/C handling from the Test Quality Method.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/ce-code-quality-auditor
SKILL.md
CE Code Quality Auditor
This skill combines the Code Quality Auditor and Anti-Pattern Auditor roles from ADR-030.
Required references
docs/improvement/test-quality-method/README.md(canonical method + options)docs/improvement/test-quality-method/code_quality_auditor.md(code-quality prompt)docs/improvement/test-quality-method/anti_pattern_auditor.md(anti-pattern prompt)
Use this skill when
- Reviewing overall source/test quality before cleanup.
- Producing a findings-first anti-pattern report.
- Prioritizing quality issues by risk and blocker level.
Focus option handling
- Option A (Test-Focused): prioritize test anti-pattern analysis; run source-quality checks only when they explain test failures.
- Option B (Code-Focused): run the full code-quality gate pack and dead/private helper audits.
- Option C (Full Cycle): run Option A evidence pass and Option B gate pass, then combine results into one ranked proposal.
Core principles
- Determinism first: no unsilenced
random,time, or network dependencies. - Public-contract tests only: private-member access requires explicit allowlist.
- Assertion strength: favor behavioral assertions over shape/type-only checks.
- Marker/layer hygiene: test markers and suite placement must match behavior.
- No production test-helper exports from
src/.
Audit workflow
- Confirm the selected focus option (
A,B, orC). - Run anti-pattern detection:
python scripts/anti-pattern-analysis/detect_test_anti_patterns.py
python scripts/anti-pattern-analysis/scan_private_usage.py --check
python scripts/quality/check_no_test_helper_exports.py
- Run source-quality checks:
python scripts/quality/check_import_graph.py
python scripts/quality/check_docstring_coverage.py
python scripts/anti-pattern-analysis/analyze_private_methods.py
- Validate deprecation compliance:
$env:CE_DEPRECATIONS='error'
pytest tests/unit -m "not viz" -q
- Classify each finding:
- Severity: blocker/high/medium/low.
- Scope: source/test/docs/process.
- Action: remove/refactor/rewrite/test-add/update-allowlist.
Output contract
Report findings in this order:
- Blockers (must-fix now).
- High-risk defects.
- Medium/low hygiene improvements.
For each finding include:
- file path + line
- violated rule/ADR
- concrete remediation proposal
- selected focus option (
A,B, orC) and why the finding is in-scope
Constraints
- Analysis and planning focus; do not silently auto-fix large areas.
- Preserve CE-first boundaries (ADR-001 layering and public API policy).
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?