[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M698XRXR5Q463GQ03RDBD9FR":3,"skill-same:01M698XRXR5Q463GQ03RDBD9FR":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M698XRXR5Q463GQ03RDBD9FR","filament-lifetime","Filament 对象生命周期管理","Enforce correct Filament object creation and destruction lifecycles. Use this skill when initializing rendering pipelines or allocating\u002Fdeallocating GPU buffers and entities.","确保 Filament 对象创建与销毁生命周期的正确性。在初始化渲染管线或分配\u002F释放 GPU 缓冲区和实体（entity）时使用此技能。","google\u002Ffilament","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698W8SGYAMBEGYBK16J57R1",20747,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Ftools\u002Fai\u002Fagents\u002Fskills\u002Ffilament_lifetime\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRXQPYT60FQ3976GDV4Q","C++ 开发","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42],"filament lifetime","gpu","correct","use","pipelines","enforce","creation","rendering","destruction","object","when","entities","2026-11-10 10:12:30",false,"---\nname: filament-lifetime\ndescription: >\n  Enforce correct Filament object creation and destruction lifecycles.\n  Use this skill when initializing rendering pipelines or allocating\u002Fdeallocating GPU buffers and entities.\n---\n\n# Filament object creation and destruction lifecycles\n\nFilament manages its own native allocations. To prevent segmentation faults and memory leaks, follow these rules:\n\n## 1. ECS Entities & Components\n#### Getting the Entity Manager\n*   **Preferred Method**: Retrieve the `EntityManager` directly from the `Engine` instance:\n    `utils::EntityManager& em = engine->getEntityManager();`\n*   **Alternative (Avoid if engine is available)**: Only use the global singleton if the `Engine` pointer is inaccessible:\n    `utils::EntityManager& em = utils::EntityManager::get();`\n\n#### Entities\n*   **Create**: Create Entity IDs using the entity manager:\n    `utils::Entity entity = engine->getEntityManager().create();`\n*   **Destroy**: Free the Entity ID from the entity manager:\n    `engine->getEntityManager().destroy(entity);`\n\n#### Components\n*   **Create**: Attach components to an existing entity using manager builders:\n    *   *Renderables\u002FLights*: Use `RenderableManager::Builder` or `LightManager::Builder` on the entity:\n        ```cpp\n        RenderableManager::Builder(1)\n            .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vb, ib)\n            .material(0, matInstance)\n            .build(*engine, entity);\n        ```\n    *   *Cameras*: Attach a Camera component to the entity:\n        `Camera* camera = engine->createCamera(entity);`\n*   **Destroy (CRITICAL)**:\n    1.  **To clean up the entire entity**:\n        First, destroy all Filament-managed components on the entity:\n        `engine->destroy(entity);`\n        Second, free the Entity ID:\n        `engine->getEntityManager().destroy(entity);`\n        ```cpp\n        \u002F\u002F Correct Entity Cleanup\n        engine->destroy(myEntity);\n        engine->getEntityManager().destroy(myEntity);\n        ```\n    2.  **To remove a single component from the entity**:\n        You can destroy specific components individually without deleting the entity:\n        *   *Cameras*: `engine->destroyCameraComponent(entity);`\n        *   *Transforms*: `engine->getTransformManager().destroy(entity);`\n        *   *Renderables*: `engine->getRenderableManager().destroy(entity);`\n\n## 2. Engine-Managed Native Objects\nNative GPU objects are created using the `Engine` factory or nested `Builder` patterns.\n*   **NO `delete`**: Never call standard C++ `delete` on pointers returned by `Engine`.\n*   **Direct Factories**: Instantiated directly from the `Engine` instance.\n    *   *Objects*: `View`, `Scene`, `Renderer`, `SwapChain`.\n    *   *Pattern*:\n        ```cpp\n        View* view = engine->createView();\n        \u002F\u002F ...\n        engine->destroy(view);\n        ```\n*   **Builder Pattern**: Instantiated using a nested `Builder` class, passing the engine instance to `build(*engine)`.\n    *   *Objects*: `VertexBuffer`, `IndexBuffer`, `Texture`, `Material`, `IndirectLight`, `Skybox`, `RenderTarget`.\n    *   *Pattern*:\n        ```cpp\n        VertexBuffer* vb = VertexBuffer::Builder()\n            .vertexCount(count)\n            .bufferCount(1)\n            .attribute(VertexAttribute::POSITION, 0, VertexBuffer::AttributeType::FLOAT3)\n            .build(*engine);\n        \u002F\u002F ...\n        engine->destroy(vb);\n        ```\n","# Filament object creation and destruction lifecycles\n\nFilament manages its own native allocations. To prevent segmentation faults and memory leaks, follow these rules:\n\n## 1. ECS Entities & Components\n#### Getting the Entity Manager\n*   **Preferred Method**: Retrieve the `EntityManager` directly from the `Engine` instance:\n    `utils::EntityManager& em = engine->getEntityManager();`\n*   **Alternative (Avoid if engine is available)**: Only use the global singleton if the `Engine` pointer is inaccessible:\n    `utils::EntityManager& em = utils::EntityManager::get();`\n\n#### Entities\n*   **Create**: Create Entity IDs using the entity manager:\n    `utils::Entity entity = engine->getEntityManager().create();`\n*   **Destroy**: Free the Entity ID from the entity manager:\n    `engine->getEntityManager().destroy(entity);`\n\n#### Components\n*   **Create**: Attach components to an existing entity using manager builders:\n    *   *Renderables\u002FLights*: Use `RenderableManager::Builder` or `LightManager::Builder` on the entity:\n        ```cpp\n        RenderableManager::Builder(1)\n            .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vb, ib)\n            .material(0, matInstance)\n            .build(*engine, entity);\n        ```\n    *   *Cameras*: Attach a Camera component to the entity:\n        `Camera* camera = engine->createCamera(entity);`\n*   **Destroy (CRITICAL)**:\n    1.  **To clean up the entire entity**:\n        First, destroy all Filament-managed components on the entity:\n        `engine->destroy(entity);`\n        Second, free the Entity ID:\n        `engine->getEntityManager().destroy(entity);`\n        ```cpp\n        \u002F\u002F Correct Entity Cleanup\n        engine->destroy(myEntity);\n        engine->getEntityManager().destroy(myEntity);\n        ```\n    2.  **To remove a single component from the entity**:\n        You can destroy specific components individually without deleting the entity:\n        *   *Cameras*: `engine->destroyCameraComponent(entity);`\n        *   *Transforms*: `engine->getTransformManager().destroy(entity);`\n        *   *Renderables*: `engine->getRenderableManager().destroy(entity);`\n\n## 2. Engine-Managed Native Objects\nNative GPU objects are created using the `Engine` factory or nested `Builder` patterns.\n*   **NO `delete`**: Never call standard C++ `delete` on pointers returned by `Engine`.\n*   **Direct Factories**: Instantiated directly from the `Engine` instance.\n    *   *Objects*: `View`, `Scene`, `Renderer`, `SwapChain`.\n    *   *Pattern*:\n        ```cpp\n        View* view = engine->createView();\n        \u002F\u002F ...\n        engine->destroy(view);\n        ```\n*   **Builder Pattern**: Instantiated using a nested `Builder` class, passing the engine instance to `build(*engine)`.\n    *   *Objects*: `VertexBuffer`, `IndexBuffer`, `Texture`, `Material`, `IndirectLight`, `Skybox`, `RenderTarget`.\n    *   *Pattern*:\n        ```cpp\n        VertexBuffer* vb = VertexBuffer::Builder()\n            .vertexCount(count)\n            .bufferCount(1)\n            .attribute(VertexAttribute::POSITION, 0, VertexBuffer::AttributeType::FLOAT3)\n            .build(*engine);\n        \u002F\u002F ...\n        engine->destroy(vb);\n        ```\n",{"name":5,"description":7},"main","fd9ec7ff9510df148011c5326bcb50d4bfb811ca","tools\u002Fai\u002Fagents\u002Fskills\u002Ffilament_lifetime",2305,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament","https:\u002F\u002Fgoogle.github.io\u002Ffilament\u002F","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 13:54:43",{"source":9,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add google\u002Ffilament --skill filament-lifetime",{"tool":64,"command":65},"bunx","bunx skills add google\u002Ffilament --skill filament-lifetime",{"tool":67,"command":68},"pnpm","pnpm dlx skills add google\u002Ffilament --skill filament-lifetime","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Ftools\u002Fai\u002Fagents\u002Fskills\u002Ffilament_lifetime\u002FSKILL.md",true,[],[73,95,117,143,163,178],{"skillNo":74,"name":75,"nameZh":76,"description":77,"descriptionZh":78,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":79,"categories":80,"keywords":83,"publishedAt":43},"01M698XTTZP1MWPYW9EVV7DF2Q","filament-math","Filament 数学运算与坐标变换","Enforce correct mathematical primitives and naming conventions in Filament code. Use this skill when performing coordinate transformations, vector math, or projection setups.","确保 Filament 代码中数学原语和命名约定的正确性。在执行坐标变换、向量运算或投影设置时使用此技能。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Ftools\u002Fai\u002Fagents\u002Fskills\u002Ffilament_math\u002FSKILL.md",[81,82],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[84,85,41,86,87,88,89,90,91,36,92,34,33,93,94],"math","filament math","primitives","performing","naming conventions","naming","Mathematical","conventions","coordinate","vector","code",{"skillNo":96,"name":97,"nameZh":98,"description":99,"descriptionZh":100,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":101,"categories":102,"keywords":107,"publishedAt":43},"01M698XQ0E9RE6RDFYKS2PF1S1","cherry-pick","Git 提交 cherry-pick 与回填","Cherry-pick a commit onto another branch and open the PR. Use when the user asks to cherry-pick or backport a commit or PR to a release branch.","将某个提交 cherry-pick 到另一个分支并创建 PR。当用户要求将某个提交或 PR cherry-pick 或回填（backport）到发布分支时使用。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fthird_party\u002Fdawn\u002Fthird_party\u002Fdirectx-shader-compiler\u002Fsrc\u002F.github\u002Fskills\u002Fcherry-pick\u002FSKILL.md",[103,104],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":105,"categoryName":106,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[108,109,110,111,112,113,114,41,34,115,116],"pick","cherry pick","commit","pr","release","backport","open","user","branch",{"skillNo":118,"name":119,"nameZh":120,"description":121,"descriptionZh":122,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":123,"categories":124,"keywords":127,"publishedAt":43},"01M698XN2P44Y956SJRD7CPB22","verification-protocols","C++ 代码验证流程","Standard verification pipeline to execute after modifying C++ source or header files. Use this skill to format includes, build the engine, and run core tests.","修改 C++ 源文件或头文件后需执行的标准验证流程。使用此技能格式化 include 语句、构建引擎并运行核心测试。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fverification_protocols\u002FSKILL.md",[125,126],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[128,129,130,131,132,133,134,34,135,136,137,138,139,140,141,142],"verification protocols","protocols","verification","standard","c++","build","tests","files","source","execute","core","run","pipeline","format","engine",{"skillNo":144,"name":145,"nameZh":146,"description":147,"descriptionZh":148,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":149,"categories":150,"keywords":153,"publishedAt":43},"01M698XK6J428QZM1WGVWW50JE","preprocessor-guard-hygiene","C++ 预处理保护规范检查","Enforce preprocessor guard rules and macro-dependent inclusion hygiene in C++. Use this skill when modifying conditional imports or preprocessor directives.","在 C++ 中强制实施预处理保护（preprocessor guard）规则以及依赖宏的包含卫生规范。在修改条件导入或预处理指令时使用此技能。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fpreprocessor_guard_hygiene\u002FSKILL.md",[151,152],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[154,155,156,157,158,34,36,132,159,160,161,162,41],"guard","preprocessor guard hygiene","hygiene","macro","Rules","inclusion","imports","conditional","directives",{"skillNo":164,"name":165,"nameZh":166,"description":167,"descriptionZh":168,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":169,"categories":170,"keywords":173,"publishedAt":43},"01M698XHA1J01F915DKYHXZ18C","header-self-containment","C++ 头文件自包含检查","Enforce strict header self-containment so that every header file compiles independently. Use this skill when creating or modifying C++ header files.","强制实施严格的头文件自包含规范，确保每个头文件都能独立编译。在创建或修改 C++ 头文件时使用此技能。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fheader_self_containment\u002FSKILL.md",[171,172],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[174,175,176,132,36,135,34,177,41],"self","containment","header self containment","file",{"skillNo":179,"name":180,"nameZh":181,"description":182,"descriptionZh":183,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":184,"categories":185,"keywords":192,"publishedAt":43},"01M698XEWJYPD7AB62DAQ3RMMC","filament-desktop-testing","Filament 桌面端测试","Execute unit tests and performance benchmarks for Filament on desktop platforms. Use this skill to run and filter tests or benchmarks locally.","在桌面平台执行 Filament 的单元测试和性能基准测试。使用此技能在本地运行并筛选测试或基准测试。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Ffilament_desktop_testing\u002FSKILL.md",[186,189],{"categoryNo":187,"categoryName":188,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":190,"categoryName":191,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[193,194,195,196,197,198,199,200,134,201,34,137,139,202,203],"desktop testing","filament desktop testing","testing","desktop","performance benchmarks","for","unit","filter","benchmarks","unit tests","performance"]