# Plan Reduce Max Lines

> This skill should be used when reducing the maximum file lines threshold and fixing all violations. It updates the eslint threshold configuration, identifies files exceeding the new limit, generates a brief with refactoring strategies, and creates a plan with tasks to split oversized files.

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

---


# Reduce Max Lines

Target threshold: $ARGUMENTS lines per file

If no argument provided, prompt the user for a target.

## Step 1: Gather Requirements

1. **Read current config** from eslint thresholds (eslint.thresholds.json or similar)
2. **Run lint** with the new threshold to find violations:
   ```bash
   bun run lint 2>&1 | grep "max-lines"
   ```
3. **Note for each violation**:
   - File path
   - Current line count

If no violations at $ARGUMENTS, report success and exit.

## Step 2: Compile Brief and Delegate

Compile the gathered information into a structured brief:

```
Reduce max file lines threshold to $ARGUMENTS.

Files exceeding threshold (ordered by line count):
1. [file] - [current] lines (target: $ARGUMENTS)
2. ...

Configuration change: eslint.thresholds.json, maxLines to $ARGUMENTS

Refactoring strategies: extract modules, remove duplication, delete dead code, simplify logic

Verification: `bun run lint 2>&1 | grep "max-lines" | wc -l` → Expected: 0
```

Invoke `/plan-execute` with this brief to create the implementation plan.

