What problem does it solve?
Large C and C++ codebases often suffer from excessive and unnecessary header includes that increase compile times, cause wide compilation cascades, and make dependency reasoning difficult; this Skill helps identify and remove unused includes while adding any missing direct includes to ensure correctness and faster builds.
Core Features & Use Cases
- Interpret include-what-you-use (IWYU) output to determine which headers should be added or removed and explain the rationale.
- Recommend forward declarations versus full includes to minimize downstream compile costs and provide guidance on when each is appropriate.
- Integrate IWYU into build systems and CI by using compile_commands.json, mapping files, and CMake integration patterns to automate detection and remediation of header bloat.
- Use mapping files to resolve indirect or platform-specific header relationships and to teach IWYU about third-party or STL mappings.
Quick Start
Run IWYU against your project's build (using iwyu or iwyu_tool.py), pipe the report to fix_include to apply suggested changes, then rebuild and run tests to validate.