{"id":55528,"plugin_id":"plugin_asdk_app_6abcd43bd3f48191857b19f011870399","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-10-26T12:07:42.661Z","digest":"7ceae1de6ce2eee59aa63e387d6d78ad9d933a525492f169c8fc19bc13bf15f7","against":null,"payload":{"description":"Scaffolds a Yes2SDK integration into the current project. Detects the engine, checks the install, then writes the init and ad loop with isSupported() guards.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":259}],"name":"yes2sdk-integrate","skill_md_contents":"---\nname: yes2sdk-integrate\ndescription: Scaffolds a Yes2SDK integration into the current project. Detects the engine, checks the install, then writes the init and ad loop with isSupported() guards.\n---\n\n# Scaffolding a Yes2SDK integration\n\nYes2SDK is one unified API that runs on every supported platform (poki,\ncrazygames, yandex, gamedistribution, youtube). Write the integration once and guard\nplatform-specific features with `isSupported()` so unsupported features no-op\ninstead of breaking.\n\nTarget platform: the one the user named. Default to `poki` when none was named.\n\n## Steps\n\n1. Establish the engine and the install state by following the `$yes2sdk-install`\n   skill, which holds the detection procedure and its preconditions. Do not ask the\n   user which engine they are on. Ask only if detection cannot determine one:\n   Defold (Lua, `yes2sdk.*`), Unity (C#, `Yes2SDK.Yes2SDK.*`), or plain TS/JS\n   (`Yes2SDK.*`). Use the matching naming convention in all generated code.\n2. **Stop here when the engine is `unity` or `defold` and the SDK is not\n   installed.** Generated code would reference a namespace or module that does not\n   resolve, so it cannot compile. Surface the install steps and write NO code\n   referencing `Yes2SDK`, the `yes2sdk` module or `window.Yes2SDK`. Say the install\n   is the blocker and offer to continue after it.\n\n   Do not stop on a `js` project. There `installed: no` is expected and permanent:\n   the web runtime is injected into the build at upload time, and its report lists\n   steps that are the build-and-upload flow, not a package to add. Generate the\n   code.\n3. Call `yes2sdk:get_quickstart` for the target platform.\n4. Call `yes2sdk:get_api_reference` for the `ads` and `lifecycle` modules to get\n   exact method signatures.\n5. Generate the integration following the mandatory loop, in this order:\n   - `initializeAsync()`: await it before any other SDK call.\n   - `startGameAsync()`: call only when the game is loaded and interactable,\n     never during a loading screen.\n   - `game.gameplayStart()` when play begins.\n   - `game.gameplayStop()` BEFORE showing any ad.\n   - `ads.showInterstitial(...)` (or rewarded): pause/mute in `beforeAd`, restore\n     in `afterAd`; for rewarded, grant the reward only in `adViewed`.\n   - `game.gameplayStart()` to resume after the ad.\n   - Wrap every optional-feature call (`auth`, `banners`, `friends`, and so on) in\n     its `isSupported()` guard.\n6. After writing the code, if the user has a built and extracted WebGL build,\n   follow the `$yes2sdk-verify` skill for the target platform and report any\n   FAILs and WARNs with fix hints. Otherwise say that verification runs once there\n   is a build.\n\nDo not call any platform SDK directly and do not invent SDK methods. Use only what\nthe quickstart and API reference document.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}