Agent Skills: cpp-include-sorter

Automatically sorts C/C++ header files (#include statements) with full support for conditional compilation blocks. Use when Claude needs to organize #include statements in .cpp/.h files. Handles: (1) Corresponding header placement first (e.g., file.cpp includes file.h), (2) System headers (<>) sorted alphabetically, (3) Local headers ("") sorted alphabetically, (4) Conditional compilation blocks (#ifdef/#ifndef/#if defined) where headers participate in global sort while preserving block structure. Key features: prefers longer paths for duplicate includes, preserves inline/preceding comments, handles #elif/#else blocks, validates no headers are lost.

UncategorizedID: openharmonyinsight/openharmony-skills/cpp-include-sorter

Install this agent skill to your local

pnpm dlx add-skill https://github.com/openharmonyinsight/openharmony-skills/cpp-include-sorter

Skill Files

Browse the full folder contents for cpp-include-sorter.

Download Skill

Loading file tree…

Select a file to preview its contents.