Skip to content
Development
Skill

/lint

Runs linter+typechecker with auto-detected toolchain (ruff/mypy, eslint/tsc, phpstan, golangci-lint, clippy). Triggers: lint, typecheck, static analysis.

From plugin
ai-toolkit
180117 skills44 agents

Claude Code

$ npx -y skills add softspark/ai-toolkit --skill lint --agent claude-code

SKILL.md

lint.SKILL.md
name: lint
description: "Runs linter+typechecker with auto-detected toolchain (ruff/mypy, eslint/tsc, phpstan, golangci-lint, clippy). Triggers: lint, typecheck, static analysis."
effort: low
disable-model-invocation: true
argument-hint: "[path]"
allowed-tools: Bash, Read

Lint Runner

$ARGUMENTS

Run linting and type checking based on detected project type.

Project context

  • Project files: !`ls pyproject.toml package.json composer.json pubspec.yaml go.mod 2>/dev/null`

Auto-Detection

Run the bundled script to detect available linters:

python3 ${CLAUDE_SKILL_DIR}/scripts/detect-linters.py .

Usage

/lint [path]

Commands by Project Type

| Project Type | Lint Command | Type Check | |--------------|--------------|------------| | **Python** | `ruff check .` | `mypy .` | | **TypeScript/Node** | `npx eslint .` | `npx tsc --noEmit` | | **PHP** | `./vendor/bin/phpstan analyse` | - | | **Go** | `golangci-lint run` | - | | **Rust** | `cargo clippy` | - | | **Flutter/Dart** | `dart analyze` | - |

Python Projects

# Linting
ruff check .

# Type checking
mypy .

# Auto-fix
ruff check --fix .
ruff format .

TypeScript/Node Projects

# Linting
npx eslint .

# Type checking
npx tsc --noEmit

# Auto-fix
npx eslint --fix .

PHP Projects

# Static analysis
./vendor/bin/phpstan analyse

# Code style
./vendor/bin/phpcs
./vendor/bin/phpcbf  # auto-fix

Docker Execution (if applicable)

# Generic pattern - replace {container} with your app container
docker exec {container} make lint
docker exec {container} make typecheck

Quality Gates

  • Linting: 0 errors
  • Type checking: 0 errors (for new code)

Common Issues

| Error | Fix | |-------|-----| | Missing type hints | Add type annotations | | Unused imports | Remove or use `# noqa: F401` | | Line too long | Break line or disable for that line | | Import order | Let linter fix with `--fix` |

Rules

  • **MUST** auto-detect the linter from project config (`pyproject.toml`, `package.json`, `.eslintrc.*`, `composer.json`, `go.mod`, `Cargo.toml`, `pubspec.yaml`) — do not assume
  • **MUST** show the diff before applying any `--fix` run; the user owns the decision to accept auto-fixes
  • **NEVER** suppress lint errors with blanket `# noqa` or `eslint-disable-next-line` without naming the specific rule and a reason
  • **NEVER** run the formatter (ruff format, prettier, dprint) inside a lint pass unless the project has that wired explicitly — formatting and linting are separate concerns
  • **CRITICAL**: report the error count **before and after** any auto-fix — delta visibility is what makes the run trustworthy
  • **MANDATORY**: respect the project's lint config (`.ruff.toml`, `eslint.config.js`, `phpstan.neon`) — overriding project rules on the fly produces arguments during code review

Gotchas

  • `ruff check .` and `ruff format .` are **separate** commands in modern ruff (>0.1.0). Running only `ruff check` misses formatting drift; some repos expect both as part of "lint".
  • `mypy` without `--strict` has a permissive default: missing annotations count as `Any`, so the type checker silently accepts untyped functions. Check whether the project pins `strict = true` in `pyproject.toml` before declaring "0 type errors".
  • `eslint` follows `eslint.config.js` (flat config, ESLint 9+) OR `.eslintrc.*` (legacy). Mixing produces mysterious "no rules applied" errors. Check ESLint version first (`npx eslint --version`).
  • `phpstan` levels (0-10) silently affect which rules apply. A repo at level 5 has different expectations than level 9; report the level alongside the error count.
  • `golangci-lint` composes many linters; disabling one at the project level may still show its warnings if invoked with `--enable-all` flag. Check `.golangci.yml` before treating a warning as a new regression.
  • Dart analyze reports on **all** files including generated `*.g.dart`. Some projects expect generated files to be excluded via `analysis_options.yaml`; without it, lint noise dominates real issues.

When NOT to Use

  • To **fix** the errors — use `/fix` after this skill surfaces them
  • To run tests — use `/test`
  • For code review of logic and design — use `/review`
  • For security-specific static analysis (SAST) — use `/cve-scan` or `/security-patterns`
  • For project-specific rule authoring — edit the linter's config directly
Read more
@softspark
Ships withai-toolkit

AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling.

180117 skills44 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
180
Star history of softspark/ai-toolkit on GitHub, a chart by star-history.com

Other skills on ai-toolkit.

ai-toolkit-rules

ai-toolkit-rules

Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…

mem-search

mem-search

Searches past coding sessions for observations, decisions, context. Triggers: mem-search, recall session, past work, prior…

a11y-validate

a11y-validate

Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG, EAA, ARIA, contrast, keyboard, screen…

agent-creator

agent-creator

Creates new specialized agents with frontmatter, tools, delegation. Triggers: new agent, create agent, agent scaffold,…

analyze

analyze

Analyzes code quality, complexity, patterns across codebase. Triggers: quality report, hotspot scan, code analysis, architecture…

api-patterns

api-patterns

API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST,…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about lint.

Which coding agents can use lint?
lint installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.