Agent Skills
› google/filament
› header-self-containment
header-self-containment
GitHub强制C++头文件自包含,确保每个头文件可独立编译。要求显式声明类型依赖,禁止假设前置include已提供定义,适用于创建或修改C++头文件场景。
触发场景
创建新的C++头文件
修改现有C++头文件
安装
npx skills add google/filament --skill header-self-containment -g -y
SKILL.md
Frontmatter
{
"name": "header-self-containment",
"description": "Enforce strict header self-containment so that every header file compiles independently. Use this skill when creating or modifying C++ header files."
}
Strict Header Self-Containment
Every header file (.h) in Filament must be fully self-contained and compile independently.
- Rule: Never assume a header's type dependencies (like
FrameGraphHandle) are pre-declared by preceding includes in a.cppfile. - Action: Always explicitly
#includethe declaring header (e.g.,fg/FrameGraphId.h) inside the header itself.
版本历史
- d8b4a37 当前 2026-08-20 07:30


