Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Multi-language code quality gate with auto-detection and linters.
.claude/skills/notque-universal-quality-gate/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 77% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 108% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 94% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 107% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 101% | 0% |
Language-agnostic code quality checking system. Automatically detects project languages via marker files and runs appropriate linters, formatters, and static analysis tools for each detected language.
This skill implements a Detect, Check, Report pattern for multi-language code quality enforcement:
Key Principles:
| Language | Marker Files | Tools | |----------|--------------|-------| | Python | pyproject.toml, requirements.txt | ruff, mypy, bandit | | Go | go.mod | gofmt, golangci-lint, go vet | | JavaScript | package.json | eslint, biome | | TypeScript | tsconfig.json | tsc, eslint, biome | | Rust | Cargo.toml | clippy, cargo fmt | | Ruby | Gemfile | rubocop | | Java | pom.xml, build.gradle | PMD | | Shell | .sh, .bash | shellcheck | | YAML | .yml, .yaml | yamllint | | Markdown | .md | markdownlint |
Run the quality gate check against the current project:
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py
This command automatically:
For pre-commit validation (fastest):
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py --staged
Checks only git-staged files, enabling rapid feedback on recent changes.
For auto-fixing (when issues are found):
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py --fix
Auto-corrects fixable issues (formatting, imports, etc.), then re-run Step 1 to verify.
For focused checking (single language):
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py --lang python
Narrows scope when debugging language-specific issues.
For verbose details:
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py -v
Shows expanded diagnostic output for troubleshooting.
PASSED output:
============================================================
Quality Gate: PASSED
============================================================
Languages: python, javascript
Files: 15
Tool Results:
[+] python/lint: passed
[+] python/format: passed
[-] python/typecheck: skipped (Optional tool not installed)
[+] javascript/lint: passed
[+] javascript/format: passed
Quality gate passed: 4/5 tools OK (1 skipped)Gate passes when all required tools succeed. Skipped optional tools do not block.
FAILED output:
============================================================
Quality Gate: FAILED
============================================================
Languages: python, go
Files: 8
Tool Results:
[X] python/lint: FAILED
hooks/example.py:42:1: F841 local variable 'x' is assigned but never used
hooks/example.py:56:1: F401 'os' imported but unused
[+] python/format: passed
[+] go/format: passed
[X] go/lint: FAILED
main.go:15:2: S1000: should use for range instead of for select
Pattern Matches:
[WARNING] hooks/example.py:78: Silent exception handler - add explanatory comment
Quality gate failed: 2 tool(s) reported issues, 1 error pattern(s)Review marked failures X] first. Pattern matches WARNING] are informational.
For auto-fixable issues:
python3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py --fixgit diff to verify correctnessFor manual fixes:
Once quality gate passes with zero required-tool failures:
Pre-commit validation (fastest path):
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py --staged # If fails → fix issues → re-run # If passes → git commit
Full repo audit:
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py # Review all findings by language # Fix by category: required failures → warnings → patterns # Re-run after each batch of fixes
Language-specific validation:
bashpython3 ~/.claude/skills/code-quality/universal-quality-gate/scripts/run_quality_gate.py --lang python # Use when debugging a specific language's toolchain # Narrows output and speeds iteration
To add language support without editing the script, modify the language registry:
json// hooks/lib/language_registry.json { "new_language": { "extensions": [".ext"], "markers": ["config.file"], "tools": { "lint": { "cmd": "linter {files}", "fix_cmd": "linter --fix {files}", "description": "Language linter", "required": true } } } }
The quality gate script automatically detects and uses new registry entries on next run.
Cause: No changed files detected or no language markers found in project Solution:
--staged, ensure files are staged with git addCause: A required linter tool is not installed on the system Solution:
pip install ruff mypy banditgo install github.com/golangci/golangci-lint/cmd/golangci-lint@latestnpm install --save-dev eslint biomecargo install clippy (usually pre-installed with rustup)language_registry.json if you cannot install itCause: Tool taking longer than 60-second timeout (usually large file sets or performance issues) Solution:
--staged to check only changed files instead of the entire project--lang to check one language at a timeCause: Multiple conflicting linter configurations in the project (e.g., .eslintrc and biome.json) Solution:
language_registry.jsonPattern Matches like "Silent exception handler" or "Debug print" are informational warnings. They do not fail the gate. Review them and decide whether to fix:
[WARNING] entries identify failure modes but don't block commits--no-patterns to skip pattern scanning if these are not relevantWhen a tool is marked optional and not installed:
[-] language/tool: skipped (Optional tool not installed)hooks/lib/
quality_gate.py # Shared core library
language_registry.json # Language configurations
skills/code-quality/universal-quality-gate/
SKILL.md # This file
scripts/
run_quality_gate.py # Skill entry point (thin wrapper)This skill uses the shared quality gate library from hooks/lib/ for on-demand code quality checking.
Multi-language linting: Language configurations in hooks/lib/language_registry.json
Related skills:
code-linting for single-language lint/format taskssystematic-code-review for comprehensive code review beyond lintingtest-driven-development for full validation with testsKey principle: Quality gates catch syntax and style issues. They do not replace:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 5,912 | 4,359 | -26% | 1 | 1 | 0% | 913 | 2,860 | +213% | 0 | 0 | — |
case-02 | fail→fail | 7,670 | 5,090 | -34% | 1 | 1 | 0% | 1,245 | 2,848 | +129% | 0 | 0 | — |
case-03 | fail→fail | 10,219 | 1,869 | -82% | 1 | 1 | 0% | 1,539 | 2,793 | +81% | 0 | 0 | — |
case-04 | fail→fail | 6,790 | 6,149 | -9% | 1 | 1 | 0% | 939 | 3,045 | +224% | 0 | 0 | — |
case-05 | pass→fail | 12,986 | 2,418 | -81% | 1 | 1 | 0% | 1,965 | 2,846 | +45% | 0 | 0 | — |
case-06 | pass→fail | 9,948 | 2,435 | -76% | 1 | 1 | 0% | 1,618 | 2,767 | +71% | 0 | 0 | — |
case-07 | fail→pass | 12,857 | 5,701 | -56% | 1 | 1 | 0% | 2,004 | 3,552 | +77% | 0 | 0 | — |
case-08 | fail→pass | 9,025 | 2,641 | -71% | 1 | 1 | 0% | 1,386 | 2,887 | +108% | 0 | 0 | — |
case-09 | fail→pass | 10,799 | 5,307 | -51% | 1 | 1 | 0% | 1,802 | 3,497 | +94% | 0 | 0 | — |
case-10 | pass→pass | 12,070 | 2,052 | -83% | 1 | 1 | 0% | 1,998 | 2,857 | +43% | 0 | 0 | — |
case-11 | fail→pass | 9,101 | 3,108 | -66% | 1 | 1 | 0% | 1,336 | 2,769 | +107% | 0 | 0 | — |
case-12 | pass→pass | 13,146 | 2,976 | -77% | 1 | 1 | 0% | 2,313 | 2,994 | +29% | 0 | 0 | — |
case-13 | pass→pass | 3,428 | 2,226 | -35% | 1 | 1 | 0% | 534 | 2,847 | +433% | 0 | 0 | — |
case-14 | pass→pass | 12,430 | 2,386 | -81% | 1 | 1 | 0% | 2,132 | 2,946 | +38% | 0 | 0 | — |
case-15 | pass→pass | 7,624 | 3,666 | -52% | 1 | 1 | 0% | 1,182 | 3,190 | +170% | 0 | 0 | — |
case-16 | fail→pass | 10,096 | 5,516 | -45% | 1 | 1 | 0% | 1,777 | 3,564 | +101% | 0 | 0 | — |
case-17 | fail→pass | 22,797 | 3,389 | -85% | 1 | 1 | 0% | 1,899 | 3,079 | +62% | 0 | 0 | — |
case-18 | fail→pass | 14,079 | 4,132 | -71% | 1 | 1 | 0% | 2,268 | 3,138 | +38% | 0 | 0 | — |
case-19 | fail→pass | 13,066 | 6,384 | -51% | 1 | 1 | 0% | 1,998 | 3,513 | +76% | 0 | 0 | — |
case-20 | fail→pass | 11,893 | 7,368 | -38% | 1 | 1 | 0% | 2,129 | 3,926 | +84% | 0 | 0 | — |
case-21 | pass→pass | 11,694 | 4,790 | -59% | 1 | 1 | 0% | 1,778 | 3,348 | +88% | 0 | 0 | — |
case-22 | fail→pass | 11,117 | 5,192 | -53% | 1 | 1 | 0% | 1,593 | 3,373 | +112% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 21 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.