Knip Until Clean
Find and remove dead exports, unused files, and orphan dependencies — loop until knip reports clean.
起動プロンプト
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.基本情報
カテゴリ
メンテナンス
目標
knip reports no unused code or dependencies
最大反復回数
5
検査コマンド
npx knip
退出条件
knip exits 0
対応エージェント
Cursor
手順
- 1
Run knip
Run knip (or depcheck) and categorize unused files, exports, and dependencies.
npx knip - 2
Remove or justify
Delete confirmed dead code. For false positives, add knip ignore entries with a one-line reason.
他のメンテナンスのループ
Docs Sync After Edits
After code changes, find affected docs and update README, API references, and inline comments to match.
Security Audit Weekly
Weekly npm audit scan, triage vulnerabilities by severity, and propose or apply safe patches.
Dependency Upgrade One-by-One
Upgrade a single outdated package per iteration, fix breakages, and commit — safer than bulk npm update.
Dependency Audit Weekly
Weekly loop to check outdated dependencies, propose safe upgrades, and open a summary.