quality-gates
This skill should be used when the user wants to run code quality checks (linting, formatting, type checking, tests) on the lazyopencode project. Use this skill when asked to "run quality gates", "check the code", "run tests", "lint the code", or verify code quality before committing.
When & Why to Use This Skill
The Quality Gates skill is a comprehensive automation tool designed to maintain high standards in the lazyopencode project. It streamlines the development workflow by integrating essential Python quality assurance tools, including Ruff for linting and formatting, Mypy for static type checking, and Pytest for unit testing. By automating these 'quality gates,' the skill ensures code consistency, catches type-related bugs early, and verifies functional integrity before code is committed or deployed.
Use Cases
- Pre-commit Code Validation: Automatically run a full suite of linting, formatting, and tests to ensure that new changes meet project standards before they are committed to the repository.
- Automated Code Style Correction: Use the integrated Ruff tool to identify and automatically fix stylistic inconsistencies and common linting errors, maintaining a clean and readable codebase.
- Static Type Safety Checks: Execute Mypy to perform deep static analysis, catching potential type-related runtime errors and improving overall code reliability and documentation.
- Regression Testing: Quickly run the entire Pytest suite to verify that recent modifications haven't introduced new bugs or broken existing functionality in the lazyopencode project.
| name | quality-gates |
|---|---|
| description | This skill should be used when the user wants to run code quality checks (linting, formatting, type checking, tests) on the lazyopencode project. Use this skill when asked to "run quality gates", "check the code", "run tests", "lint the code", or verify code quality before committing. |
Quality Gates
Run code quality checks for the lazyopencode project. This skill executes the same checks used in pre-commit hooks plus tests.
Quality Checks
The following checks are run in order:
| Check | Command | Purpose |
|---|---|---|
| Ruff Lint | uv run ruff check src tests --fix |
Lint code and auto-fix issues |
| Ruff Format | uv run ruff format src tests |
Format code consistently |
| Mypy | uv run mypy src |
Static type checking |
| Pytest | uv run pytest tests/ -q |
Run test suite |
Usage
To run all quality gates:
scripts/check_quality.sh
Or run individual checks as needed using the commands above.
Workflow
- Run the
scripts/check_quality.shscript from the project root - Review any failures and fix issues
- Re-run until all checks pass
- Present user with concise summary of results in markdown table format
Common Issues
- Ruff lint failures: Usually auto-fixed. If not, check the error message for manual fixes needed.
- Mypy errors: Type annotation issues. Add or fix type hints as indicated.
- Test failures: Review test output, fix failing tests or underlying code.