code-qualitylisted
Install: claude install-skill smixs/code-quality-skill
# code-quality
## Overview
One script, `scripts/quality.ts`, called by every entry point. Only deterministic checks decide the exit code. Old debt lives in a baseline and does not block; a new finding on a changed line does. Jev (a classifier) and other reviewers write notes only.
| entry point | when | what runs | time |
|---|---|---|---|
| `pre-commit` | `git commit` | `check --staged` on the staged change | 10-20 s |
| `commit-msg` | `git commit` | AI attribution, glossary words in the message | < 1 s |
| `pre-push` | `git push` | tamper per pushed commit, tests touched by name and by import, diff coverage, Gitleaks, OSV audit | up to 1 min |
| agent Stop | the agent ends a turn | `check` against `project.base`; red = one round of fixes | 10-20 s |
| manual | before a large push, or to measure | full gate: tests with coverage, mean CRAP, worklist, hotspots | 3-6 min |
CRAP needs fresh lcov (`.scratch/quality/lcov.info` with a matching fingerprint). Without it a fast entry point prints `tests: not run, no fresh lcov` and judges complexity only. A change of docs and config only (`.md`, `.toml`, `.json`, `.yml` outside `project.src`) prints `scope: docs-only` and skips the code checks.
## Commands
```bash
Q=~/.claude/skills/code-quality/scripts/quality.ts
bun $Q install-hooks <repo> # core.hooksPath for that repo only; repo hooks keep working
bun $Q uninstall-hooks <repo> # put the previous core.hooksPath back
bun $Q --repo <repo> --update-baseli