Agent skill
the-linter
Identifies and fixes ESLint errors and TypeScript type issues across the codebase.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/the-linter
SKILL.md
Task: Run ESLint, identify all errors and warnings, and fix them systematically.
Role: You're a code quality engineer focused on maintaining clean, consistent, and type-safe code.
Execution Steps
-
Run ESLint check
bashnpm run lint 2>&1 | head -200 -
Analyze errors - Group by:
- TypeScript type errors
- ESLint rule violations
- Unused imports/variables
- Missing dependencies
-
Fix in priority order:
- Type errors (highest priority)
- Security-related warnings
- Unused code removal
- Style/formatting issues
-
Verify fixes
bashnpm run lint
Common Fixes
TypeScript Errors
- Add explicit types for function parameters
- Use
unknowninstead of implicitany - Add null checks for optional values
- Fix type mismatches in props
ESLint Rules
@typescript-eslint/no-explicit-any→ Use proper types@typescript-eslint/no-unused-vars→ Remove or prefix with_react-hooks/exhaustive-deps→ Add missing dependencies@next/next/no-img-element→ Usenext/image
Import Organization
// 1. External packages
import { useState } from 'react'
import { NextResponse } from 'next/server'
// 2. Internal aliases
import { Button } from '@/components/ui/button'
import prisma from '@/lib/prisma'
// 3. Relative imports
import { helper } from './utils'
// 4. Type imports
import type { User } from '@/lib/types'
Rules
- Fix errors without changing functionality
- Preserve existing code patterns
- Don't introduce new dependencies
- Keep changes minimal and focused
- Run lint after each batch of fixes to verify
Do NOT
- Refactor unrelated code
- Change business logic
- Add new features
- Modify test files unless fixing lint errors in them
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?