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.

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

Install this agent skill to your local

npx skills add openharmonyinsight/openharmony-skills --skill cpp-include-sorter

Skill Files

The files that make up cpp-include-sorter.

Download Skill

More agent skills