Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/microck-lint/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 102% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 68% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 165% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 98% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 94% | 0% |
This skill helps you efficiently validate and format code using the project's comprehensive linting infrastructure.
Use this skill when you:
hatch run lint:fmt -- <file> immediately after code changeshatch run lint:checks before pushing-- <file> syntax to validate only what you changed, not the entire codebasefmt instead of manually fixing style issueshatch run lint:typing -- <file> after adding type annotationsRun all checks (broad validation):
bashhatch run lint:checks
Format and validate a specific file:
bashhatch run lint:fmt -- path/to/file.py
Check types on a specific file:
bashhatch run lint:typing -- path/to/file.py
fmt - Format code (recommended for most edits)Formats and validates code style using Ruff.
Usage:
bash# 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:
When to use: After making code changes to automatically format and fix style issues.
fmt-snapshots - Format snapshot filesFormats snapshot test files used in snapshot-based testing.
Usage:
bashhatch run lint:fmt-snapshots -- tests/snapshots/
When to use: After snapshot test updates or when snapshot files need reformatting.
style - Check all style issues (no auto-fix)Validates code style without automatically fixing issues.
Usage:
bash# Check entire codebase hatch run lint:style # Check specific files hatch run lint:style -- ddtrace/
What it validates:
When to use: To verify style compliance before committing without auto-fixes.
format_check - Check formattingValidates Python code formatting with ruff format (no auto-fix).
Usage:
bashhatch run lint:format_check -- ddtrace/tracer.py
When to use: Quick check of Python formatting before committing.
typing - Type check with mypyValidates Python type hints and catches type-related errors.
Usage:
bash# 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 - Security audit with BanditScans code for common security issues and vulnerabilities.
Usage:
bash# 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 - Check spellingValidates spelling in documentation, comments, and docstrings.
Usage:
bash# 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.
riot - Validate riotfileDoctests the riotfile to ensure test venv definitions are valid.
Usage:
bashhatch run lint:riot
When to use: After modifying riotfile.py to validate syntax and doctest examples.
suitespec-check - Validate test suite specificationsChecks that test suite patterns in tests/suitespec.yml cover all test files.
Usage:
bashhatch run lint:suitespec-check
When to use: After adding new test files or modifying suite specifications.
error-log-check - Validate error log messagesEnsures error log messages follow project conventions.
Usage:
bashhatch run lint:error-log-check
When to use: After adding new error logging statements.
sg - Static analysis with ast-grepPerforms static code analysis using ast-grep patterns.
Usage:
bash# 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.
sg-test - Test ast-grep rulesValidates ast-grep rule definitions.
Usage:
bashhatch run lint:sg-test
When to use: After modifying ast-grep rules or patterns.
cformat_check - Check C code formattingValidates C code formatting.
Usage:
bashhatch run lint:cformat_check
When to use: After modifying C extension code.
cmakeformat_check - Check CMake formattingValidates CMake file formatting.
Usage:
bashhatch run lint:cmakeformat_check
When to use: After modifying CMakeLists.txt or other CMake files.
After editing a Python file, format and validate it:
bash# Edit the file... # Then run: hatch run lint:fmt -- path/to/edited/file.py
After adding type hints:
bashhatch run lint:typing -- ddtrace/contrib/flask/patch.py
Run all checks before creating a commit:
bashhatch run lint:checks
This runs:
Before committing code handling sensitive operations:
bashhatch run lint:security -- -r ddtrace/contrib/
After writing documentation or docstrings:
bashhatch run lint:spelling -- docs/ ddtrace/
hatch run lint:fmt -- <file> to auto-fix style issueslint:checks before pushing: Ensures all quality gates pass-- <file> syntax to validate only what you changedlint:typing after adding type annotationsfmt insteadAll lint commands support passing arguments with -- syntax:
bash# Basic format hatch run lint:<script> -- <args> # Examples: hatch run lint:fmt -- ddtrace/tracer.py # Format specific file hatch run lint:typing -- ddtrace/ # Type check directory hatch run lint:security -- -r ddtrace/contrib/ # Security scan with args hatch run lint:spelling -- docs/ releasenotes/ # Spelling check specific paths
Ensure you've run hatch run lint:fmt to auto-fix style issues first:
bashhatch run lint:fmt -- <file> hatch run lint:style -- <file> # Should now pass
Make sure type hints are correct and all imports are available:
bashhatch run lint:typing -- <file>
Ensure you're running from the project root:
bashcd /path/to/dd-trace-py hatch run lint:checks
Use fmt to auto-fix most issues:
bashhatch run lint:fmt -- .
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 6,930 | 1,435 | -79% | 1 | 1 | 0% | 1,164 | 2,357 | +102% | 0 | 0 | — |
case-02 | fail→pass | 8,951 | 2,428 | -73% | 1 | 1 | 0% | 1,530 | 2,573 | +68% | 0 | 0 | — |
case-03 | fail→pass | 5,778 | 3,545 | -39% | 1 | 1 | 0% | 976 | 2,585 | +165% | 0 | 0 | — |
case-04 | fail→pass | 7,347 | 1,912 | -74% | 1 | 1 | 0% | 1,243 | 2,467 | +98% | 0 | 0 | — |
case-05 | fail→pass | 8,509 | 3,655 | -57% | 1 | 1 | 0% | 1,412 | 2,744 | +94% | 0 | 0 | — |
case-06 | fail→pass | 6,935 | 2,799 | -60% | 1 | 1 | 0% | 1,210 | 2,612 | +116% | 0 | 0 | — |
case-12 | fail→pass | 7,972 | 2,123 | -73% | 1 | 1 | 0% | 1,260 | 2,453 | +95% | 0 | 0 | — |
case-07 | pass→pass | 12,375 | 2,299 | -81% | 1 | 1 | 0% | 2,118 | 2,414 | +14% | 0 | 0 | — |
case-08 | fail→pass | 8,969 | 1,953 | -78% | 1 | 1 | 0% | 1,400 | 2,423 | +73% | 0 | 0 | — |
case-09 | fail→pass | 8,044 | 1,956 | -76% | 1 | 1 | 0% | 1,219 | 2,466 | +102% | 0 | 0 | — |
case-10 | fail→pass | 10,829 | 1,846 | -83% | 1 | 1 | 0% | 1,708 | 2,465 | +44% | 0 | 0 | — |
case-11 | fail→pass | 6,266 | 2,153 | -66% | 1 | 1 | 0% | 1,062 | 2,448 | +131% | 0 | 0 | — |
case-13 | fail→pass | 6,305 | 1,517 | -76% | 1 | 1 | 0% | 1,082 | 2,363 | +118% | 0 | 0 | — |
case-14 | fail→pass | 8,610 | 1,623 | -81% | 1 | 1 | 0% | 1,545 | 2,396 | +55% | 0 | 0 | — |
case-15 | fail→pass | 7,976 | 1,904 | -76% | 1 | 1 | 0% | 1,312 | 2,450 | +87% | 0 | 0 | — |
case-16 | fail→pass | 8,265 | 2,356 | -71% | 1 | 1 | 0% | 1,312 | 2,526 | +93% | 0 | 0 | — |
case-17 | fail→pass | 10,639 | 4,033 | -62% | 1 | 1 | 0% | 1,805 | 2,913 | +61% | 0 | 0 | — |
case-18 | fail→pass | 10,054 | 4,410 | -56% | 1 | 1 | 0% | 1,682 | 2,891 | +72% | 0 | 0 | — |
case-19 | fail→pass | 19,947 | 2,573 | -87% | 1 | 1 | 0% | 3,563 | 2,573 | -28% | 0 | 0 | — |
case-20 | pass→pass | 8,378 | 7,146 | -15% | 1 | 1 | 0% | 1,028 | 3,078 | +199% | 0 | 0 | — |
case-21 | pass→pass | 11,715 | 6,256 | -47% | 1 | 1 | 0% | 1,341 | 3,179 | +137% | 0 | 0 | — |
case-22 | pass→pass | 5,945 | 2,720 | -54% | 1 | 1 | 0% | 805 | 2,518 | +213% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +82 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.