src/main/resources/targets/claude/skills/core/code/x-lint-code/SKILL.md
Analyzes source code with the appropriate linter for {{LANGUAGE}}. Second step in the pre-commit chain (RULE-007: format -> lint -> compile -> commit). Supports --fix, --changed-only, and --strict modes.
npx skillsauth add edercnj/ia-dev-environment x-lint-codeInstall 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.
Runs static analysis on {{PROJECT_NAME}} source code using the appropriate linter for {{LANGUAGE}}. Second step of the pre-commit chain (RULE-007: format -> lint -> compile -> commit). Detects bugs, code smells, naming violations, and convention deviations before commit.
/x-lint-code -- lint entire project, report errors and warnings/x-lint-code --fix -- auto-fix violations where supported; re-stage corrected files/x-lint-code --changed-only -- lint only modified files (staged + unstaged)/x-lint-code --strict -- treat warnings as errors (exit 1 on any warning)/x-lint-code --fix --changed-only -- auto-fix only changed files| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| --fix | Flag | off | Auto-correct fixable violations; re-stage corrected files via git add |
| --changed-only | Flag | off | Analyze only files from git diff --name-only + git diff --cached --name-only |
| --strict | Flag | off | Treat warnings as errors; exit 1 if any warning exists |
--fix, source files are corrected in place and re-staged.[{SEVERITY}] {file}:{line} -- {rule-id}: {description}, and final Result: {PASS | FAIL}.## Error Envelope below.references/full-protocol.md §1.Chain-wide error matrix. Canonical
format -> lint -> compile -> commitrows live in_shared/error-handling-pre-commit.md. Rows below arex-lint-code-specific.
| Scenario | Exit | Behavior |
|----------|------|----------|
| No findings (or INFO-only) | 0 (PASS) | Proceed to next chain step |
| WARNING-only findings without --strict | 0 (PASS) | Proceed; warnings listed in report |
| WARNING findings with --strict | 1 (FAIL) | Block chain; exit with warning count |
| Any ERROR findings | 1 (FAIL) | Block chain; exit with error list |
| Linter not installed | 1 | Suggest installation command |
| No source files found (empty scope) | 0 | Report "No files to analyze" |
| Linter config missing | 0 (with WARN) | Use linter defaults; warn about missing config |
| Linter command fails (internal error) | 1 | Report stderr details |
| --changed-only with no changed files | 0 | Report "No modified files" |
| --fix leaves unfixable errors | 1 | Report remaining errors after fix attempt |
Minimum viable contract above. The 7-step workflow (detect → scope → primary lint → secondary lint → fix → categorize → report), full language/linter mapping with --fix commands, severity-classification rules, and per-language notes (Java checkstyle/spotbugs/pmd details, Kotlin ktlint/detekt, TypeScript eslint, Python ruff/pylint, Go golangci-lint, Rust clippy) live in references/full-protocol.md per ADR-0012 (skill body slim-by-default). Happy-path invocation from the pre-commit chain reads only this SKILL.md.
| Skill | Relationship | Context |
|-------|-------------|---------|
| x-format-code | precedes | Format runs before lint in pre-commit chain |
| x-commit-changes | orchestrator | Invokes this skill as step 3b of its chain |
| x-review-codebase | complementary | Review provides deeper analysis; lint catches basics |
| x-audit-code | complementary | Audit runs lint as part of full codebase check |
| Variable | Description | Example |
|----------|-------------|---------|
| {{LANGUAGE}} | Project language | java |
| {{BUILD_TOOL}} | Project build tool | maven |
| {{BUILD_TOOL_CMD}} | CLI prefix for build tool | mvn / ./gradlew / npx |
| {{PROJECT_NAME}} | Project name | my-java-cli |
testing
Scaffolds a Helidon SE/MP service with routing, health, config, Dockerfile, and tests.
tools
Generates a Picocli @Command with subcommands, options, converters, and unit tests.
testing
Scaffolds a Micronaut service with @Controller, DI, health, Dockerfile, and tests.
testing
Scaffolds a Helidon SE/MP service with routing, health, config, Dockerfile, and tests.