Preprocessor Guard Hygiene
Developmentpreprocessor-guard-hygienePreprocessor 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.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/google/filament/blob/HEAD/skills/preprocessor_guard_hygiene/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/preprocessor-guard-hygiene, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Preprocessor Guard Hygiene
- Simple Guarded Includes: Headers wrapped inside single-line preprocessor guards (like
#if __EXCEPTIONSor#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_COPYABLEinostream.cpp). Thereorganize_headers.pysafety check will automatically detect and skip these; respect these skips.