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★ 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 mainforcmd/*). Be honest: if a package is only amain()wiring flags + I/O into already-testedinternal/packages, it has no testable seam — leave it and say so. A fabricatedassert truetest 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 atestsunit). This is real refactoring: do it in ONE lane, keep behavior identical, and validate hard. If you can't do it safel
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Bash - 03
Write - 04
Edit - 05
Grep - 06
Glob
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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…