AGENT SKILL

preprocessor-guard-hygiene

Enforce preprocessor guard rules and macro-dependent inclusion hygiene in C++. Use this skill when modifying conditional imports or preprocessor directives.

License 许可
Apache-2.0
所属仓库
google/filament
最近更新
2026-11-14
Stars
★ 2.1w
Forks
2.3k

01 前言 Front Matter

name
preprocessor-guard-hygiene
description
Enforce preprocessor guard rules and macro-dependent inclusion hygiene in C++. Use this skill when modifying conditional imports or preprocessor directives.

03 SKILL.md 正文

Preprocessor Guard Hygiene

  • Simple Guarded Includes: Headers wrapped inside single-line preprocessor guards (like #if __EXCEPTIONS or #if defined(__ARM_NEON)) must remain wrapped and are sorted alphabetically within their correct layer.
  • Macro-Dependent Templating: Never modify or split includes that are tightly coupled with macro configurations (such as #define UTILS_PRIVATE_IMPLEMENTATION_NON_COPYABLE in ostream.cpp). The reorganize_headers.py safety check will automatically detect and skip these; respect these skips.

04 同仓库更多 Skills