| name | lint |
| description | Run code quality checks including linting, formatting, and type checking. |
/lint
Run code quality checks including linting, formatting, and type checking.
Usage
/lint [target] [--fix] [--strict]
Arguments
target: Specific file or directory (default: src/ tests/)
--fix: Auto-fix issues where possible
--strict: Fail on warnings (for CI)
Instructions
When this skill is invoked:
Full Lint Pipeline
-
Read prd/00_technology.md to find the correct commands
-
Run all checks in sequence:
{lint_check_command} src/ tests/
{format_check_command} src/ tests/
{type_check_command} src/
-
Report Results:
==================== Lint Results ====================
📋 Linting
✅ No issues found
📐 Formatting
⚠️ 2 files need formatting:
- src/{project}/api/routes
- tests/unit/test_config
🔍 Type Checking
✅ No type errors
==================== Summary ====================
✅ Linting: Passed
⚠️ Formatting: 2 issues (run with --fix)
✅ Type Checking: Passed
Run '/lint --fix' to auto-fix formatting issues.
With --fix Flag
{lint_fix_command} src/ tests/
{format_fix_command} src/ tests/
Report what was fixed:
🔧 Auto-fixed issues:
Linting:
- src/{project}/api/routes: Removed unused import
- src/{project}/services/user: Sorted imports
Formatting:
- src/{project}/api/routes: Reformatted
- tests/unit/test_config: Reformatted
✅ All issues fixed!
Specific Checks
Run individual checks (commands from prd/00_technology.md):
{lint_check_command} src/
{format_check_command} src/
{type_check_command} src/
{security_lint_command} src/
CI Mode (--strict)
For CI pipelines, use strict mode:
- Returns non-zero exit code on any issue
- Treats warnings as errors
- Outputs machine-readable format if available
Quality Standards
From .claude/rules/code-quality.md:
- ✅ All functions must have type annotations
- ✅ All classes must have docstrings
- ✅ No unused imports
- ✅ Imports sorted
- ✅ Line length within configured limit
- ✅ No security issues
Example Output
$ /lint
🔍 Running code quality checks...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Linting
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ All 15 files passed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Formatting
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ All files formatted correctly
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 Type Checking
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Success: no issues found in 15 source files
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ All checks passed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━