MCP.so
登录
维护manual

Knip Until Clean已精选

Find and remove dead exports, unused files, and orphan dependencies — loop until knip reports clean.

基本信息

分类

维护

目标

knip reports no unused code or dependencies

最大迭代次数

5

检查命令

npx knip

退出条件

knip exits 0

支持的智能体

Cursor

启动提示词

Start the "Knip Until Clean" loop.

Goal: knip reports no unused code or dependencies
Max iterations: 5
Between iterations run: npx knip
Exit when: knip exits 0

Step 1: Run knip. Remove dead exports and unused deps with minimal diffs; verify tests still pass.

Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.

步骤

  1. 1

    Run knip

    Run knip (or depcheck) and categorize unused files, exports, and dependencies.

    npx knip
  2. 2

    Remove or justify

    Delete confirmed dead code. For false positives, add knip ignore entries with a one-line reason.

评论

更多 维护 相关内容