Agent Skills › google/filament › filament-build-clean

filament-build-clean

GitHub

提供Filament引擎桌面端的构建与清理标准流程,涵盖全量清理、Debug/Release编译及Ninja增量构建。特别指出材质生成时的双目录陷阱及正确重建顺序,确保开发调试与发布效率。

skills/filament_build_clean/SKILL.md google/filament

Trigger Scenarios

需要清理构建产物或重置环境时 编译Filament桌面端Debug版本用于调试时 编译Filament桌面端Release版本用于性能分析时 使用Ninja进行快速迭代构建时

Install

npx skills add google/filament --skill filament-build-clean -g -y
More Options

Use without installing

npx skills use google/filament@filament-build-clean

指定 Agent (Claude Code)

npx skills add google/filament --skill filament-build-clean -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": "filament-build-clean",
    "description": "Clean and build Filament targets for development, debugging, and production. Use this skill whenever you need to clean the workspace or compile desktop targets."
}

Filament Build & Clean Protocols

This skill defines standard procedures and command configurations for cleaning build artifacts and compiling Filament targets on desktop platforms.

1. Full Clean of All Builds

To completely reset the build environment and remove all compiled artifacts, caches, and generated files across all platforms:

./build.sh -C

2. Compiling Desktop Debug Build

For active development, local debugging, and interactive testing, compile the desktop target with debug symbols and no optimizations:

./build.sh -ip desktop debug

3. Compiling Desktop Release Build

For performance analysis, optimizations, profiling, and running local benchmarks on desktop systems, compile the release build:

./build.sh -ip desktop release

4. Incremental Builds with Ninja

For fast iteration you may invoke ninja directly against an existing build directory:

ninja -C out/cmake-debug <target>

Beware of the second build directory. Materials are not compiled by out/cmake-debug/tools/matc/matc. Every material rule in build.ninja invokes the split-build copy of the host tools at out/prebuilt-tools-release/tools/matc/matc. See build_tools_for_split_build in build.sh; note that SPLIT_BUILD_TYPE defaults to release, so this path is prebuilt-tools-release even for a debug build.

As a result, after changing anything that feeds shader generation — libs/filamat/, libs/filabridge/, shaders/, or third_party/spirv-cross/ — a plain ninja -C out/cmake-debug will rebuild and relink binaries while silently reusing stale .filamat files. This produces confusing runtime shader compilation errors in which freshly generated code is mixed with previously generated code.

Rebuild the host tools first:

ninja -C out/prebuilt-tools-release matc resgen
ninja -C out/cmake-debug <target>

./build.sh -ip desktop debug performs both steps automatically, so prefer it when in doubt.

Version History

  • 5e56624 Current 2026-09-22 20:38

    文档化Split Build工具目录机制,说明直接Ninja构建可能复用过时.mat文件导致着色器错误的问题,并补充两步Ninja构建的规避方案。

  • d8b4a37 2026-08-20 07:30

Same Skill Collection

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_desktop_testing/SKILL.md
skills/header_self_containment/SKILL.md
skills/preprocessor_guard_hygiene/SKILL.md
skills/verification_protocols/SKILL.md
tools/ai/agents/skills/filament_lifetime/SKILL.md
tools/ai/agents/skills/filament_math/SKILL.md

Metadata

Files
0
Version
ef1a133
Hash
e498d18d
Indexed
2026-08-20 07:30

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-05 20:36
浙ICP备14020137号-1