fix-knip-unused-exports
CommunityMake knip unused exports pass cleanly
Software Engineering#typescript#refactoring#monorepo#knip#unused exports#lint fixes#barrel re-exports
AuthoroElberte
Version1.0.0
Installs0
System Documentation
What problem does it solve?
knip reports “Unused exports” in TypeScript monorepos, and the underlying issue varies (test-only exports, dead barrel re-exports, or exports used only internally), so blindly changing code can break tests or lint rules.
Core Features & Use Cases
- Classify each knip violation category by scanning the whole repo while excluding test files to determine the correct fix strategy.
- Apply targeted fixes: extract test-only exports into a new file, remove unused re-exports from index.ts barrels, or un-export internally-only-used symbols by removing the export keyword.
- Verify safely after each change by re-running knip plus compile, tests, and lint to catch secondary issues like filename-match-export and test-imports-source.
Quick Start
Run npm run knip, then for each flagged export decide whether it is test-only, a dead barrel re-export, or internally-only-used, apply the corresponding fix, and re-run knip, typecheck, test, and lint.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: fix-knip-unused-exports Download link: https://github.com/oElberte/dotfiles/archive/main.zip#fix-knip-unused-exports Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.