Automated summary
Runs `fallow audit` scoped to the changed files of a diff plus a `madge` circular-dependency snapshot, reporting only the quality issues (complexity, duplication, dead code, cycles) that the change itself introduces, as advisory output.
Strengths
- The "new-only" gate separates introduced findings from inherited debt, avoiding noise on a mature codebase
- JSON mode exposes a `verdict` field and `*_introduced` counters that are easy to read and quote in a PR
- The comparison base is auto-detected from the merge-base with the upstream branch or origin/main, and can be pinned explicitly
- Positioned as a complement to typecheck, lint and tests rather than a replacement for them
Limitations
- The npm script is deliberately non-blocking (forced exit 0), so the verdict is advisory unless the wrapper in package.json is removed
- Tightly coupled to the drizzle-cube repository: it relies on that project's npm scripts and an installed `fallow` binary
- The `madge` circular-dependency snapshot is informational only and does not feed the verdict
- The section describing `quality:heal` is truncated, so the remediation side is not usable as written
Use it after a refactor or feature touching several files, just before committing or opening a pull request.
Skip it for one-line fixes or documentation- and test-only edits, where the noise outweighs the value.
Security analysis
CautionThe skill is a documentation/process guide for a read-only static-analysis gate. It runs standard dev tooling (fallow audit, madge, npm scripts) that reads the repo and prints reports; the wrapper explicitly forces exit 0, so it cannot break builds. No destructive commands, no secret or token handling, no obfuscated payloads, no attempts to alter agent role or bypass safety. The only real concern is routine execution of unpinned npx packages, hence 'caution' rather than 'safe'.
- •Instructs running `npx madge@...` (unpinned, fetched at runtime) plus project npm scripts (`npm run quality`, `quality:health`, `quality:graph`), which executes third-party code and network fetches; low risk but a supply-chain surface worth noting.
- •Suggests `npx fallow dead-code --trace ...` as an ad-hoc command, another runtime-fetched package invocation.
- •References an external URL (https://www.drizzle-cube.dev/llms.txt) for documentation context — informational only, no data sent out.
- •Instructs running `npx madge` (an unpinned package fetched from the npm registry at runtime) for the optional graph/circular-dependency checks; this executes third-party code without a pinned version, though it is a well-known package and the usage is legitimate.
- •Directs the agent to fetch and review remote content from https://www.drizzle-cube.dev/llms.txt; ingesting arbitrary remote text into agent context is a mild prompt-injection / content-trust vector, not an exfiltration risk.
- •Relies on `npm run quality` / `quality:health` / `quality:graph` scripts defined in an unseen package.json, including a `sh -c 'fallow audit "$@"; exit 0'` wrapper; behavior depends on repo state not verifiable from this document.
Examples
I just refactored the query builder across a bunch of files. Check that this change didn't regress code quality before I open the PR.Is this PR clean? Run the quality gate and tell me which complexity, duplication or dead-code findings it actually introduced.Run the quality gate with JSON output and summarize the verdict plus the introduced vs inherited counts for my PR description.name: quality-gate
description: Use before finishing or opening a PR for a large / multi-file change to drizzle-cube, to ensure code quality does not regress. Runs fallow audit (complexity, duplication, dead code, circular deps scoped to the diff, reporting issues the change introduces) plus a madge circular-dependency snapshot. Report-only — it always exits 0 and never blocks; read the verdict as advice. Use when the user says "check quality", "make sure quality doesn't regress", "is this PR clean", or after a refactor touching many files.
Quality Regression Gate
A "don't make it worse" gate for drizzle-cube. The hard part of static analysis on a mature codebase is noise: there are already 373 high-complexity functions, 120 duplicate clone groups, and 20 circular dependencies. Reporting those on every change is useless.
The gate is built around one tool that solves this: fallow audit scopes analysis to
the changed files and distinguishes findings the change introduced from findings it
inherited. The default new-only gate fails only on introduced findings. That — and
only that — is what "quality doesn't regress" means here. Inherited debt is reported for
context but never blocks.
When to use
- After a refactor or feature touching several files, before committing / opening a PR.
- When the user asks to verify a change is clean or that quality hasn't regressed.
- NOT needed for one-line fixes or doc/test-only edits — the gate's value is on large diffs.
This gate is the static-analysis layer. It complements, and does not replace,
npm run typecheck, npm run lint, and npm test. For a full pre-PR check, run those too.
Documentation Context
If the change affects public docs, examples, or agent-facing guidance, review https://www.drizzle-cube.dev/llms.txt to understand the published documentation surface before reporting quality findings. Do not run this quality gate solely because of a one-line or documentation-only edit; the guidance above still applies.
The one command that matters
npm run quality # fallow audit, base auto-detected (merge-base vs main/origin)
fallow audit auto-detects the base as the git merge-base against the branch's upstream or
origin/main, so on a feature branch no argument is needed. To pin the base explicitly
(pass args through npm with --):
npm run quality -- --base main
npm run quality -- --base "$(git merge-base main HEAD)"
Report-only: npm run quality always exits 0 — it never fails the build. The wrapper
runs fallow audit and then forces a clean exit, so the gate is advisory, not blocking.
You still read the verdict (pass / warn / fail) and the introduced findings from
the report — treat a fail verdict as "worth a look / mention in the PR," not as a hard
stop. The verdict ignores inherited findings — watch for the line
audit gate excluded N inherited findings, which confirms pre-existing debt was not counted
against the change.
Want it to block again? Drop the
sh -c '… ; exit 0'wrapper in thequalityscript (package.json) back to plainfallow audit, or add--cifor a CI-friendly failing gate.
Reading the result precisely (JSON)
For an unambiguous machine-readable verdict, ask for JSON and read verdict +
attribution.*_introduced:
npm run quality --silent -- --format json
{
"verdict": "pass" | "warn" | "fail",
"attribution": {
"gate": "new-only",
"dead_code_introduced": 0, // <- these *_introduced fields drive the verdict
"complexity_introduced": 0,
"duplication_introduced": 0,
"dead_code_inherited": 8, // <- inherited: reported, never affects the verdict
"complexity_inherited": 17,
"duplication_inherited": 93
}
}
A clean change has all three *_introduced fields at 0 and verdict: "pass".
Supplementary snapshot (informational — do NOT gate on it)
quality:health has no new-vs-inherited attribution, so on this codebase it always reports the
full backlog. Use it to understand a finding or look at the whole picture — never as a
pass/fail signal:
npm run quality:health # fallow health: full complexity/duplication/maintainability score
Circular dependencies are covered by the gate itself — npm run quality (fallow audit) reports
them under "Structure" with introduced-vs-inherited attribution, and quality:health lists them
all. There is no separate circular-dependency script.
Occasional architecture check (madge, on demand)
fallow is the source of truth for circular dependencies and ignores import type cycles (not
runtime hazards). On the rare occasion you want either (a) a visual dependency graph, or
(b) to surface type-only import tangles that fallow deliberately hides, reach for madge
via npx — it is intentionally NOT a pinned dependency or part of the gate:
npx madge --circular --extensions ts,tsx src # includes type-only cycles (noisier)
npm run quality:graph # writes dependency-graph.svg (needs graphviz)
This is an exploratory tool, not a regression check — its output has no introduced-vs-inherited attribution and will always show the full inherited backlog.
Acting on a fail verdict
The gate is report-only, so a fail verdict doesn't stop anything — but the introduced
findings are still worth addressing (or calling out in the PR). fallow prints each with a
file:line and a docs link. Typical fixes:
| Introduced finding | What to do |
|--------------------|------------|
| Complexity (function over CRAP / cyclomatic / cognitive threshold) | Extract helpers; split the new function. Most drizzle-cube modules already follow a builder/planner split — mirror it. |
| Duplication (new clone group) | Hoist the shared logic. Note existing cross-engine clones in executors//adapters/ are inherited and expected — don't churn them. |
| Dead code (new unused export/file) | Delete it, or wire it up. Before deleting an "unused" export, confirm with npx fallow dead-code --trace <file>:<export> (a public API re-exported from an entry point can look unused). |
| Circular dependency | Break the cycle, usually by moving a shared type into a leaf types/* module. |
False positives
If a finding is genuinely a false positive (e.g. a public export consumed only by package consumers), suppress it inline rather than restructuring:
// fallow-ignore-next-line complexity
// fallow-ignore-next-line unused-dependencies
// fallow-ignore-file circular-dependencies
Prefer fixing over suppressing. Suppress only with a one-line reason, and never suppress to get a green gate on a finding you actually introduced.
How it's wired
fallow@2.95.0andmadge@8.0.0are pinned devDependencies (package.json).- Scripts:
quality,quality:health,quality:graph. - The
qualityscript issh -c 'fallow audit "$@"; exit 0' --— it runs the full audit (forwarding any-- …args) but always exits 0, making the gate report-only / advisory. To restore a blocking gate, change it back to plainfallow audit(orfallow audit --ci). - No
fallow.config— defaults are used intentionally. The gate isnew-only, so inherited debt (the 5 false-positive unused devDeps, 20 circular deps, existing duplication) is reported but never affects the verdict. Add a config only if you later want tunable thresholds or to excludedist/generated dirs from duplication.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/quality-regression-gate-mrzxurfk/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/quality-regression-gate-mrzxurfk' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/quality-regression-gate-mrzxurfk/download' --output '.skill-downloads/quality-regression-gate-mrzxurfk/SKILL.md.part' && mv '.skill-downloads/quality-regression-gate-mrzxurfk/SKILL.md.part' '.skill-downloads/quality-regression-gate-mrzxurfk/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/quality-regression-gate-mrzxurfk/SKILL.md' && test -s '.skill-downloads/quality-regression-gate-mrzxurfk/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/quality-gate' && cp -R '.skill-downloads/quality-regression-gate-mrzxurfk' '.claude/skills/quality-gate'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/quality-regression-gate-mrzxurfk'openskills read 'quality-regression-gate-mrzxurfk'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/quality-regression-gate-mrzxurfk/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.