Identifies and removes redundant TypeScript barrel files to simplify module architecture and improve codebase maintainability.
The Check Barrel Files skill automates the detection of unnecessary index.ts files that serve as single-item re-exporters. It scans your specified directory to find intermediate barrel files that add no structural value, providing a detailed markdown report of the findings. Beyond just reporting, it offers an intelligent auto-fix capability that updates parent export paths to point directly to the source file and safely deletes the redundant index files, streamlining your project's import graph and reducing boilerplate.
主要功能
01Automated detection of single-export index.ts files
02Identification of redundant intermediate re-export patterns
03Interactive auto-fix for updating parent imports
04Detailed Markdown reporting with summary tables and recommendations
050 GitHub stars
06Safe deletion of unnecessary barrel files after path resolution
使用场景
01Refactoring large TypeScript monorepos to reduce import nesting
02Optimizing IDE indexing performance by reducing file counts
03Cleaning up boilerplate after library or UI migrations