lint
БесплатноБез исполняемых скриптовНе проверенRun targeted linting, formatting, and code quality checks on modified files. Use this to validate code style, type safety, security, and other quality metrics…
от Microck★ 417 звёзд на GitHubОб этом скилле
Linting and Code Quality Skill
This skill helps you efficiently validate and format code using the project's comprehensive linting infrastructure.
When to Use This Skill
Use this skill when you:
- Edit a file and want to format it before committing
- Need to validate code style, types, or security
- Want to check for spelling errors or documentation issues
- Need to validate test infrastructure (suitespec, log messages)
- Want to run comprehensive quality checks before pushing
Key Principles
- Always format after editing - Use
hatch run lint:fmt -- <file>immediately after code changes - Run comprehensive checks before committing - Use
hatch run lint:checksbefore pushing - Target specific files - Use
-- <file>syntax to validate only what you changed, not the entire codebase - Fix auto-fixable issues - Use
fmtinstead of manually fixing style issues - Type check after adding types - Use
hatch run lint:typing -- <file>after adding type annotations
Quick Start
Run all checks (broad validation):
hatch run lint:checks
Format and validate a specific file:
hatch run lint:fmt -- path/to/file.py
Check types on a specific file:
hatch run lint:typing -- path/to/file.py
Available Lint Scripts
Code Formatting
fmt - Format code (recommended for most edits)
Formats and validates code style using Ruff.
Usage:
# Format entire codebase
hatch run lint:fmt
# Format specific files
hatch run lint:fmt -- ddtrace/tracer.py tests/test_tracer.py
# Format specific directory
hatch run lint:fmt -- ddtrace/contrib/flask/
What it does:
- Runs the Ruff formatter
- Runs Ruff with --fix to auto-fix issues
- Re-validates with style checks
When to use: After making code changes to automatically format and fix style issues.
fmt-snapshots - Format snapshot files
Formats snapshot test files used in snapshot-based testing.
Usage:
hatch run lint:fmt-snapshots -- tests/snapshots/
When to use: After snapshot test updates or when snapshot files need reformatting.
Style Checking
style - Check all style issues (no auto-fix)
Validates code style without automatically fixing issues.
Usage:
# Check entire codebase
hatch run lint:style
# Check specific files
hatch run lint:style -- ddtrace/
What it validates:
- Ruff formatting
- Ruff linting rules
- Cython linting
- C code formatting
- CMake formatting
When to use: To verify style compliance before committing without auto-fixes.
format_check - Check formatting
Validates Python code formatting with ruff format (no auto-fix).
Usage:
hatch run lint:format_check -- ddtrace/tracer.py
When to use: Quick check of Python formatting before committing.
Type Checking
typing - Type check with mypy
Validates Python type hints and catches type-related errors.
Usage:
# Check all types
hatch run lint:typing
# Check specific files (mypy path format)
hatch run lint:typing -- ddtrace/tracer.py
When to use: After adding type hints or modifying functions with type annotations.
Security Checks
security - Security audit with Bandit
Scans code for common security issues and vulnerabilities.
Usage:
# Scan entire codebase
hatch run lint:security
# Scan specific directory
hatch run lint:security -- -r ddtrace/contrib/
When to use: Before committing code that handles user input, credentials, or sensitive operations.
Spelling and Documentation
spelling - Check spelling
Validates spelling in documentation, comments, and docstrings.
Usage:
# Check all spelling
hatch run lint:spelling
# Check specific files
hatch run lint:spelling -- docs/ releasenotes/
When to use: Before committing documentation or user-facing text.
Test Infrastructure
riot - Validate riotfile
Doctests the riotfile to ensure test venv definitions are valid.
Usage:
hatch run lint:riot
When to use: After modifying riotfile.py to validate syntax and doctest examples.
suitespec-check - Validate test suite specifications
Checks that test suite patterns in tests/suitespec.yml cover all test files.
Usage:
hatch run lint:suitespec-check
When to use: After adding new test files or modifying suite specifications.
error-log-check - Validate error log messages
Ensures error log messages follow project conventions.
Usage:
hatch run lint:error-log-check
When to use: After adding new error logging statements.
Code Analysis
sg - Static analysis with ast-grep
Performs static code analysis using ast-grep patterns.
Usage:
# Scan all files
hatch run lint:sg
# Scan specific directory
hatch run lint:sg -- ddtrace/
When to use: To find code patterns that may need refactoring or optimization.
`
Установить lint в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadGrepGlobTodoWriteВложенные файлы
FAQ
Что делает скилл lint?
Run targeted linting, formatting, and code quality checks on modified files. Use this to validate code style, type safety, security, and other quality metrics before committing. Supports running all checks or targeting specific checks on specific files for efficient validation.
Как установить скилл lint?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lint запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic