Agent Skillsgoogle/filament › preprocessor-guard-hygiene

preprocessor-guard-hygiene

GitHub

规范C++头文件预处理守卫和宏依赖包含的卫生规则,确保条件导入正确包裹并按层排序,禁止修改与宏紧密耦合的包含指令。

skills/preprocessor_guard_hygiene/SKILL.md google/filament

触发场景

修改C++条件导入或预处理指令时 涉及头文件重组织或包含顺序调整时

安装

npx skills add google/filament --skill preprocessor-guard-hygiene -g -y
更多选项

不安装直接使用

npx skills use google/filament@preprocessor-guard-hygiene

指定 Agent (Claude Code)

npx skills add google/filament --skill preprocessor-guard-hygiene -a claude-code -g -y

安装 repo 全部 skill

npx skills add google/filament --all -g -y

预览 repo 内 skill

npx skills add google/filament --list

SKILL.md

Frontmatter
{
    "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."
}

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.

版本历史

  • d8b4a37 当前 2026-08-20 07:30

同 Skill 集合

skills/bindings_synchronization/SKILL.md
skills/code_review/SKILL.md
skills/cpp_header_inclusion/SKILL.md
skills/cpp_static_thread_safety/SKILL.md
skills/filament_android_development/SKILL.md
skills/filament_build_clean/SKILL.md
skills/filament_desktop_testing/SKILL.md
skills/header_self_containment/SKILL.md
skills/verification_protocols/SKILL.md
tools/ai/agents/skills/filament_lifetime/SKILL.md
tools/ai/agents/skills/filament_math/SKILL.md

元信息

文件数
0
版本
d30bc32
Hash
a267e2c3
收录时间
2026-08-20 07:30

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 23:07
浙ICP备14020137号-1 $访客地图$