Claude-skill-registry lint-fix
Iteratively run linters, apply auto-fixes, and resolve remaining issues using Trunk.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/lint-fix" ~/.claude/skills/majiayu000-claude-skill-registry-lint-fix && rm -rf "$T"
manifest:
skills/data/lint-fix/SKILL.mdsource content
Lint & Fix with Trunk
Purpose
This skill provides an autonomous loop for identifying, fixing, and verifying linting and formatting issues using
trunk. Use this when you need to ensure the codebase adheres to project standards or when fixing specific lint errors.
Loop Logic
- Auto-Format: Run
(ortrunk fmt
) to apply automatic formatting fixes.trunk fmt -a - Discovery: Run
(ortrunk check -y
for all files) to list current linting issues.trunk check -a -y - Analyze: For any remaining issues from Step 2:
- Examine the error message and the failing code.
- Identify the specific rule being violated (e.g., Ruff
, ShellcheckE501
).SC2086
- Fix: Apply the minimum necessary change to resolve the manual fix required.
- Verify: Re-run
on the affected file(s).trunk check -y- If passed: Move to next issue.
- If failed: Analyze the new failure and repeat the loop.
Termination Criteria
- No more errors reported by
.trunk check -y - Reached max iteration limit (default: 5).
Common Commands
| Task | Command |
|---|---|
| Check changed files | |
| Check all files | |
| Format changed files | |
| Format all files | |
| Check specific file | |
| Format specific file | |
Examples
Scenario: Fixing Python Lint Errors
reportstrunk check -y
(missing docstring) inruff: D103
(after auto-fixing unused imports).scripts/utils.py- Agent adds the missing docstring in
.scripts/utils.py
passes.trunk check -y scripts/utils.py