返回 Skill 列表
extension
分类: 开发与工程无需 API Key

plan-reduce-max-lines

此技能应在降低最大文件行数阈值并修复所有违规时使用。它会更新eslint阈值配置,识别超出新限制的文件,生成包含重构策略的摘要,并制定计划和任务以拆分过大的文件。

person作者: jakexiaohubgithub

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:
    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.