code-quality
Apply code quality tools (Ruff, ty, pre-commit) to Python projects. Use PROACTIVELY when code quality issues are detected. Keywords: lint, format, quality, 品質, ruff, type
When & Why to Use This Skill
This Claude skill streamlines Python development by automating essential code quality workflows. It integrates industry-standard tools like Ruff for high-performance linting and formatting, ty for static type checking, and pre-commit hooks to enforce coding standards proactively. By identifying and resolving code smells in real-time, it ensures your Python projects remain maintainable, readable, and professional.
Use Cases
- Automated Python Linting and Formatting: Instantly apply Ruff to fix PEP 8 violations and format code, ensuring a consistent style across the entire codebase.
- Static Type Validation: Use 'ty' to perform type checking on Python scripts, catching potential runtime errors and improving documentation through type hints.
- Pre-commit Hook Integration: Set up and manage pre-commit configurations to automatically run quality checks before every git commit, preventing low-quality code from entering the repository.
- Proactive Code Quality Audits: Automatically trigger quality tools when code issues are detected or before finalizing a task to reduce technical debt and improve code reliability.
| name | code-quality |
|---|---|
| description | Apply code quality tools (Ruff, ty, pre-commit) to Python projects. Use PROACTIVELY when code quality issues are detected. Keywords: lint, format, quality, 品質, ruff, type |
When to Use (PROACTIVE)
- Linting errors occur
- User requests code formatting
- User sets up pre-commit hooks
- User mentions "lint", "format", "品質", "type check"
- Before commits
What This Skill Does
Ensures code quality using modern Python toolchain:
- Ruff: Linting + Formatting
- ty: Type checking
- pre-commit: Automatic checks
Refer to tools-guide.md for detailed configurations.