.claude/skills/lint-fix/SKILL.md
Detect project linting and validation tools, build an execution pipeline, run all tools to zero errors, and fix issues using an atomic fix protocol. Auto-detects Makefile targets, package.json scripts, Go tools, Python tools, and other common linters. Use when fixing linting errors, running validation pipelines, or ensuring code quality before committing.
npx skillsauth add dirien/yet-another-agent-harness lint-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect all linting, formatting, and validation tools in the project, build an ordered execution pipeline, run everything to zero errors, and fix issues atomically.
Scan the project root for configuration files, Makefile targets, and package manager scripts to identify available tools.
Check in order:
For detailed detection commands per ecosystem, see
references/tool-detection.md.
If no tools are detected, report to the user and offer to help set up linting. Do not proceed with an empty pipeline.
If make gen, make generate, or an equivalent code generation
command is detected, run it before any linting.
Generated code can overwrite manual fixes. Always generate first.
make gen 2>&1
If generation fails, stop and fix the generation issue before proceeding to linting.
Arrange detected tools in execution order:
Present the detected pipeline to the user before executing:
Detected validation pipeline:
1. make gen
2. gofmt -s -l .
3. golangci-lint run
4. markdownlint '**/*.md'
5. go test ./...
6. go build ./...
Proceed? (y/n)
If the user wants to add, remove, or reorder commands, adjust the pipeline accordingly.
Run each command in order. Stop at the first failure.
# Run each command, stop on failure
for cmd in "${PIPELINE[@]}"; do
echo "Running: $cmd"
eval "$cmd" 2>&1
if [ $? -ne 0 ]; then
echo "FAILED: $cmd"
# Proceed to atomic fix protocol for this command
break
fi
echo "PASSED: $cmd"
done
Capture the full output of the failing command — file paths, line numbers, rule names, and error messages are needed for fixing.
Fix issues from the failing command one at a time. This prevents cascade failures where fixing one issue introduces others.
For each issue:
After all issues for the failing command are resolved, continue the pipeline from the next command.
For detailed protocol, rollback strategies, and edge cases, see
references/fix-protocol.md.
After all commands pass individually, run the full pipeline end-to-end as a single sequence:
cmd1 && cmd2 && cmd3 && ... && echo "PASS" || echo "FAIL"
All commands must pass in sequence. If any command fails in the final run, return to Step 5 for that command.
Present the final result:
Validation pipeline: ALL PASSED
1. make gen PASS
2. gofmt -s -l . PASS
3. golangci-lint run PASS
4. markdownlint PASS
5. go test ./... PASS
6. go build ./... PASS
Zero errors across all validation tools.
Formatting issues: run the formatter with --write or -w flag
instead of --check. Most formatters have an auto-fix mode.
Import ordering: most linters have auto-fix for import sorting.
Check for --fix flags.
Trailing whitespace / EOF newlines: fix with editor settings or
sed -i 's/[[:space:]]*$//' file.
Type errors: these usually require code changes, not auto-fix. Read the error carefully and fix the root cause.
Test failures: investigate the failure — is it a real bug introduced by your changes, or a pre-existing flaky test?
tools
Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-end type safety. Use when building TypeScript applications requiring advanced generics, conditional or mapped types, discriminated unions, monorepo setup, or full-stack type safety with tRPC.
development
Use when challenging ideas, plans, decisions, or proposals using structured critical reasoning. Invoke to play devil's advocate, run a pre-mortem, red team, or audit evidence and assumptions.
development
Systematic technical debt analysis across architecture, testing, documentation, and infrastructure. Investigates the codebase, scores findings by impact and effort, and generates a prioritized TECH_DEBT.md remediation plan. Delegates to specialized skills for code quality (scout) and linting (lint-fix). Use when assessing overall project health, planning cleanup sprints, or onboarding to an unfamiliar codebase.
testing
Install and configure Tailscale across platforms. Detects OS, distro, and environment (including WSL2 and containers). Verifies existing installations, performs platform-appropriate install, and guides initial connection. Use when setting up Tailscale on a new machine, onboarding a server to a tailnet, or verifying an existing install.