# Fix Linter Error

> fixing all violations of one or…

- Skill: `codyswanngt/fix-linter-error` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add codyswanngt/fix-linter-error`
- Raw SKILL.md: https://api.skillmd.com/api/skills/codyswanngt/fix-linter-error/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: codyswanngt (https://skillmd.com/u/codyswanngt)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/codyswanngt/fix-linter-error

---


# Fix Linter Errors

Target cops: $ARGUMENTS

If no arguments provided, prompt the user for at least one RuboCop cop name.

## Step 1: Gather Requirements

1. **Parse cops** from $ARGUMENTS (space-separated)
2. **Run RuboCop** to collect all violations:
   ```bash
   bundle exec rubocop --format json 2>&1
   ```
3. **Group violations** by cop, then by file, noting:
   - File path and line numbers
   - Violation count per file
   - Sample offense messages

## Step 2: Compile Brief and Delegate

Compile the gathered information into a structured brief:

```
Fix RuboCop violations for cops: $ARGUMENTS

Violations by cop:
- [CopName1]: X total violations across Y files
  - [file]: N violations (lines: ...)
  - ...
- [CopName2]: X total violations across Y files
  - ...

Fix strategies: extract methods, reduce complexity, apply auto-correct where safe

Verification: `bundle exec rubocop --format simple 2>&1 | grep -E "($ARGUMENTS)" | wc -l` -> Expected: 0
```

Invoke `/implement` with this brief to create the implementation plan.

