Automatically fix ESLint errors by modifying code to comply with linting rules. For small codebases (≤20 errors), fixes directly. For larger codebases (>20 errors), spawns parallel agents per directory for efficient processing. Never disables rules or adds ignore comments.
Automatically fixes ESLint errors by modifying code to comply with linting rules. For small codebases (≤20 errors), fixes directly. For larger codebases (>20 errors), spawns parallel agents per directory for efficient processing. Never disables rules or adds ignore comments.
/plugin marketplace add otrebu/agents/plugin install development-lifecycle@otrebu-dev-toolsThis skill is limited to using the following tools:
guidelines.mdscripts/analyze_errors.shAutomatically fix ESLint errors by modifying code to comply with configured linting rules.
Priorities:
Run the analysis script to understand error distribution:
bash ./.claude/skills/fix-eslint/scripts/analyze_errors.sh
Or with file pattern:
bash ./.claude/skills/fix-eslint/scripts/analyze_errors.sh "src/**/*.ts"
This outputs:
If ≤20 errors: Proceed to Step 3 (Direct Fix) If >20 errors: Proceed to Step 4 (Parallel Fix)
For small error counts, fix directly without spawning agents.
Run ESLint to get errors:
pnpm lint [file-or-directory]
For each file with errors:
eslint-disable comments or modify ESLint config./guidelines.md for detailed fixing guidelinesVerify each fix:
pnpm lint <file-path>
Repeat until all errors fixed
At the end, provide:
For large error counts, orchestrate parallel fix-eslint agents by directory.
⚠️ CRITICAL: Follow steps IN ORDER. DO NOT skip ahead.
⚠️ MUST complete before Step 4.2
Use the output from Step 1 (the analyze_errors.sh script) to create directory-to-files mapping:
src/auth/ → [login.ts, register.ts, session.ts]src/api/ → [users.ts, posts.ts]src/components/ → [Button.tsx, Header.tsx, Footer.tsx]Grouping rules:
Use TodoWrite to create one todo per directory:
TodoWrite: [
{content: "Fix ESLint errors in src/auth/", activeForm: "Fixing ESLint errors in src/auth/", status: "pending"},
{content: "Fix ESLint errors in src/api/", activeForm: "Fixing ESLint errors in src/api/", status: "pending"},
{content: "Fix ESLint errors in src/components/", activeForm: "Fixing ESLint errors in src/components/", status: "pending"}
]
✅ CHECKPOINT: Verify all todos created before Step 4.2
⚠️ DO NOT START until Step 4.1 fully complete
Update all todos to in_progress:
TodoWrite: [
{content: "Fix ESLint errors in src/auth/", activeForm: "Fixing ESLint errors in src/auth/", status: "in_progress"},
{content: "Fix ESLint errors in src/api/", activeForm: "Fixing ESLint errors in src/api/", status: "in_progress"},
{content: "Fix ESLint errors in src/components/", activeForm: "Fixing ESLint errors in src/components/", status: "in_progress"}
]
IMPORTANT: Spawn ALL agents in SINGLE message using multiple Task tool calls.
Example Task invocations:
Task 1 (src/auth/):
prompt: "Fix all ESLint errors in the src/auth/ directory.
Files with errors:
- src/auth/login.ts
- src/auth/register.ts
- src/auth/session.ts
See ./.claude/skills/fix-eslint/guidelines.md for detailed guidelines.
Process:
1. For each file, run: pnpm lint <file-path>
2. Read the file with errors
3. Fix each error by modifying code to comply with rule
4. NEVER add eslint-disable comments or modify eslint config
5. Verify: run pnpm lint <file-path> again to confirm fix
Report back:
- List of files processed
- Total errors fixed
- Brief summary (e.g., '8 unused imports removed, 3 return types added')
- Any remaining errors (if unable to fix)"
subagent_type: "general-purpose"
description: "Fix auth directory ESLint errors"
Task 2 (src/api/):
prompt: "Fix all ESLint errors in the src/api/ directory.
Files with errors:
- src/api/users.ts
- src/api/posts.ts
See ./.claude/skills/fix-eslint/guidelines.md for detailed guidelines.
Process:
1. For each file, run: pnpm lint <file-path>
2. Read the file with errors
3. Fix each error by modifying code to comply with rule
4. NEVER add eslint-disable comments or modify eslint config
5. Verify: run pnpm lint <file-path> again to confirm fix
Report back:
- List of files processed
- Total errors fixed
- Brief summary of main fixes
- Any remaining errors"
subagent_type: "general-purpose"
description: "Fix API directory ESLint errors"
Continue pattern for all directory batches...
Claude Code manages parallelism (up to 10 tasks concurrently).
As each agent completes:
TodoWrite: [
{content: "Fix ESLint errors in src/auth/", activeForm: "Fixing ESLint errors in src/auth/", status: "completed"},
{content: "Fix ESLint errors in src/api/", activeForm: "Fixing ESLint errors in src/api/", status: "in_progress"},
{content: "Fix ESLint errors in src/components/", activeForm: "Fixing ESLint errors in src/components/", status: "in_progress"}
]
After ALL agents complete:
Run final verification:
pnpm lint 2>&1
Aggregate results from all agent reports:
Summary:
- Total directories processed: X
- Total files modified: Y
- Total errors fixed: Z
- Breakdown by directory:
• src/auth/: 12 errors fixed in 3 files
• src/api/: 8 errors fixed in 2 files
• src/components/: 15 errors fixed in 3 files
- Remaining errors: N (if any)
If remaining errors exist, report which files/directories still have issues
Only 1 file with errors:
Errors spread across many directories (15+):
src/, tests/, lib/)Large directory (20+ files):
Agent reports remaining errors:
For detailed fixing guidelines, constraints, and patterns, see:
./guidelines.md - Complete fixing rules and processThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.