[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M698X1ZGZZR9FSERXPRD5GDJ":3,"skill-same:01M698X1ZGZZR9FSERXPRD5GDJ":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M698X1ZGZZR9FSERXPRD5GDJ","bindings-synchronization",null,"Guidelines and SOP for synchronizing public C++ API changes (methods, enums, options structs)  to Java (Android JNI) and JavaScript\u002FTypeScript (Web\u002FWASM Embind).","google\u002Ffilament","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698W8SGYAMBEGYBK16J57R1",20747,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fbindings_synchronization\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"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":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add google\u002Ffilament --skill bindings-synchronization",{"tool":58,"command":59},"bunx","bunx skills add google\u002Ffilament --skill bindings-synchronization",{"tool":61,"command":62},"pnpm","pnpm dlx skills add google\u002Ffilament --skill bindings-synchronization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fbindings_synchronization\u002FSKILL.md",true,[],[67,89,104,120,141,157],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":37},"01M698XTTZP1MWPYW9EVV7DF2Q","filament-math","Enforce correct mathematical primitives and naming conventions in Filament code. Use this skill when performing coordinate transformations, vector math, or projection setups.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Ftools\u002Fai\u002Fagents\u002Fskills\u002Ffilament_math\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88],"filament math","math","when","code","vector","correct","primitives","use","coordinate","enforce","conventions","Mathematical","naming","naming conventions","performing",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":37},"01M698XRXR5Q463GQ03RDBD9FR","filament-lifetime","Enforce correct Filament object creation and destruction lifecycles. Use this skill when initializing rendering pipelines or allocating\u002Fdeallocating GPU buffers and entities.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Ftools\u002Fai\u002Fagents\u002Fskills\u002Ffilament_lifetime\u002FSKILL.md",[],[96,81,97,98,83,99,79,100,101,102,76,103],"filament lifetime","rendering","creation","pipelines","gpu","destruction","object","entities",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":37},"01M698XQ0E9RE6RDFYKS2PF1S1","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.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fthird_party\u002Fdawn\u002Fthird_party\u002Fdirectx-shader-compiler\u002Fsrc\u002F.github\u002Fskills\u002Fcherry-pick\u002FSKILL.md",[],[111,112,113,114,76,115,81,116,117,118,119],"pick","cherry pick","branch","open","user","backport","commit","pr","release",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":37},"01M698XN2P44Y956SJRD7CPB22","verification-protocols","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.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fverification_protocols\u002FSKILL.md",[],[127,128,129,130,131,132,133,134,135,81,136,137,24,138,139,140],"protocols","verification","verification protocols","core","run","pipeline","format","engine","execute","files","build","tests","source","standard",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":37},"01M698XK6J428QZM1WGVWW50JE","preprocessor-guard-hygiene","Enforce preprocessor guard rules and macro-dependent inclusion hygiene in C++. Use this skill when modifying conditional imports or preprocessor directives.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fpreprocessor_guard_hygiene\u002FSKILL.md",[],[148,149,150,151,76,152,153,154,155,24,83,81,156],"hygiene","guard","preprocessor guard hygiene","Rules","directives","conditional","imports","inclusion","macro",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":37},"01M698XHA1J01F915DKYHXZ18C","header-self-containment","Enforce strict header self-containment so that every header file compiles independently. Use this skill when creating or modifying C++ header files.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffilament\u002Fblob\u002Fmain\u002Fskills\u002Fheader_self_containment\u002FSKILL.md",[],[164,165,166,76,24,83,136,81,167],"header self containment","containment","self","file"]