# Preprocessor Guard Hygiene

> Preprocessor Guard Hygiene is an Agent Skill for development published in the google/filament repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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

- Skill name: `preprocessor-guard-hygiene`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/google/filament/blob/HEAD/skills/preprocessor_guard_hygiene/SKILL.md
- Repository: google/filament (20,258 GitHub stars when collected)

## 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.

---

Source: https://www.openparable.com/skill/development/preprocessor-guard-hygiene (OpenParable). Cite the canonical URL above.
