Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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:

  1. 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.
  2. 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.
  3. CI required check (ci.yml) — runs the same just verify as the unbypassable backstop. Local hooks can be skipped (--no-verify, lefthook install not 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/pnpm uses 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 shared just recipes — 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

  1. Copy ${CLAUDE_PLUGIN_ROOT}/templates/justfile and ${CLAUDE_PLUGIN_ROOT}/templates/lefthook.yml to the repo root.
  2. 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 the kiosk TS dir in lefthook.yml, and point test at your runner. The tools need their config present — ruff/mypy read pyproject.toml, eslint/tsc need their configs, prettier is 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 and just verify silently passes without checking anything — the no-op gate this stack exists to prevent. Edit the recipes to cd into 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.
  3. Install the tools once and enable the hooks:
    brew install just lefthook   # or: cargo install just; npm i -D lefthook
    lefthook install             # wires .git/hooks → lefthook
    
    Add these to the project README so contributors do the same.
  4. Make sure ci.yml (from the branch-promotion-model templates) is present and calls just verify — that's the unbypassable backstop and the parity anchor. Mark its ci job a required status check (see github-repo-setup).
  5. Document the rules in the project `C
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

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

Сравнить quality-stack-setup с