[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BY1FDVXW2DD39345XB1HNA":3,"skill-same:01M6BY1FDVXW2DD39345XB1HNA":76},{"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":23,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":12,"ownerDescription":61,"updatedAt":62,"install":63,"resources":75},"01M6BY1FDVXW2DD39345XB1HNA","native-game",null,"Build or revise a playable 2D or 3D game in NodeTool's built-in engine: create and edit the document, generate and install art and audio, playtest and autoplay a route, capture frames, publish, and prepare a standalone web build. Also the entry point for making a game look or feel better. For a glTF model use nodetool-3d-scene. For nodetool.games calls inside a code action use api-games.","nodetool-ai\u002Fnodetool","nodetool-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F164873569?v=4","01M6BXPFDW36K9K1MR8ZH63HG2","nodetool.ai","01M6BXPFJ893XM219GQN60B0WK",635,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fnative-game\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"native","game","native game","model","point","action","standalone","revise","route","Art","install","edit","nodetool","gltf","engine","Audio","3D","api","publish","code","generate","create","prepare","web","2026-11-10 10:12:30",false,"---\nname: native-game\ndescription: \"Build or revise a playable 2D or 3D game in NodeTool's built-in engine: create and edit the document, generate and install art and audio, playtest and autoplay a route, capture frames, publish, and prepare a standalone web build. Also the entry point for making a game look or feel better. For a glTF model use nodetool-3d-scene. For nodetool.games calls inside a code action use api-games.\"\nfeatured: true\n---\n\n# Build a native game\n\nCreate and edit a versioned built-in game document. The engine owns simulation,\nrendering, and web export. The default is a playable 2D top-down room.\nUse `dimension: \"3d\"` for an exploration blockout with a capsule controller,\nfollow camera, ramps, a moving platform, a crate and scripted interactions.\n\nLoad `game-direction` before the first edit of a new game, an art overhaul, or\na game that plays but feels flat. Lock its style string, layer plan, feel\nparameters, and pacing sheet, then keep later edits and asset prompts\nconsistent with that spec. Load `native-game-reference` when an edit needs\nscript hooks, events, lighting, effects, particles, 3D rendering, the audio mix,\nanimation graphs, input bindings, the HUD tree or performance fields. Load\n`native-game-performance` before building a 3D game and before reporting any\ngame as done. Load `api-games` before calling `nodetool.games` from a code\naction.\n\n## Build and revise\n\n1. `create_native_game {project_id, name, dimension?}` creates a playable draft\n   and returns its full id and current immutable revision. Resource ids may be\n   full ids or exact 12-character prefixes.\n2. `get_native_game {game_id, view: \"outline\"}` reads the compact draft outline.\n   Use `view: \"entity\"` with `entity_id` for one entity or `view: \"full\"` for\n   the whole document. `source: \"revision\"` reads an immutable revision.\n3. `edit_native_game {game_id, base_updated_at?, ops}` applies ordered ops to\n   the draft and validates the result atomically. Use the `draft_updated_at`\n   from a read for compare-and-swap when an edit depends on that exact state.\n   Invalid edits return an op index and field path. A generated level can\n   replace the whole draft with `ops: [{op: \"set_document\", document}]`. The\n   replacement preserves the stored game id and revision and supports undo.\n4. Prove it plays.\n   `playtest_native_game {game_id, inputs?, assertions?, capture_ticks?}` runs\n   the draft for up to 18,000 ticks, subject to the wall time budget. An input\n   can repeat with `ticks`. `justPressed` fires on the first repeated tick.\n   `autoplay_native_game {game_id, target_prefix? | win?, player_id?, seed?,\n   max_ticks?}` steers a supported 2D player and returns an executed `route`,\n   observed win tick, target contacts, and authored level stats. It needs a\n   player with a `movement` behavior, or a script player with `left` and\n   `right` actions, and takes jump from a `jump`, `space` or `up` action. A\n   prefix selects every matching authored collider, whose IDs must be unique\n   across scenes. Win steering targets\n   collectibles or an authored `win` or `victory` trigger. Other scripted goals\n   need `target_prefix`. A failed steering search or exhausted budget does not\n   prove the game impossible. Replay `route` as playtest `inputs` with the same\n   seed, and check `route_complete` before accepting the replay. A target\n   contact alone does not prove completion.\n5. Assert what the replay proves. 2D playtests accept three forms, and any\n   other returns `Unsupported assertion`:\n   - `{event: \"win\", before_tick?}` requires an engine win or a scripted `win`\n     or `victory` trigger. `{event: \"\u003Cname>\"}` requires that emitted event.\n   - `{entity_id, near: {x, y, tolerance}, at_tick?}` checks a position.\n   - `{no_script_errors: true}` fails on the first script error.\n   3D playtests add `region`, `grounded` and `replay_matches` (see 3D authoring).\n6. Look at it. `capture_native_game_frame {game_id, ticks?, sheet?}` renders up\n   to eight frames and returns image refs (`asset_id`, `uri`), not pixels. Call\n   `view_image` on each ref you judge, as a direct tool call, before reporting\n   visual changes or polish. Inside a code action the pixels cannot arrive.\n   `sheet: true` returns one contact sheet. Captures report `cancelled`,\n   `wall_time_limited`, and `route_complete`. An interrupted capture returns\n   only frames rendered before interruption.\n7. Pass the performance gate before you report the game as done, and again at\n   each milestone: blockout, art pass, effects pass. With a shell, run\n   `nodetool game bench`, `nodetool game capture --fail-on-budget` and\n   `nodetool game perf --fail-on-budget` on a route through the busiest part of\n   the game, as `native-game-performance` describes. The game passes when all\n   three exit 0. Report the measured tick p95, frame p95, draw calls and\n   triangles. Without a shell, apply that skill's budgets and authoring rules\n   and give the user the `nodetool game perf` command.\n8. Generate assets (see Assets). Confirm scope before spending.\n9. `publish_native_game {game_id, base_revision}` publishes the current draft\n   only when the user asks. For an explicit `document`, pass the paired\n   `draft_updated_at` returned by `get_native_game` as `base_updated_at`. On a\n   conflict, read the draft and reconcile edits.\n10. `build_native_game {game_id, revision?, target?}` writes a standalone web\n    player for an owned revision under the project workspace and returns its\n    path, only when the user asks. `target: \"tauri\"` writes a Tauri desktop app\n    project instead, named after the game. It compiles to installers with\n    `npm run build` where Rust is installed. `target: \"expo\"` writes an Expo\n    project for iOS and Android that plays the game offline in a WebView. It\n    runs with `npm install && npx expo start`. On a touch screen the 2D player adds a floating stick for\n    `left`\u002F`right`\u002F`up`\u002F`down` and one button per other input action, labeled\n    with the action name. Installed media must still exist, match its recorded\n    digest, and use a supported format.\n\n## Build a complete document\n\nAuthor a whole level in a code action with the `@nodetool-ai\u002Fsandbox-game` pack.\nRead its signatures and an example with\n`nodetool.packs.docs(\"@nodetool-ai\u002Fsandbox-game\")` (the direct tool is\n`get_sandbox_package_docs`). It exports `game`, `entity`, `script`,\n`registerAssets`, `fill`, `plank`, `arc`, `constructGame` and `saveGame`. Asset\nregistration records bindings, and installation supplies the bytes.\n`saveGame({name, document}, {games: nodetool.games, project_id})` creates a\ngame and saves the generated draft in one edit. To replace an existing draft,\npass `game_id` and its last-read `base_updated_at` instead of `project_id`.\n`api-games` covers `constructGame` and retained rebuilds. Publish separately\nwhen requested.\n\n`list_example_games {query?}` discovers shipped references.\n`get_example_game {slug: \"kindle\"}` reads its outline. Use `view: \"entity\"`\nwith `entity_id` to study the controller or `view: \"full\"` for the document.\nKindle is the platformer benchmark for layered art, aligned poses, terrain\nedges, feel, and pacing. `install_example_game {project_id, slug}` copies a\nbundle and its verified media into the project. A raw example document has\n`package:\u002F\u002F` bindings. Install the bundle before editing it as a user game.\n\nFor a workflow-based brief, `design_game` writes its design and `build_game\n{workflow_id, save?}` creates or selects the native game and stages its asset\ngraph. The graph's generated media are candidates until installed.\n\n## Scripts during play\n\nEdit an existing script through `edit_native_game` with an `update_behavior`\ndocument op. Supply `entity_id`, `index` and `behavior: {source}` to preserve the\nscript limits. The editor compiles changed sources\nduring play and continues at the current tick with\nexisting script state. A compile failure keeps the previous source running and\nreports the error in the Console. Only source edits apply during play. Use\n**Restart from tick 0** to apply other draft changes or reset script state.\nChanging between a function and lifecycle-object script requires a restart.\n\nA successful reload starts a new replay checkpoint at the current tick. Saved\nplay states use the accepted script document. Earlier checkpoints belong to\nolder source code and cannot be loaded into the changed session.\n\n## Assets\n\nGeneration spends provider credits, and no tool prices it in advance. Before\nthe first generation, state which slots, kinds, prompts and models you plan,\nand get the user's go-ahead unless the request already authorized that scope.\nDo not invent a dollar estimate. Reuse a prior authorization instead of asking\nagain. Importing an `input_file` and building a `lut` cost nothing. Report\nactual spend with `get_cost_summary`.\n\nCall `browse_native_game_assets {game_id}` before replacing or regenerating\nart. It returns every bound asset with `usedBy`, prefabs with their instances,\nscenes with the assets they use, the staged candidates under the game's\n`assets\u002F` folder, and `slot_requests`. A slot request is the template slot's\nprompt and image preparation, or the prompt recorded with the asset now bound.\nUse it to regenerate in the same style. Narrow the lists with `query` and\n`kind`. `staleSiblings` lists `\u003Cslot>.frame.N` and `\u003Cslot>.tile.M` bindings that\nstill point at the slot's previous bytes. Rebind them with `bind_asset` ops\nbefore publishing, or the sheet's animations keep drawing the old art.\n\n`generate_game_asset {game_id, slot, kind, prompt?, input_file?, provider?,\nmodel?}` generates or imports, prepares, installs, and binds an asset. `kind` is\n`image`, `audio` (speech), `music`, `sfx`, `font`, `model` or `collider`.\n`sfx` uses an explicit registered `node_type` and its `params`, or imports an\nexisting audio file. `font` imports a TrueType or OpenType `input_file` and has\nno generation model. An `input_file` is an owned asset URI or current workspace\npath. `reference_slot` generates an image from an installed slot's image, which\nkeeps a new asset in the locked style. `install: false` stages a 2D candidate\nwithout binding it. For a slow model, pass `background: true`, await the\nreturned generation, then call `generate_game_asset` again with\n`generation_id` and the same game, slot, kind, prompt, and preparation.\n\n`install_native_game_asset {game_id, slot, binding, candidate_workspace_id?}`\ninstalls a staged candidate and binds it to the draft. The staged bytes must\nmatch `binding.digest`. To bind an earlier candidate, call\n`browse_native_game_assets {game_id, digest, slot}` and pass the returned\n`binding` and `draft_updated_at`. An unrecorded image or audio file gets a\nbinding derived from its bytes. An unrecorded collider must be restaged.\n\nImage preparation supports alpha trim, target size and crop policy, pivot,\nsampling, and mirror tiling. Choose at most one of these atlas or grade modes:\n\n| Preparation | Result |\n|---|---|\n| `sheet: {cols, rows, baseline?}` | Slices a row-major sheet, trims each pose, and aligns the feet on one output row. Returns equal-sized atlas `frames` and bindings named `\u003Cslot>.frame.\u003Cindex>`. `baseline` is a zero-based output foot row. |\n| `tileset: {tileWidth?, tileHeight?, edges?, highlight?, shadow?}` | Builds 16 terrain variants with baked exposed-edge treatments. Returns `tiles` and `\u003Cslot>.tile.\u003Cmask>` bindings. Mask bits are top `1`, right `2`, bottom `4`, left `8`. |\n| `lut: {size?, brightness?, contrast?, saturation?, lift?, gain?, gamma?}` | Creates an opaque packed `size² × size` color cube from numeric grade settings, without a generation model. Bind it to a `lut` render effect. |\n\nUse returned atlas rectangles as animator frames or tile frames. Keep the\nlocked style string in every generated visual prompt. Review foot alignment,\nterrain joins, lighting, and grade in viewed captures before accepting the art\npass.\n\n## Audio\n\nInstall music in an audio slot, then use `update_scene {scene_id, set: {music:\n{assetId, volume, fadeInTicks, fadeOutTicks, streaming}}}` in 2D or 3D.\n`assetId` names the installed slot. `volume` ranges from 0 to 1 and each fade\nranges from 0 to 600 ticks. A scene transition overlaps the outgoing fade out\nand incoming fade in.\n\nFor long tracks set `streaming: {loopStartSeconds, loopEndSeconds?}`. The\nbrowser streams the asset through the music bus without decoding the whole\ntrack. Loop start defaults to 0 seconds. Loop end must exceed loop start,\nand both are bounded by 86400 seconds. Omit loop end to loop to the track's\nend. Omit `streaming` for decoded music. Loading a snapshot positions music at\nthe saved logical tick within the loop. Browser audio needs a user gesture.\n\nUse `set_audio {mixer}` for mixer buses and `audioSource` for triggered effects.\nSee `native-game-reference` § Audio mix and spatial audio for their fields.\n\n## 3D authoring\n\nCreate with `dimension: \"3d\"` and optional `template: \"exploration\"`.\nThe document uses `schemaVersion: 3`, `engineVersion: \"2\"`, meters, Y up,\nforward `-Z`, and quaternion rotations `[x, y, z, w]`. A game keeps its\ndimension. Read the returned outline before editing. The 2D sandbox helpers and\nsprite preparation retain their 2D contracts.\n\nKeep controller, body, collider and interactions on a gameplay root. Put the\nreplaceable model on a visual child using `parentId`. Physics roots have unit\nscale and one pose owner. `character3d` requires a kinematic body and a capsule.\nDynamic props use primitives or prepared convex hulls. Triangle meshes require\nstatic bodies. Collision category and mask use 16 bits in 3D. Shared friction\nand restitution belong in named `physicsMaterials` that colliders reference by\n`physicsMaterial`. Each scene names one `activeCameraId`. The camera supports perspective or orthographic projection\nand fixed or follow behavior.\n\n`generate_game_asset {game_id, slot, kind: \"model\", input_file, preparation?}`\nimports an owned GLB or glTF. Provider generation requires an explicit\nregistered `node_type` with its `params`. Preparation normalizes dependencies to\na closed GLB, records bounds and stable `node:\u003Cindex>`\u002F`clip:\u003Cindex>`\nselectors, and checks resource budgets. Import settings specify `scale`,\n`forward` (`-z`, `+z`, `+x`, `-x`) and `origin` (`preserve`, `ground`,\n`centerGround`). For glTF with separate files, pass `dependency_files` as a map\nfrom declared buffer or image URI to an owned workspace path. Unresolved\ndependencies fail preparation. `kind: \"collider\"` builds collision geometry\nfrom a GLB or glTF, or accepts an already prepared collider JSON, and requires\n`preparation.shape`: `convexHull` for a dynamic prop or `triangleMesh` for\nstatic level geometry. Model and collider results are candidates. Review them,\nthen call `install_native_game_asset` with the returned binding and draft\ntimestamp. Reinstall after editing source model bytes. The model editor\n(`nodetool-3d-scene`) edits model assets. Gameplay stays in the game document.\n\nA `set_prefab` definition includes `rootId`, `entities`, `externalAssets` and\n`externalScenes`. `instantiate_prefab` clones that subtree with a new\n`instance_id` and remaps internal entity references. Each runtime instance owns\nits script state, physics bodies and animation state. Bind prepared clips\nthrough `animator3d.clips`. An idle\u002Frun\u002Fjump rig can replace the placeholder\nvisual without changing its root controller or collider.\n\n3D script input adds analog `axes`, `look`, XYZ `entity.position`\u002F`velocity`,\n`grounded`, world entities and query observations. It preserves isolated JSON\nstate, seeded `random`, and previous-tick event delivery. Use `characterIntent`\nfor character motion, `setKinematicPose` for kinematic targets, `impulse` or\n`setVelocity` for dynamic bodies, and `teleport` for explicit discontinuities.\nFor continuous acceleration, return `{kind: \"addForce\", force: {x, y, z}}`,\n`{kind: \"addTorque\", torque: {x, y, z}}` or\n`{kind: \"addForceAtPoint\", force: {x, y, z}, point: {x, y, z}}`.\nThe vectors and application point use world space. These commands act on the\nissuing entity's active dynamic body and accumulate for one simulation tick.\nReturn them each tick to keep applying a load. An offset point also produces\ntorque. Static, kinematic and absent bodies reject them. 2D scripts do not\nsupport them.\n`setVisual` changes only a nonphysical visual. `spawn` accepts a prefab and XYZ\nposition, rotation and velocity. Shared `emit`, `hud`, `playAnimation`,\n`despawn` and `sceneTransition` commands retain their meanings. Ray and shape\nqueries are bounded commands with a caller-supplied `queryId`. Results arrive\nin the next tick. Scripts receive no Three.js or Rapier objects.\n\n3D playtests accept run-length frames with `pressed`, `justPressed`, `axes`,\n`look` and `ticks`. Assertions take `{entity_id, near: {x, y, z, tolerance}}`,\n`{entity_id, region: {min, max}}` and `{entity_id, grounded}`, each with an\noptional `at_tick`, plus the `event` and `no_script_errors` forms. Set\n`restore_at_tick` with a `{replay_matches: true}` assertion to compare restored\ncontinuation against the recorded route. `autoplay_native_game` reports 3D as\nunsupported, so write the route yourself and assert the win. Capture the same\nsource, revision, seed and inputs to review actual WebGL2 frames and state\nhashes. A failed tick invalidates the session. Reset or restore a snapshot from\nbefore the failure.\n\n`build_native_game` exports a self-contained directory for an immutable\nrevision. Serve it over static HTTP. Models, colliders, fonts, audio and pinned\nruntime files are included. The first 3D release targets desktop web and\nElectron.\n\n## Platformers\n\nNew 2D games (schema 4) support side-view physics. Older documents need schema\n2 or later.\n\n1. Set scene `gravity {x, y}` in world units per second squared. Kinematic\n   bodies fall at `body2d.gravityScale` times the gravity, which defaults to\n   `1`. Give floating effects `gravityScale: 0`.\n2. A body that strikes a solid loses the velocity that pushed into it. A resting\n   body therefore keeps zero fall speed, and a script can add a jump to\n   `entity.velocityY`.\n3. Mark a tilemap `solid: true`, or a single tile `solid`, to make its tiles\n   static colliders. Tilemap `category` and `mask` filter them. Faces shared by\n   neighboring solid tiles never stop a body, so a body slides along a row of\n   tiles without catching on the seams.\n4. A `oneWay` collider or tile stops only a body that falls onto its top.\n   A body passes through it from below and from the sides.\n5. A static body with a velocity, from `patrol` or a script, is a moving solid.\n   It carries the bodies that stand on it and pushes out bodies in its way.\n6. A patrolling kinematic body turns when a wall blocks it. Set\n   `turnAtLedges: true` on an x-axis patrol to also turn at the edge of its\n   ground.\n7. Frames omit tiles far outside the camera, so a large tilemap costs little to\n   draw.\n\n## Failures and validation\n\nRuntime event and spawned-instance limits stop the session when exceeded.\nA failed tick cannot be saved or resumed. Reset the session or load a snapshot\nfrom before the failure, then reduce overlapping pairs or spawning.\n\nValidation rejects unsupported component fields. Movement requires a kinematic\nbody, patrol requires a body, animation requires a sprite, and asset media kinds\nmust match their image or audio components. Resolve validation errors before\npublishing. `native-game-reference` § Schema versions lists which fields each\n2D schema accepts.\n\n## Scope\n\nThe runtime supports separate 2D and 3D games. Mixed dimensions, multiplayer,\nterrain streaming, navigation meshes, vehicles, ragdolls, retargeting and root\nmotion are outside this release. A glTF model is an asset, so use\n`nodetool-3d-scene` to edit one. Existing external-engine source files can\nremain in a workspace as files, but their scripts and scenes need reconstruction in\nthe built-in game document to become playable.\n","# Build a native game\n\nCreate and edit a versioned built-in game document. The engine owns simulation,\nrendering, and web export. The default is a playable 2D top-down room.\nUse `dimension: \"3d\"` for an exploration blockout with a capsule controller,\nfollow camera, ramps, a moving platform, a crate and scripted interactions.\n\nLoad `game-direction` before the first edit of a new game, an art overhaul, or\na game that plays but feels flat. Lock its style string, layer plan, feel\nparameters, and pacing sheet, then keep later edits and asset prompts\nconsistent with that spec. Load `native-game-reference` when an edit needs\nscript hooks, events, lighting, effects, particles, 3D rendering, the audio mix,\nanimation graphs, input bindings, the HUD tree or performance fields. Load\n`native-game-performance` before building a 3D game and before reporting any\ngame as done. Load `api-games` before calling `nodetool.games` from a code\naction.\n\n## Build and revise\n\n1. `create_native_game {project_id, name, dimension?}` creates a playable draft\n   and returns its full id and current immutable revision. Resource ids may be\n   full ids or exact 12-character prefixes.\n2. `get_native_game {game_id, view: \"outline\"}` reads the compact draft outline.\n   Use `view: \"entity\"` with `entity_id` for one entity or `view: \"full\"` for\n   the whole document. `source: \"revision\"` reads an immutable revision.\n3. `edit_native_game {game_id, base_updated_at?, ops}` applies ordered ops to\n   the draft and validates the result atomically. Use the `draft_updated_at`\n   from a read for compare-and-swap when an edit depends on that exact state.\n   Invalid edits return an op index and field path. A generated level can\n   replace the whole draft with `ops: [{op: \"set_document\", document}]`. The\n   replacement preserves the stored game id and revision and supports undo.\n4. Prove it plays.\n   `playtest_native_game {game_id, inputs?, assertions?, capture_ticks?}` runs\n   the draft for up to 18,000 ticks, subject to the wall time budget. An input\n   can repeat with `ticks`. `justPressed` fires on the first repeated tick.\n   `autoplay_native_game {game_id, target_prefix? | win?, player_id?, seed?,\n   max_ticks?}` steers a supported 2D player and returns an executed `route`,\n   observed win tick, target contacts, and authored level stats. It needs a\n   player with a `movement` behavior, or a script player with `left` and\n   `right` actions, and takes jump from a `jump`, `space` or `up` action. A\n   prefix selects every matching authored collider, whose IDs must be unique\n   across scenes. Win steering targets\n   collectibles or an authored `win` or `victory` trigger. Other scripted goals\n   need `target_prefix`. A failed steering search or exhausted budget does not\n   prove the game impossible. Replay `route` as playtest `inputs` with the same\n   seed, and check `route_complete` before accepting the replay. A target\n   contact alone does not prove completion.\n5. Assert what the replay proves. 2D playtests accept three forms, and any\n   other returns `Unsupported assertion`:\n   - `{event: \"win\", before_tick?}` requires an engine win or a scripted `win`\n     or `victory` trigger. `{event: \"\u003Cname>\"}` requires that emitted event.\n   - `{entity_id, near: {x, y, tolerance}, at_tick?}` checks a position.\n   - `{no_script_errors: true}` fails on the first script error.\n   3D playtests add `region`, `grounded` and `replay_matches` (see 3D authoring).\n6. Look at it. `capture_native_game_frame {game_id, ticks?, sheet?}` renders up\n   to eight frames and returns image refs (`asset_id`, `uri`), not pixels. Call\n   `view_image` on each ref you judge, as a direct tool call, before reporting\n   visual changes or polish. Inside a code action the pixels cannot arrive.\n   `sheet: true` returns one contact sheet. Captures report `cancelled`,\n   `wall_time_limited`, and `route_complete`. An interrupted capture returns\n   only frames rendered before interruption.\n7. Pass the performance gate before you report the game as done, and again at\n   each milestone: blockout, art pass, effects pass. With a shell, run\n   `nodetool game bench`, `nodetool game capture --fail-on-budget` and\n   `nodetool game perf --fail-on-budget` on a route through the busiest part of\n   the game, as `native-game-performance` describes. The game passes when all\n   three exit 0. Report the measured tick p95, frame p95, draw calls and\n   triangles. Without a shell, apply that skill's budgets and authoring rules\n   and give the user the `nodetool game perf` command.\n8. Generate assets (see Assets). Confirm scope before spending.\n9. `publish_native_game {game_id, base_revision}` publishes the current draft\n   only when the user asks. For an explicit `document`, pass the paired\n   `draft_updated_at` returned by `get_native_game` as `base_updated_at`. On a\n   conflict, read the draft and reconcile edits.\n10. `build_native_game {game_id, revision?, target?}` writes a standalone web\n    player for an owned revision under the project workspace and returns its\n    path, only when the user asks. `target: \"tauri\"` writes a Tauri desktop app\n    project instead, named after the game. It compiles to installers with\n    `npm run build` where Rust is installed. `target: \"expo\"` writes an Expo\n    project for iOS and Android that plays the game offline in a WebView. It\n    runs with `npm install && npx expo start`. On a touch screen the 2D player adds a floating stick for\n    `left`\u002F`right`\u002F`up`\u002F`down` and one button per other input action, labeled\n    with the action name. Installed media must still exist, match its recorded\n    digest, and use a supported format.\n\n## Build a complete document\n\nAuthor a whole level in a code action with the `@nodetool-ai\u002Fsandbox-game` pack.\nRead its signatures and an example with\n`nodetool.packs.docs(\"@nodetool-ai\u002Fsandbox-game\")` (the direct tool is\n`get_sandbox_package_docs`). It exports `game`, `entity`, `script`,\n`registerAssets`, `fill`, `plank`, `arc`, `constructGame` and `saveGame`. Asset\nregistration records bindings, and installation supplies the bytes.\n`saveGame({name, document}, {games: nodetool.games, project_id})` creates a\ngame and saves the generated draft in one edit. To replace an existing draft,\npass `game_id` and its last-read `base_updated_at` instead of `project_id`.\n`api-games` covers `constructGame` and retained rebuilds. Publish separately\nwhen requested.\n\n`list_example_games {query?}` discovers shipped references.\n`get_example_game {slug: \"kindle\"}` reads its outline. Use `view: \"entity\"`\nwith `entity_id` to study the controller or `view: \"full\"` for the document.\nKindle is the platformer benchmark for layered art, aligned poses, terrain\nedges, feel, and pacing. `install_example_game {project_id, slug}` copies a\nbundle and its verified media into the project. A raw example document has\n`package:\u002F\u002F` bindings. Install the bundle before editing it as a user game.\n\nFor a workflow-based brief, `design_game` writes its design and `build_game\n{workflow_id, save?}` creates or selects the native game and stages its asset\ngraph. The graph's generated media are candidates until installed.\n\n## Scripts during play\n\nEdit an existing script through `edit_native_game` with an `update_behavior`\ndocument op. Supply `entity_id`, `index` and `behavior: {source}` to preserve the\nscript limits. The editor compiles changed sources\nduring play and continues at the current tick with\nexisting script state. A compile failure keeps the previous source running and\nreports the error in the Console. Only source edits apply during play. Use\n**Restart from tick 0** to apply other draft changes or reset script state.\nChanging between a function and lifecycle-object script requires a restart.\n\nA successful reload starts a new replay checkpoint at the current tick. Saved\nplay states use the accepted script document. Earlier checkpoints belong to\nolder source code and cannot be loaded into the changed session.\n\n## Assets\n\nGeneration spends provider credits, and no tool prices it in advance. Before\nthe first generation, state which slots, kinds, prompts and models you plan,\nand get the user's go-ahead unless the request already authorized that scope.\nDo not invent a dollar estimate. Reuse a prior authorization instead of asking\nagain. Importing an `input_file` and building a `lut` cost nothing. Report\nactual spend with `get_cost_summary`.\n\nCall `browse_native_game_assets {game_id}` before replacing or regenerating\nart. It returns every bound asset with `usedBy`, prefabs with their instances,\nscenes with the assets they use, the staged candidates under the game's\n`assets\u002F` folder, and `slot_requests`. A slot request is the template slot's\nprompt and image preparation, or the prompt recorded with the asset now bound.\nUse it to regenerate in the same style. Narrow the lists with `query` and\n`kind`. `staleSiblings` lists `\u003Cslot>.frame.N` and `\u003Cslot>.tile.M` bindings that\nstill point at the slot's previous bytes. Rebind them with `bind_asset` ops\nbefore publishing, or the sheet's animations keep drawing the old art.\n\n`generate_game_asset {game_id, slot, kind, prompt?, input_file?, provider?,\nmodel?}` generates or imports, prepares, installs, and binds an asset. `kind` is\n`image`, `audio` (speech), `music`, `sfx`, `font`, `model` or `collider`.\n`sfx` uses an explicit registered `node_type` and its `params`, or imports an\nexisting audio file. `font` imports a TrueType or OpenType `input_file` and has\nno generation model. An `input_file` is an owned asset URI or current workspace\npath. `reference_slot` generates an image from an installed slot's image, which\nkeeps a new asset in the locked style. `install: false` stages a 2D candidate\nwithout binding it. For a slow model, pass `background: true`, await the\nreturned generation, then call `generate_game_asset` again with\n`generation_id` and the same game, slot, kind, prompt, and preparation.\n\n`install_native_game_asset {game_id, slot, binding, candidate_workspace_id?}`\ninstalls a staged candidate and binds it to the draft. The staged bytes must\nmatch `binding.digest`. To bind an earlier candidate, call\n`browse_native_game_assets {game_id, digest, slot}` and pass the returned\n`binding` and `draft_updated_at`. An unrecorded image or audio file gets a\nbinding derived from its bytes. An unrecorded collider must be restaged.\n\nImage preparation supports alpha trim, target size and crop policy, pivot,\nsampling, and mirror tiling. Choose at most one of these atlas or grade modes:\n\n| Preparation | Result |\n|---|---|\n| `sheet: {cols, rows, baseline?}` | Slices a row-major sheet, trims each pose, and aligns the feet on one output row. Returns equal-sized atlas `frames` and bindings named `\u003Cslot>.frame.\u003Cindex>`. `baseline` is a zero-based output foot row. |\n| `tileset: {tileWidth?, tileHeight?, edges?, highlight?, shadow?}` | Builds 16 terrain variants with baked exposed-edge treatments. Returns `tiles` and `\u003Cslot>.tile.\u003Cmask>` bindings. Mask bits are top `1`, right `2`, bottom `4`, left `8`. |\n| `lut: {size?, brightness?, contrast?, saturation?, lift?, gain?, gamma?}` | Creates an opaque packed `size² × size` color cube from numeric grade settings, without a generation model. Bind it to a `lut` render effect. |\n\nUse returned atlas rectangles as animator frames or tile frames. Keep the\nlocked style string in every generated visual prompt. Review foot alignment,\nterrain joins, lighting, and grade in viewed captures before accepting the art\npass.\n\n## Audio\n\nInstall music in an audio slot, then use `update_scene {scene_id, set: {music:\n{assetId, volume, fadeInTicks, fadeOutTicks, streaming}}}` in 2D or 3D.\n`assetId` names the installed slot. `volume` ranges from 0 to 1 and each fade\nranges from 0 to 600 ticks. A scene transition overlaps the outgoing fade out\nand incoming fade in.\n\nFor long tracks set `streaming: {loopStartSeconds, loopEndSeconds?}`. The\nbrowser streams the asset through the music bus without decoding the whole\ntrack. Loop start defaults to 0 seconds. Loop end must exceed loop start,\nand both are bounded by 86400 seconds. Omit loop end to loop to the track's\nend. Omit `streaming` for decoded music. Loading a snapshot positions music at\nthe saved logical tick within the loop. Browser audio needs a user gesture.\n\nUse `set_audio {mixer}` for mixer buses and `audioSource` for triggered effects.\nSee `native-game-reference` § Audio mix and spatial audio for their fields.\n\n## 3D authoring\n\nCreate with `dimension: \"3d\"` and optional `template: \"exploration\"`.\nThe document uses `schemaVersion: 3`, `engineVersion: \"2\"`, meters, Y up,\nforward `-Z`, and quaternion rotations `[x, y, z, w]`. A game keeps its\ndimension. Read the returned outline before editing. The 2D sandbox helpers and\nsprite preparation retain their 2D contracts.\n\nKeep controller, body, collider and interactions on a gameplay root. Put the\nreplaceable model on a visual child using `parentId`. Physics roots have unit\nscale and one pose owner. `character3d` requires a kinematic body and a capsule.\nDynamic props use primitives or prepared convex hulls. Triangle meshes require\nstatic bodies. Collision category and mask use 16 bits in 3D. Shared friction\nand restitution belong in named `physicsMaterials` that colliders reference by\n`physicsMaterial`. Each scene names one `activeCameraId`. The camera supports perspective or orthographic projection\nand fixed or follow behavior.\n\n`generate_game_asset {game_id, slot, kind: \"model\", input_file, preparation?}`\nimports an owned GLB or glTF. Provider generation requires an explicit\nregistered `node_type` with its `params`. Preparation normalizes dependencies to\na closed GLB, records bounds and stable `node:\u003Cindex>`\u002F`clip:\u003Cindex>`\nselectors, and checks resource budgets. Import settings specify `scale`,\n`forward` (`-z`, `+z`, `+x`, `-x`) and `origin` (`preserve`, `ground`,\n`centerGround`). For glTF with separate files, pass `dependency_files` as a map\nfrom declared buffer or image URI to an owned workspace path. Unresolved\ndependencies fail preparation. `kind: \"collider\"` builds collision geometry\nfrom a GLB or glTF, or accepts an already prepared collider JSON, and requires\n`preparation.shape`: `convexHull` for a dynamic prop or `triangleMesh` for\nstatic level geometry. Model and collider results are candidates. Review them,\nthen call `install_native_game_asset` with the returned binding and draft\ntimestamp. Reinstall after editing source model bytes. The model editor\n(`nodetool-3d-scene`) edits model assets. Gameplay stays in the game document.\n\nA `set_prefab` definition includes `rootId`, `entities`, `externalAssets` and\n`externalScenes`. `instantiate_prefab` clones that subtree with a new\n`instance_id` and remaps internal entity references. Each runtime instance owns\nits script state, physics bodies and animation state. Bind prepared clips\nthrough `animator3d.clips`. An idle\u002Frun\u002Fjump rig can replace the placeholder\nvisual without changing its root controller or collider.\n\n3D script input adds analog `axes`, `look`, XYZ `entity.position`\u002F`velocity`,\n`grounded`, world entities and query observations. It preserves isolated JSON\nstate, seeded `random`, and previous-tick event delivery. Use `characterIntent`\nfor character motion, `setKinematicPose` for kinematic targets, `impulse` or\n`setVelocity` for dynamic bodies, and `teleport` for explicit discontinuities.\nFor continuous acceleration, return `{kind: \"addForce\", force: {x, y, z}}`,\n`{kind: \"addTorque\", torque: {x, y, z}}` or\n`{kind: \"addForceAtPoint\", force: {x, y, z}, point: {x, y, z}}`.\nThe vectors and application point use world space. These commands act on the\nissuing entity's active dynamic body and accumulate for one simulation tick.\nReturn them each tick to keep applying a load. An offset point also produces\ntorque. Static, kinematic and absent bodies reject them. 2D scripts do not\nsupport them.\n`setVisual` changes only a nonphysical visual. `spawn` accepts a prefab and XYZ\nposition, rotation and velocity. Shared `emit`, `hud`, `playAnimation`,\n`despawn` and `sceneTransition` commands retain their meanings. Ray and shape\nqueries are bounded commands with a caller-supplied `queryId`. Results arrive\nin the next tick. Scripts receive no Three.js or Rapier objects.\n\n3D playtests accept run-length frames with `pressed`, `justPressed`, `axes`,\n`look` and `ticks`. Assertions take `{entity_id, near: {x, y, z, tolerance}}`,\n`{entity_id, region: {min, max}}` and `{entity_id, grounded}`, each with an\noptional `at_tick`, plus the `event` and `no_script_errors` forms. Set\n`restore_at_tick` with a `{replay_matches: true}` assertion to compare restored\ncontinuation against the recorded route. `autoplay_native_game` reports 3D as\nunsupported, so write the route yourself and assert the win. Capture the same\nsource, revision, seed and inputs to review actual WebGL2 frames and state\nhashes. A failed tick invalidates the session. Reset or restore a snapshot from\nbefore the failure.\n\n`build_native_game` exports a self-contained directory for an immutable\nrevision. Serve it over static HTTP. Models, colliders, fonts, audio and pinned\nruntime files are included. The first 3D release targets desktop web and\nElectron.\n\n## Platformers\n\nNew 2D games (schema 4) support side-view physics. Older documents need schema\n2 or later.\n\n1. Set scene `gravity {x, y}` in world units per second squared. Kinematic\n   bodies fall at `body2d.gravityScale` times the gravity, which defaults to\n   `1`. Give floating effects `gravityScale: 0`.\n2. A body that strikes a solid loses the velocity that pushed into it. A resting\n   body therefore keeps zero fall speed, and a script can add a jump to\n   `entity.velocityY`.\n3. Mark a tilemap `solid: true`, or a single tile `solid`, to make its tiles\n   static colliders. Tilemap `category` and `mask` filter them. Faces shared by\n   neighboring solid tiles never stop a body, so a body slides along a row of\n   tiles without catching on the seams.\n4. A `oneWay` collider or tile stops only a body that falls onto its top.\n   A body passes through it from below and from the sides.\n5. A static body with a velocity, from `patrol` or a script, is a moving solid.\n   It carries the bodies that stand on it and pushes out bodies in its way.\n6. A patrolling kinematic body turns when a wall blocks it. Set\n   `turnAtLedges: true` on an x-axis patrol to also turn at the edge of its\n   ground.\n7. Frames omit tiles far outside the camera, so a large tilemap costs little to\n   draw.\n\n## Failures and validation\n\nRuntime event and spawned-instance limits stop the session when exceeded.\nA failed tick cannot be saved or resumed. Reset the session or load a snapshot\nfrom before the failure, then reduce overlapping pairs or spawning.\n\nValidation rejects unsupported component fields. Movement requires a kinematic\nbody, patrol requires a body, animation requires a sprite, and asset media kinds\nmust match their image or audio components. Resolve validation errors before\npublishing. `native-game-reference` § Schema versions lists which fields each\n2D schema accepts.\n\n## Scope\n\nThe runtime supports separate 2D and 3D games. Mixed dimensions, multiplayer,\nterrain streaming, navigation meshes, vehicles, ragdolls, retargeting and root\nmotion are outside this release. A glTF model is an asset, so use\n`nodetool-3d-scene` to edit one. Existing external-engine source files can\nremain in a workspace as files, but their scripts and scenes need reconstruction in\nthe built-in game document to become playable.\n",{"name":5,"featured":53,"description":7},true,"main","c7226baa82daca42a19a5855c116544f97aa8bac","packages\u002Fsystem-skills\u002Fnative-game",91,"https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool","https:\u002F\u002Fnodetool.ai\u002F","https:\u002F\u002Fgithub.com\u002Fnodetool-ai","No-code AI development","2026-11-15 03:27:49",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":53},[65,68,71],{"tool":66,"command":67},"npx","npx skills add nodetool-ai\u002Fnodetool --skill native-game",{"tool":69,"command":70},"bunx","bunx skills add nodetool-ai\u002Fnodetool --skill native-game",{"tool":72,"command":73},"pnpm","pnpm dlx skills add nodetool-ai\u002Fnodetool --skill native-game","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fnative-game\u002FSKILL.md",[],[77,86,121,145,160,176],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":85},"01M742MX3Y2ZYK884ZXTRFKB9P","humanizer","Rewrite AI-sounding text so it reads like the writer without changing what it says.\nUse when editing or reviewing prose for AI tells: not-X-but-Y contrasts, one-line\nclosers, staged openers, forced triads, dashes everywhere, inflated claims, sales\nlanguage, stock AI words, bold labels, or filler.","MIT","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhumanizer\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":87,"name":36,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":99,"publishedAt":48},"01M6BY4D93R0Q9400ZHJ04DXP1","Use the NodeTool MCP server to build, validate, run, and debug visual AI workflows, and to work with assets, collections, and jobs. Use when the user mentions NodeTool or asks for a workflow graph, a node, or a media generation run on their NodeTool server.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fplugins\u002Fchatgpt\u002Fnodetool\u002Fskills\u002Fnodetool\u002FSKILL.md",[91,94],{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[36,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120],"MCP","Media","workflows","when","generation","media generation","with","visual","use","collections","for","node","work","debug","graph","validate","assets","run","server","mcp server","workflow",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":128,"publishedAt":48},"01M6BY4AEB05ZPBRVD078ATR2H","wan-2-6-prompting","Prompt Alibaba's Wan 2.6 video — text-to-video with a global style line plus timing-bracketed shots, and image-to-video that describes only what changes over time. Covers the shot-mode switch per provider, the prompt budget, negative prompts, motion intensity wording, audio input and prompt expansion. Use whenever the model id names a Wan 2.6 video route (alibaba\u002Fwan-2.6\u002Ftext-to-video, alibaba\u002Fwan-2.6\u002Fimage-to-video, wan-video\u002Fwan-2.6-t2v, wan-video\u002Fwan-2.6-i2v, wan-video\u002Fwan2.6-i2v-flash) on generate_video, animate_image or a TextToVideo node. Not for Wan 2.5 or 2.7, or the Wan 2.6 image routes.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fwan-2-6-prompting\u002FSKILL.md",[127],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[129,130,131,132,133,134,135,111,32,136,137,138,139,140,44,141,142,143,27,39,144],"prompting","wan 2 6 prompting","line","expansion","input","image-to-video","text-to-video","only","mode","time","flash","Budget","text","image","animate","Video",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":153,"publishedAt":48},"01M6BY47T4748ZG5ZMTAR97ZWZ","video-workflow","Build a reusable NodeTool video workflow for batches or repeated inputs. For a single finished piece, use a storyboard skill.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fvideo-workflow\u002FSKILL.md",[151,152],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},[120,154,144,155,156,157,158,108,159,36,110],"video workflow","reusable","storyboard","build","batches","single",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":167,"publishedAt":48},"01M6BY4587N2SYN315SXGEMZC3","video-clone","Analyze a reference video and recreate its shot structure with a new product or cast in NodeTool.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fvideo-clone\u002FSKILL.md",[166],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[168,169,144,106,170,171,36,172,173,174,175],"clone","video clone","cast","new","analyze","product","structure","reference",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":183,"publishedAt":48},"01M6BY4257C2KQYYMD9EK6DK8E","video-audio-continuity","Keep sound continuous across a multi-scene piece cut from generated video — why one clip per scene hard-cuts the audio at every boundary, when to write all the scenes into a single generation instead, the sound-design vocabulary that survives a provider's copyright filter, and how to check the length, the aspect ratio and the mix of what came back. Use when a piece has more than one scene and the video model writes its own audio (Seedance 2, Veo 3, MiniMax H3, Kling 2.6 and later), or when a cut's sound drops out at the shot changes.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fvideo-audio-continuity\u002FSKILL.md",[182],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[184,144,39,185,186,187,188,189,190,191,192,193,194,103,195,196,27,197,198,199,200],"video audio continuity","continuity","write","why","back","veo 3","at","cut","later","across","filter","generated","how to","mix","design","boundary","how"]