quality-stack-setup
БесплатноБез исполняемых скриптовНе проверенUse when setting up a repo's lint / static-analysis / test tooling — wiring lefthook git hooks (pre-commit auto-fixers + pre-push full verify) and a justfile…
от schuettc★ 15 звёзд на GitHubОб этом скилле
Quality stack setup
The stack (language-agnostic)
The point of this stack is AI-slop resistance: deterministic guardrails so generated code can't land unformatted, untyped, dead, duplicated, or untested. The tools change per language; the guardrail categories don't.
| Guardrail | Python | TS/JS | Catches the slop symptom |
|---|---|---|---|
| Format | ruff format | prettier | inconsistent style (auto-fixed) |
| Lint | ruff | eslint | error-prone patterns, unused code |
| Type-check | mypy | tsc --noEmit |
hallucinated APIs, wrong shapes |
| Static analysis | skylos | fallow | dead code, complexity, clones, secrets, AI regressions |
| Test + coverage | pytest --cov |
vitest/jest --coverage |
untested generated code |
Other languages wire the same categories (golangci-lint + gofmt, clippy + rustfmt, …).
The architecture: one definition, three callers
The checks are defined once, in a justfile. Everything else just calls those recipes, so local and CI run identical commands with the project's own pinned tools — parity is structural, not maintained.
just verify=format-check+lint+typecheck+test(+coverage). The full gate.just fix= auto-format + lint---fix. The fast pre-commit layer.
Three callers, earliest first:
- pre-commit (lefthook) — fast auto-fixers on staged files (format, lint
--fix) + the staged-file static scan (skylos/fallow). Fixes what it can; kept fast so nobody reaches for--no-verify. - pre-push (lefthook) — runs
just verify: the whole-project gate (type-check + tests + coverage can't be scoped to staged files, so they belong here, not on every commit). Catches slop before it leaves your machine, for humans and Claude alike. - CI required check (
ci.yml) — runs the samejust verifyas the unbypassable backstop. Local hooks can be skipped (--no-verify,lefthook installnot run); a required status check cannot.
Because pre-push and CI invoke the identical just verify, "passed locally → passes in CI" holds by construction. Prove the hooks actually fire (a hook that doesn't fail on bad input is not a hook) with /quality-verify-hook.
Why lefthook + just, not the pre-commit framework: the pre-commit framework installs tools into its own pinned envs, which can drift from the versions CI uses — the exact "passed locally, failed in CI" failure we're killing.
just-calls-uvx/pnpmuses the project's pinned tools everywhere. And whole-project checks (typecheck, full test suite) don't fit pre-commit's per-file model. lefthook (fast, parallel, language-agnostic, single binary) dispatches stages and calls the sharedjustrecipes — the right tool for this shape.
Why
Real working setup (now-playing repo). skylos's agent pre-commit mode is built for AI-assisted development — it scans staged files for AI-introduced regressions (security, secrets, prompt-injection, dependency hallucinations); fallow does the equivalent for TS/JS. The original gap that motivated all this: a Phase-3 cleanup regressed on a gh pr merge because the local hook never fired on that path. The fix that actually closes it is the CI required check running just verify — the merge can't complete until it's green — backed by lefthook catching it earlier on commit/push.
How to apply
Install the stack
- Copy
${CLAUDE_PLUGIN_ROOT}/templates/justfileand${CLAUDE_PLUGIN_ROOT}/templates/lefthook.ymlto the repo root. - Adjust both to the project's languages: the recipes auto-detect Python (
pyproject.toml) and TS/JS (package.json); delete the language commands you don't use, fix thekioskTS dir inlefthook.yml, and pointtestat your runner. The tools need their config present —ruff/mypyreadpyproject.toml,eslint/tscneed their configs,prettieris configless by default.- Subdir / monorepo layout (no root manifest): the justfile's
[ -f pyproject.toml ]guards check the repo root. If code lives in subdirs (each with its own manifest) and there's no root one, the guards are false andjust verifysilently passes without checking anything — the no-op gate this stack exists to prevent. Edit the recipes tocdinto each subdir (e.g.cd packages/api && uv run pytest), then run/quality-verify-hook, which stages a known-bad fixture and will catch a recipe that no-ops instead of failing.
- Subdir / monorepo layout (no root manifest): the justfile's
- Install the tools once and enable the hooks:
Add these to the project README so contributors do the same.brew install just lefthook # or: cargo install just; npm i -D lefthook lefthook install # wires .git/hooks → lefthook - Make sure
ci.yml(from the branch-promotion-model templates) is present and callsjust verify— that's the unbypassable backstop and the parity anchor. Mark itscijob a required status check (seegithub-repo-setup). - Document the rules in the project `C
Установить quality-stack-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл quality-stack-setup?
Use when setting up a repo's lint / static-analysis / test tooling — wiring lefthook git hooks (pre-commit auto-fixers + pre-push full verify) and a justfile that is the single source of truth both the hooks and CI call, so local checks and CI can't drift. Language-agnostic: ruff/skylos for Python, prettier/eslint/fallow for TS/JS, same pattern for any language. Installs the tooling; ongoing operation lives in quality-workflow (/quality-audit, /quality-unblock, /quality-verify-hook) and the standing suppression rule in suppression-discipline.
Как установить скилл quality-stack-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл quality-stack-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic