lint
From davila7
Run Python code linting and formatting tools.
Install
/lintFacts
- Repository
- davila7/claude-code-templates
- Status
- Actively maintained
- Last commit
- Source file
- .claude/commands/lint.md
Source preview
The instructions Claude Code reads when this command runs.
# Python Linter
Run Python code linting and formatting tools.
## Purpose
This command helps you maintain code quality using Python's best linting and formatting tools.
## Usage
```
/lint
```
## What this command does
1. **Runs multiple linters** (flake8, pylint, black, isort)
2. **Provides detailed feedback** on code quality issues
3. **Auto-fixes formatting** where possible
4. **Checks type hints** if mypy is configured
## Example Commands
### Black (code formatting)
```bash
# Format all Python files
black .
# Check formatting without changing files
black --check .
# Format specific file
black src/main.py
```
### flake8 (style guide enforcement)
```bash
# Check all Python files
flake8 .
# Check specific directory
flake8 src/
# Check with specific rules
flake8 --max-line-length=88 .
```
### isort (import sorting)
```bash
# Sort imports in all files
isort .
# Check import sorting
isort --check-only .
# Sort imports in specific file
isort src/main.py
```
### pylint (comprehensive linting)
```bash
# Run pylint on all files
pylint src/
# Run with specific score threshold
pylint --fail-under=8.0 src/
# Generate detailed report
pylint --output-format=html src/ > pylint_report.html
```
### mypy (type checking)
```bash
# Check types in all files
mypy .
# Check specific module
mypy src/models.py
# Check with strict mode
mypy --strict src/
```
## Configuration FilView full source on GitHub →Other slash commands
feature-development
★ 229,918Workflow command scaffold for feature-development in everything-claude-code.
affaan-mupdated 13d agoMITdatabase-migration
★ 229,918Workflow command scaffold for database-migration in everything-claude-code.
affaan-mupdated 13d agoMITadd-language-rules
★ 229,918Workflow command scaffold for add-language-rules in everything-claude-code.
affaan-mupdated 13d agoMITcommit-push-pr
★ 137,934Commit, push, and open a PR
anthropicsupdated 12d agodedupe
★ 137,934Find duplicate GitHub issues
anthropicsupdated 12d agotriage-issue
★ 137,934Triage GitHub issues by analyzing and applying labels
anthropicsupdated 12d ago