Command Palette

Search for a command to run...

Назад к скиллам
скилл № 81625

quality-score

One repeatable RSI pass over CODE quality — the code-side counterpart of refresh-readme. Runs the code-quality scorecard (tools/code_quality_scorecard.py)…

БесплатноБез исполняемых скриптов
anthony-chaudharyот anthony-chaudhary★ 50 звёзд на GitHub

Установить quality-score в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

/quality-score — make "better code" provable, then prove it moved

What this does. The docs have a measuring stick (docs_scorecard.py + /refresh-readme); until this skill, the Go code had none — so "cleaner code", "better architecture", "more tested" were unfalsifiable claims with no number to move. This is the code's checking layer. It makes "improve the code" a repeatable, evidence-grounded pass: measure the code-debt, retire it worst-first with safe genuine fixes, then re-measure to prove the number dropped — and ground the proof in DOS, not in a sentence.

The shape: run the scorecard → read the code-debt work-list → retire debt worst-first (safe classes only) → re-measure and prove the drop → DOS-witness the commit → commit ONLY your lane by explicit path.

The headline metric is code-debt: the count of concrete, re-derivable HARD defects across ten KPIs. The program target is the code-2x: halve code-debt, then halve again — recursive self-improvement with a number that can't lie, because every unit is re-derived from disk and the Go toolchain on each pass.


The measure (ten KPIs, each 0–100, deterministic — same tree → same score)

tools/code_quality_scorecard.py folds these into a composite score + the code-debt integer. HARD KPIs emit code-debt (they gate ok); SOFT KPIs score but never gate.

KPI HARD/SOFT one unit of code-debt is…
build HARD go build ./... does not exit 0
vet HARD a go vet ./... diagnostic
format HARD a file gofmt -l reports as unformatted
deps HARD an external require in go.mod (or a present go.sum) — the zero-dep invariant broke
honesty HARD a - [ line in CLAIMS.md not carrying exactly one [SHIPPED]/[SIMULATED]/[STUB] tag
architecture HARD an egregious god-file (>1500 lines) or god-function (>200 lines)
tests HARD a non-trivial package (≥4 funcs) with zero _test.go
ship_integrity HARD a RESIDUAL commit in dos review — a claim the diff could not witness
godoc SOFT an undocumented exported symbol (advisory — see anti-gaming)
hygiene SOFT a TODO/FIXME/HACK/XXX marker in shipped code (advisory — see anti-gaming)

godoc and hygiene are SOFT on purpose. The cheap way to move either is gaming, not quality: doc-comment spam (// X does X) for godoc, and DELETING a // TODO (hiding the gap, not closing it) for hygiene — and this repo keeps an honest [STUB] ledger where a "TODO: implement" marker is a feature of that honesty. They score (a doc-poor or marker-heavy tree grades lower) but they never gate, so the pass is never rewarded for cosmetic churn. Same WARN/HARD split docs_scorecard draws for jargon.


Step 1 — Run the scorecard (it builds your work-list)

From the repo root:

python tools/code_quality_scorecard.py            # human scorecard (per-KPI + work-list)
python tools/code_quality_scorecard.py --json     # machine payload (the loop uses this)

It exits non-zero whenever code-debt > 0. Read corpus.score, corpus.code_debt, and corpus.breakdown (per-KPI debt, worst first). The per-KPI defects arrays ARE the work-list.

Fast/static-only mode (skips go build/vet/gofmt): --no-toolchain. Skip the DOS probe: --no-dos. The default (full) is what you commit against.

Record the baseline. Before touching anything, write down code_debt = N and score = S. The whole point is to prove the delta, so you need the before-number.

Step 2 — Retire code-debt worst-first, using SAFE GENUINE classes only

Attack the heaviest KPI first (corpus.breakdown[0]), but only via fixes that are safe on a shared trunk and genuine (they improve the code, not just the number). In rough order of safety:

  • format (safest). gofmt -w <the flagged files>. Semantics-preserving; go build ./... stays green. Confirm only those files are clean and not peer-modified first (git status --short <files>).
  • tests (safe + high-value). For each untested package, find a PURE, deterministic function (math, parsing, formatting, scoring — no GPU, network, or model-file) and write ONE real, table-driven test with assertions that can actually FAIL. Same package clause (package main for cmd/*). Be honest: if a package is only a main() wiring flags + I/O into already-tested internal/ packages, it has no testable seam — leave it and say so. A fabricated assert true test is worse than no test, and it is exactly the gaming the SOFT KPIs exist to refuse. Validate (Step 3) before trusting it.
  • vet / build. Fix the diagnostic at its cause; never silence it.
  • architecture (RISKY — care). Extract a god-function's body into a testable helper (which also retires a tests unit). This is real refactoring: do it in ONE lane, keep behavior identical, and validate hard. If you can't do it safel
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Read
  2. 02Bash
  3. 03Write
  4. 04Edit
  5. 05Grep
  6. 06Glob

FAQ

Что делает скилл quality-score?

One repeatable RSI pass over CODE quality — the code-side counterpart of refresh-readme. Runs the code-quality scorecard (tools/code_quality_scorecard.py), reads the code-debt work-list, retires debt worst-first using ONLY the safe, genuine classes (gofmt, real tests for untested packages, safe god-function extraction), re-measures to PROVE the number dropped, grounds the ship in DOS (dos commit-audit on the new commit, dos review for the ship_integrity KPI), and commits by explicit path. Use to baseline code quality, drive the code-2x program (halve code-debt, then. Use when this named workflow matches the task.

Как установить скилл quality-score?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл quality-score запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить quality-score с