skills/quality-gates/SKILL.md
Python code quality gates script for linting, type checking, complexity analysis, and testing before commits. Use when enforcing consistent code quality across Python projects with fast (unit-tests) or comprehensive (all-tests) modes.
npx skillsauth add ederheisler/agent-skills quality-gatesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Project-agnostic bash script enforcing Python code quality gates using pyrefly, radon, hypothesis, pytest, and markdownlint. Three execution modes provide flexibility for different workflows: unit-tests for fast feedback, all-tests for comprehensive pre-merge validation, no-tests for static analysis only. Coverage runs are excluded by default; run coverage only when the user explicitly requests it.
Before committing Python code to enforce consistent quality checks across projects without directory structure assumptions.
| Mode | Gates Run | Use Case | |----------------|--------------------------------------------------------------------------------------|--------------------------------------| | unit-tests | pyrefly, radon, hypothesis checks, pytest (unit/), markdownlint | Fast feedback during development | | all-tests | pyrefly, radon, hypothesis checks, pytest (unit/ + integration/), markdownlint | Pre-merge/deploy comprehensive check | | no-tests | pyrefly, radon, hypothesis checks, markdownlint | Static analysis only (time critical) |
Running quality gates:
Make sure uv is installed.
# Fast feedback: lint + type check + unit tests
.claude/skills/quality-gates/scripts/quality-gates.sh unit-tests
# Pre-merge: everything including integration tests
.claude/skills/quality-gates/scripts/quality-gates.sh all-tests
# Quick static checks only
.claude/skills/quality-gates/scripts/quality-gates.sh no-tests
scripts/quality-gates.sh - Uses uv/uvx for tool management| Rationalization | Reality | |------------------------------|----------------------------------------------------------------------| | "Time-critical, skip checks" | Use no-tests mode for fast static validation | | "Already tested manually" | Automation catches edge cases manual testing misses | | "Partial checks sufficient" | Modes provide full coverage options; incomplete coverage misses bugs | | "Coverage by default" | Coverage pollutes context; run it only when explicitly requested | | "Too slow" | Tools are fast; skipping misses complexity and type issues | | "Script not in project" | Copy to project to .claude/; run locally | | "Tools not installed" | Install uv; graceful fallbacks skip missing tools |
Stop and re-evaluate if you're:
All of these suggest running the script with the appropriate mode.
development
Extracts what the user actually wants instead of what they think they should want. Achieves this through one-question-at-a-time interview until ~95% confidence about the underlying intent. Use when an ask is underspecified ("build me X" without "for whom" or "why now"), when the user explicitly invokes ("interview me", "grill me", "are we sure?", "stress-test my thinking"), or when you catch yourself silently filling in ambiguous requirements before any plan, spec, or code exists.
testing
Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".
documentation
Compact the current conversation into a handoff document for another agent to pick up.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".