[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M698X1ZGZZR9FSERXPRD5GDJ":3,"skill-same:01M698X1ZGZZR9FSERXPRD5GDJ":78},{"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":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M698X1ZGZZR9FSERXPRD5GDJ","bindings-synchronization","C++ API 跨语言绑定同步","Guidelines and SOP for synchronizing public C++ API changes (methods, enums, options structs)  to Java (Android JNI) and JavaScript\u002FTypeScript (Web\u002FWASM Embind).","用于同步公共 C++ API 变更（方法、枚举、选项结构体）到 Java (Android JNI) 和 JavaScript\u002FTypeScript (Web\u002FWASM Embind) 的指南和标准作业流程 (SOP)。","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\u002Fskills\u002Fbindings_synchronization\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TKQDF2K4KQS863Q79P4","开发参考","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"bindings synchronization","synchronization","api","changes","for","c++","options","methods","sop","public","typescript","java","guidelines","api changes","web","javascript","wasm","android","2026-11-10 10:12:30",false,"---\nname: bindings-synchronization\ndescription: >\n  Guidelines and SOP for synchronizing public C++ API changes (methods, enums, options structs) \n  to Java (Android JNI) and JavaScript\u002FTypeScript (Web\u002FWASM Embind).\n---\n\n# Cross-Platform Language Bindings Synchronization\n\nWhen making changes to public Filament C++ APIs, AI agents **must** ensure the changes are mirrored in the Java and JavaScript\u002FTypeScript binding layers.\n\n---\n\n## 1. Trigger Conditions\n\nYou must check and update the language bindings if your changes touch any public headers under `filament\u002Finclude\u002Ffilament\u002F`, specifically:\n- **New\u002FModified\u002FDeleted Methods** on core classes (e.g., `View`, `Engine`, `Camera`, `LightManager`, `RenderableManager`).\n- **Options Structs** (e.g., `AmbientOcclusionOptions`, `BloomOptions`, `FogOptions`).\n  > [!IMPORTANT]\n  > If you modify options structs defined in `filament\u002Finclude\u002Ffilament\u002FOptions.h`:\n  > 1. **Run `apigen`** to regenerate `View.java` and `View.cpp` (which host the Java POJO options structs and JNI bridges):\n  >    ```bash\n  >    python3 tools\u002Fapigen\u002Fgenerate_android.py -j\n  >    ```\n  > 2. **Run `beamsplitter`** to update JavaScript\u002FTypeScript bindings and C++ JSON settings serialization:\n  >    ```bash\n  >    cd tools\u002Fbeamsplitter && go run .\n  >    ```\n- **Enums & Constants** (e.g., `BlendMode`, `QualityLevel`, `AntiAliasing` under `filament\u002Finclude\u002Ffilament\u002F` or nested inside classes).\n\n---\n\n\n## 2. Java & Android JNI Synchronization\n\nAll JNI JNI-exported functions use automatic symbol resolution (dynamic mapping), meaning they are mapped by signature rather than a static registration table.\n\n### File Mappings\n- **Java Class**: `android\u002Ffilament-android\u002Fsrc\u002Fmain\u002Fjava\u002Fcom\u002Fgoogle\u002Fandroid\u002Ffilament\u002F\u003CClassName>.java`\n- **JNI C++ Wrapper**: `android\u002Ffilament-android\u002Fsrc\u002Fmain\u002Fcpp\u002F\u003CClassName>.cpp`\n\n### Guidelines\n1. **API Consistency**: Keep method visibility `public` (unless the API is strictly internal to the Java package). Follow Java naming conventions (camelCase).\n2. **Getter\u002FSetter Completeness**: If you add a Setter (e.g., `setFoo`), always add the corresponding Getter (e.g., `isFoo` or `getFoo`).\n3. **JNI Signature**:\n   - Native declarations in Java must be `private static native`.\n   - The corresponding C++ function in JNI must be decorated with `extern \"C\" JNIEXPORT \u003CReturnType> JNICALL Java_com_google_android_filament_\u003CClassName>_\u003CNativeMethodName>`.\n   - Return values from native C++ booleans should be cast to `jboolean` using `(jboolean)` or `static_cast\u003Cjboolean>()`.\n\n---\n\n## 3. JavaScript & TypeScript Synchronization\n\nFilament uses Emscripten's Embind to export C++ APIs to JS.\n\n### File Mappings\n- **Embind Source**: `web\u002Ffilament-js\u002Fjsbindings.cpp`\n- **Enums Embind Source**: `web\u002Ffilament-js\u002Fjsenums.cpp`\n- **TypeScript Definition**: `web\u002Ffilament-js\u002Ffilament.d.ts`\n- **JS Extension Wrappers**: `web\u002Ffilament-js\u002Fextensions.js`\n\n### Guidelines\n1. **Embind Registration**:\n   - Register member functions in `jsbindings.cpp` within the corresponding `class_\u003CClassName>(\"\u003CJSClassName>\")` block using `.function(\"methodName\", &ClassName::methodName)`.\n2. **TypeScript Declarations**:\n   - Always update `filament.d.ts` to match any changes. Every bound C++ method should have a corresponding declaration inside `export class \u003CClassName>` to avoid IDE type errors.\n3. **Complex Option Structs**:\n   - If you modify or add fields to an options struct (like `BloomOptions`), make sure to:\n     - Register the new fields in `jsbindings.cpp` using `.field(\"fieldName\", &ClassName::Options::fieldName)`.\n     - Update the TypeScript interface in `filament.d.ts` to include the new properties.\n     - Check if `extensions.js` contains a prototype-overrides wrapper for merging the options (e.g., `Filament.View.prototype.setBloomOptions`). Update the default options object if needed.\n\n---\n\n## 4. Verification Check\n\nBefore concluding a task:\n1. Double-check JNI signature signatures against the Java class.\n2. Verify that type bindings and return types match up.\n3. Verify that TS definitions in `filament.d.ts` are 100% synchronized.\n","# Cross-Platform Language Bindings Synchronization\n\nWhen making changes to public Filament C++ APIs, AI agents **must** ensure the changes are mirrored in the Java and JavaScript\u002FTypeScript binding layers.\n\n---\n\n## 1. Trigger Conditions\n\nYou must check and update the language bindings if your changes touch any public headers under `filament\u002Finclude\u002Ffilament\u002F`, specifically:\n- **New\u002FModified\u002FDeleted Methods** on core classes (e.g., `View`, `Engine`, `Camera`, `LightManager`, `RenderableManager`).\n- **Options Structs** (e.g., `AmbientOcclusionOptions`, `BloomOptions`, `FogOptions`).\n  > [!IMPORTANT]\n  > If you modify options structs defined in `filament\u002Finclude\u002Ffilament\u002FOptions.h`:\n  > 1. **Run `apigen`** to regenerate `View.java` and `View.cpp` (which host the Java POJO options structs and JNI bridges):\n  >    ```bash\n  >    python3 tools\u002Fapigen\u002Fgenerate_android.py -j\n  >    ```\n  > 2. **Run `beamsplitter`** to update JavaScript\u002FTypeScript bindings and C++ JSON settings serialization:\n  >    ```bash\n  >    cd tools\u002Fbeamsplitter && go run .\n  >    ```\n- **Enums & Constants** (e.g., `BlendMode`, `QualityLevel`, `AntiAliasing` under `filament\u002Finclude\u002Ffilament\u002F` or nested inside classes).\n\n---\n\n\n## 2. Java & Android JNI Synchronization\n\nAll JNI JNI-exported functions use automatic symbol resolution (dynamic mapping), meaning they are mapped by signature rather than a static registration table.\n\n### File Mappings\n- **Java Class**: `android\u002Ffilament-android\u002Fsrc\u002Fmain\u002Fjava\u002Fcom\u002Fgoogle\u002Fandroid\u002Ffilament\u002F\u003CClassName>.java`\n- **JNI C++ Wrapper**: `android\u002Ffilament-android\u002Fsrc\u002Fmain\u002Fcpp\u002F\u003CClassName>.cpp`\n\n### Guidelines\n1. **API Consistency**: Keep method visibility `public` (unless the API is strictly internal to the Java package). Follow Java naming conventions (camelCase).\n2. **Getter\u002FSetter Completeness**: If you add a Setter (e.g., `setFoo`), always add the corresponding Getter (e.g., `isFoo` or `getFoo`).\n3. **JNI Signature**:\n   - Native declarations in Java must be `private static native`.\n   - The corresponding C++ function in JNI must be decorated with `extern \"C\" JNIEXPORT \u003CReturnType> JNICALL Java_com_google_android_filament_\u003CClassName>_\u003CNativeMethodName>`.\n   - Return values from native C++ booleans should be cast to `jboolean` using `(jboolean)` or `static_cast\u003Cjboolean>()`.\n\n---\n\n## 3. JavaScript & TypeScript Synchronization\n\nFilament uses Emscripten's Embind to export C++ APIs to JS.\n\n### File Mappings\n- **Embind Source**: `web\u002Ffilament-js\u002Fjsbindings.cpp`\n- **Enums Embind Source**: `web\u002Ffilament-js\u002Fjsenums.cpp`\n- **TypeScript Definition**: `web\u002Ffilament-js\u002Ffilament.d.ts`\n- **JS Extension Wrappers**: `web\u002Ffilament-js\u002Fextensions.js`\n\n### Guidelines\n1. **Embind Registration**:\n   - Register member functions in `jsbindings.cpp` within the corresponding `class_\u003CClassName>(\"\u003CJSClassName>\")` block using `.function(\"methodName\", &ClassName::methodName)`.\n2. **TypeScript Declarations**:\n   - Always update `filament.d.ts` to match any changes. Every bound C++ method should have a corresponding declaration inside `export class \u003CClassName>` to avoid IDE type errors.\n3. **Complex Option Structs**:\n   - If you modify or add fields to an options struct (like `BloomOptions`), make sure to:\n     - Register the new fields in `jsbindings.cpp` using `.field(\"fieldName\", &ClassName::Options::fieldName)`.\n     - Update the TypeScript interface in `filament.d.ts` to include the new properties.\n     - Check if `extensions.js` contains a prototype-overrides wrapper for merging the options (e.g., `Filament.View.prototype.setBloomOptions`). Update the default options object if needed.\n\n---\n\n## 4. Verification Check\n\nBefore concluding a task:\n1. Double-check JNI signature signatures against the Java class.\n2. Verify that type bindings and return types match up.\n3. Verify that TS definitions in `filament.d.ts` are 100% synchronized.\n",{"name":5,"description":7},"main","fd9ec7ff9510df148011c5326bcb50d4bfb811ca","skills\u002Fbindings_synchronization",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":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add google\u002Ffilament --skill bindings-synchronization",{"tool":70,"command":71},"bunx","bunx skills add google\u002Ffilament --skill bindings-synchronization",{"tool":73,"command":74},"pnpm","pnpm dlx skills add google\u002Ffilament --skill bindings-synchronization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fbindings_synchronization\u002FSKILL.md",true,[],[79,107,126,148,173,193],{"skillNo":80,"name":81,"nameZh":82,"description":83,"descriptionZh":84,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":85,"categories":86,"keywords":91,"publishedAt":49},"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",[87,88],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":89,"categoryName":90,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRSRXQPYT60FQ3976GDV4Q","C++ 开发",[92,93,94,95,96,97,98,99,100,101,102,103,104,105,106],"filament math","math","when","code","vector","correct","primitives","use","coordinate","enforce","conventions","Mathematical","naming","naming conventions","performing",{"skillNo":108,"name":109,"nameZh":110,"description":111,"descriptionZh":112,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":113,"categories":114,"keywords":117,"publishedAt":49},"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）时使用此技能。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Ftools\u002Fai\u002Fagents\u002Fskills\u002Ffilament_lifetime\u002FSKILL.md",[115,116],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":89,"categoryName":90,"taxonomyType":23,"taxonomyTypeDesc":24},[118,99,119,120,101,121,97,122,123,124,94,125],"filament lifetime","rendering","creation","pipelines","gpu","destruction","object","entities",{"skillNo":127,"name":128,"nameZh":129,"description":130,"descriptionZh":131,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":132,"categories":133,"keywords":138,"publishedAt":49},"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",[134,135],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":136,"categoryName":137,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[139,140,141,142,94,143,99,144,145,146,147],"pick","cherry pick","branch","open","user","backport","commit","pr","release",{"skillNo":149,"name":150,"nameZh":151,"description":152,"descriptionZh":153,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":154,"categories":155,"keywords":158,"publishedAt":49},"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",[156,157],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":89,"categoryName":90,"taxonomyType":23,"taxonomyTypeDesc":24},[159,160,161,162,163,164,165,166,167,99,168,169,36,170,171,172],"protocols","verification","verification protocols","core","run","pipeline","format","engine","execute","files","build","tests","source","standard",{"skillNo":174,"name":175,"nameZh":176,"description":177,"descriptionZh":178,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":179,"categories":180,"keywords":183,"publishedAt":49},"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",[181,182],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":89,"categoryName":90,"taxonomyType":23,"taxonomyTypeDesc":24},[184,185,186,187,94,188,189,190,191,36,101,99,192],"hygiene","guard","preprocessor guard hygiene","Rules","directives","conditional","imports","inclusion","macro",{"skillNo":194,"name":195,"nameZh":196,"description":197,"descriptionZh":198,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":199,"categories":200,"keywords":203,"publishedAt":49},"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",[201,202],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":89,"categoryName":90,"taxonomyType":23,"taxonomyTypeDesc":24},[204,205,206,94,36,101,168,99,207],"header self containment","containment","self","file"]