lint-code
Check code for style and quality issues. Use when validating code before commits.
When & Why to Use This Skill
The lint-code skill is a comprehensive static analysis tool designed to enhance software quality by identifying style violations, potential bugs, and maintainability issues. By integrating industry-standard linters like Pylint, Flake8, and Black, it helps developers enforce coding standards and catch errors early in the development lifecycle, ensuring a clean and professional codebase.
Use Cases
- Pre-commit Validation: Automatically verify code quality and formatting before committing changes to prevent broken or messy code from entering the repository.
- Style Consistency: Enforce uniform coding standards across a team by identifying and fixing stylistic deviations in Python, Mojo, and other supported languages.
- Bug Prevention: Detect common programming mistakes such as unused variables, typos, and logical 'code smells' that could lead to runtime errors.
- Automated Quality Audits: Streamline the manual code review process by generating detailed reports on issue severity and suggested fixes, allowing reviewers to focus on high-level logic.
| name | lint-code |
|---|---|
| description | "Check code for style and quality issues. Use when validating code before commits." |
| mcp_fallback | none |
| category | analysis |
| tier | 1 |
| user-invocable | false |
Lint Code
Run linting tools to identify style issues, potential bugs, and code quality problems in source files.
When to Use
- Pre-commit code validation
- Finding simple mistakes (unused variables, typos)
- Enforcing style consistency
- Quick code review before merging
Quick Reference
# Python linting
pylint module.py
flake8 .
black --check . # Format checker
# Mojo formatting (enforced by pre-commit)
pixi run mojo format file.mojo
# All linters via pixi
pixi run quality-run-linters
Workflow
- Select linters: Choose appropriate tools (pylint, flake8, black, etc.)
- Run checks: Execute linters on code
- Review issues: Analyze warnings and errors
- Fix problems: Address high-priority issues
- Verify fixes: Re-run linters to confirm
Output Format
Lint report:
- File path and line number
- Issue type (style, convention, error, warning)
- Issue description
- Suggested fix or reference
- Severity level
References
- See CLAUDE.md > Pre-commit Hooks for automated checking
- See
quality-run-lintersskill for comprehensive linting - See quality standards in CLAUDE.md for project guidelines