用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/fabis94/better-soundcloud-feed --skill remove-unused-code命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | remove-unused-code |
| description | Scan the codebase for unused files, dependencies, and exports using Knip and clean them up |
Identify and remove unused files, dependencies, exports, and types.
check:unused runs Knip twice (production then full):
Production pass (knip --production): Traces from production entry points only. Test files excluded from project scope. Checks unused files and dependencies only — export/type analysis is disabled (deferred to full pass where test context is available).
Full pass (knip): Includes test files as entries. Checks everything — unused exports, types, dead imports, etc.
Why two passes: Without the production pass, code imported only by tests appears "used." The production pass narrows scope to surface truly dead production code.
pnpm check:unused # both passes (fail-fast)
pnpm check:unused:prod # production pass only
pnpm check:unused:full # full pass only
pnpm check:unused
If the combined script stops at the production pass, run check:unused:prod and check:unused:full separately to see both.
Knip reports these categories:
package.json but never importedpackage.jsonKnip can report false positives. Grep for each item before removing.
When false positives are found, add a /** @knipignore */ JSDoc comment above the export. The knip config uses tags: ["-knipignore"] to exclude tagged items.
pnpm remove <package>export keyword; if truly unused, deletepnpm add <package>pnpm check:unused # should be clean
pnpm test # tests still pass
pnpm typecheck # types still check
SC API types in src/shared/types.ts are exported as a complete set even if not all are consumed yet. These use @knipignore tags. Do not remove them — they document the full API surface.
Some dependencies are tools not imported in source code (e.g., universal-ai-config) or are re-exported from another package (e.g., @voidzero-dev/vite-plus-test from vite-plus). These are listed in ignoreDependencies in knip.ts.
Knip may flag items in ignoreDependencies as unnecessary. Do not remove them without verifying — they may be needed for reasons knip can't detect (CLI tools, bundled re-exports, global type augmentations).