From all-skills
Use this skill after every code change to run linting and type checking. Ensures code passes all lint checks, types are correct and consistent, and typing patterns match repo conventions. Trigger after writing or modifying code.
npx claudepluginhub oxhagolli/clawdskillz --plugin setup-skillsThis skill uses the workspace's default tool permissions.
After every code change, run the linter and type checker. Fix what they catch. No exceptions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
After every code change, run the linter and type checker. Fix what they catch. No exceptions.
Check for linting configuration in this order:
1. package.json scripts (lint, lint:fix, check, format)
2. Config files:
- .eslintrc.* / eslint.config.*
- .prettierrc.* / prettier.config.*
- pyproject.toml (ruff, black, flake8)
- setup.cfg / .flake8
- .rubocop.yml
- rustfmt.toml / .rustfmt.toml
- .golangci.yml
3. Makefile targets (lint, check, fmt)
4. CI config (.github/workflows/*.yml) - see what CI runs
Use what exists. Don't create new configs.
Run the linter command found in the repo:
# Common patterns - use what the repo has
npm run lint # JS/TS projects
npm run lint:fix # With auto-fix
pnpm lint # pnpm projects
yarn lint # yarn projects
ruff check . # Python (ruff)
ruff check . --fix # Python with fix
black --check . # Python (black)
flake8 . # Python (flake8)
cargo fmt --check # Rust
cargo clippy # Rust
go fmt ./... # Go
golangci-lint run # Go
If strict mode exists, use it:
npm run lint -- --max-warnings=0
ruff check . --strict
cargo clippy -- -D warnings
Find and run the repo's type checker:
# TypeScript
tsc --noEmit
npm run typecheck
# Python
mypy .
pyright .
python -m pyright
# Check pyproject.toml or mypy.ini for config
Use strict mode:
tsc --noEmit --strict
mypy --strict .
pyright --strict
Before adding types, check how the repo does it:
Find the pattern:
1. Look at 3-5 similar files in the repo
2. Note which typing approach they use
3. Match exactly
Consistency rules:
| If repo uses... | Then use... | Don't mix with... |
|---|---|---|
| TypeScript interfaces | interfaces | type aliases for objects |
| TypeScript type aliases | type aliases | interfaces for same purpose |
| Pydantic models | Pydantic | dataclasses or TypedDict |
| Python dataclasses | dataclasses | Pydantic or attrs |
| typing.TypedDict | TypedDict | Pydantic or dataclasses |
| attrs | attrs | dataclasses or Pydantic |
| Zod schemas | Zod | io-ts or yup |
Red flags:
Any when a proper type existsfrom typing import vs typing.)Fix inconsistencies:
# Bad - mixing styles
from pydantic import BaseModel
from dataclasses import dataclass
class UserRequest(BaseModel): ... # Pydantic
@dataclass
class UserResponse: ... # dataclass - inconsistent!
# Good - pick one, match repo
from pydantic import BaseModel
class UserRequest(BaseModel): ...
class UserResponse(BaseModel): ...
For each lint or type violation:
Never:
// eslint-disable or # noqa to bypass--ignore-pathOnly exception: If fixing would break functionality and the rule is genuinely wrong for this case, document why and get approval before disabling.
After all fixes:
# Run full lint check
npm run lint
# Run type check
tsc --noEmit
mypy .
# Run formatter check if separate
npm run format:check
prettier --check .
All must pass with zero warnings and zero type errors.
After running checks:
## Lint & Type Check Results
**Linter**: [command] | **Type checker**: [command]
**Mode**: [strict/standard]
**Initial violations**: [lint count] lint, [type count] type errors
**Fixes applied**:
- [file:line] - [what was fixed]
**Type consistency**: [consistent / issues found]
- [any inconsistencies noted]
**Final status**: [PASS / FAIL]
**Remaining issues** (if any):
- [issue] - Why: [reason]
JavaScript/TypeScript:
any types → Add proper types, never leave anyPython:
_Any usage → Replace with proper typesGo:
go fmt handles itRust:
cargo fmt handles itRun early, run often. Don't wait until you've written 500 lines to lint.
Fix immediately. Don't accumulate lint debt.
Trust the linter. If the repo configured a rule, there's a reason. Fix the code, don't fight the rule.
Stay in your lane. Don't cover: