OpenParable
Skip to content
← Back to skills

Preprocessor Guard Hygiene

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

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. 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 __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.