[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F633AHH5K7CCAF0MQC2H0A":3,"skill-same:01M6F633AHH5K7CCAF0MQC2H0A":61},{"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":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6F633AHH5K7CCAF0MQC2H0A","defold-scripts-editing",null,"Creates and edits Defold Lua script files (.script, .gui_script, .render_script, .editor_script) and plain Lua modules (.lua). Use when asked to create, modify, or configure any Defold script or Lua module.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Findiesoftby\u002Fdefold-agent-config\u002Fdefold-scripts-editing\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"editing","scripts","defold scripts editing","editor","create","lua","configure","use","modules","files","module","gui","render","script","2026-11-10 10:12:30",false,"---\nname: defold-scripts-editing\ndescription: \"Creates and edits Defold Lua script files (.script, .gui_script, .render_script, .editor_script) and plain Lua modules (.lua). Use when asked to create, modify, or configure any Defold script or Lua module.\"\n---\n\n# Editing Defold Script Files and Lua Modules\n\nDefold has four Lua script types (each running in a different context with different APIs) and plain `.lua` modules for reusable logic.\n\n**For API details** use `defold-api-fetch` skill. **For conceptual manuals** use `defold-docs-fetch` skill. This skill covers script structure, constraints, and templates.\n\n## Lua modules (.lua)\n\nPlain `.lua` files are Lua modules used to encapsulate reusable logic. **Extract frequently used universal logic into `.lua` modules** — avoid duplication and keep scripts lean. Modules are required via `require(\"path.to.module\")` (dots as path separators).\n\nDefold projects typically use **Lua shared state** (`shared_state` in `game.project`). When enabled, all scripts, GUI scripts, and the render script run in the **same Lua context**. A Lua module required from any script has the **same context and state** within that single Lua interpreter instance — module-level locals and `package.loaded` are shared across all users of the module. Stateful modules behave like singletons.\n\n## Lua module structure (.lua)\n\nEncapsulate data and functions in a local table, return it:\n\n```lua\nlocal M = {}\n\nfunction M.hello()\n    print(\"Hello\")\nend\n\nreturn M\n```\n\nAvoid globals in modules. For stateful modules, internal state is shared between all callers (singleton-like). For stateless logic, pass state explicitly or use constructors that return new state tables. See [Modules manual](https:\u002F\u002Fdefold.com\u002Fllms\u002Fmanuals\u002Fmodules.md).\n\n## Script types\n\n| Extension | Context | Lua runtime | `go.property()` | Key namespaces |\n|---|---|---|---|---|\n| `.script` | Game object component | LuaJIT | Yes | `go`, `msg`, `vmath`, `timer`, `sys`, component namespaces (`sprite`, `label`, `factory`, `collectionfactory`, `collectionproxy`, `tilemap`, `model`, `sound`, `particlefx`, `buffer`, `resource`, `physics`) |\n| `.gui_script` | GUI component | LuaJIT | No | `gui`, `msg`, `vmath`, `sys` |\n| `.render_script` | Render pipeline (one per project) | LuaJIT | No | `render`, `graphics`, `camera`, `msg`, `vmath`, `sys` |\n| `.editor_script` | Defold editor | Lua 5.2 (luaj) | No | `editor`, `editor.ui`, `editor.prefs`, `editor.tx`, `http`, `json`, `zip`, `zlib` |\n\n## File format\n\nAll script types and `.lua` modules are plain Lua files (not Protobuf Text Format). Scripts use specific extensions (`.script`, `.gui_script`, etc.); modules use `.lua`.\n\n## Runtime environment notes (.script, .gui_script, .render_script)\n\n**Platform-specific**: `html5` module is only available on the **HTML5** platform.\n\n**App Manifest exclusions**: Some built-in modules (`liveupdate`, `image`, `types`, `profiler`, `sound`, `physics`, etc.) can be excluded via the App Manifest to reduce binary size. If excluded, their APIs will not be available at runtime.\n\n**No `utf8` module**: For working with non-ASCII strings, use the defold-utf8 dependency (`https:\u002F\u002Fgithub.com\u002Fd954mas\u002Fdefold-utf8\u002Farchive\u002Frefs\u002Fheads\u002Fmaster.zip`). API reference: [utf8.script_api](https:\u002F\u002Fgithub.com\u002Fd954mas\u002Fdefold-utf8\u002Fblob\u002Fmaster\u002Futf8\u002Fapi\u002Futf8.script_api).\n\n## Common runtime script patterns (.script, .gui_script, .render_script)\n\nAll runtime lifecycle callbacks receive `self` as the first parameter — a userdata that acts like a table for storing instance state.\n\n### Script structure\n\n1. **Module requires** (optional) — `local M = require(\"module\")`\n2. **Local helper functions** (optional) — must be at module scope, never inside other functions\n3. **Declarations** (`.script` only: `go.property()` at top level)\n4. **Lifecycle callbacks**\n\n### Lifecycle callback availability\n\n| Callback | `.script` | `.gui_script` | `.render_script` |\n|---|---|---|---|\n| `init(self)` | ✓ | ✓ | ✓ |\n| `final(self)` | ✓ | ✓ | — |\n| `fixed_update(self, dt)` | ✓ | — | — |\n| `update(self, dt)` \u002F `update(self)` | ✓ (dt) | ✓ (dt) | ✓ (no dt) |\n| `late_update(self, dt)` | ✓ | — | — |\n| `on_message(self, message_id, message, sender)` | ✓ | ✓ | ✓ (no sender) |\n| `on_input(self, action_id, action)` | ✓ | ✓ | — |\n| `on_reload(self)` | ✓ | ✓ | — |\n\n### Key rules\n\n- Store per-instance state in `self`, not in module-level locals (module-level locals are shared across all instances).\n- Omit unused callbacks — especially `update()` and `fixed_update()` which cost a call per frame even if empty.\n- Keep local helper functions at module scope, never inside other functions.\n\n## Native extensions\n\nNative extensions (C\u002FC++\u002FObjC\u002FJava) register their Lua functions into the global scope via the Lua C API (`lua_register`, `luaL_openlib`, etc.). This means extensions typically add a new global table (e.g., `myext`) with functions and constants accessible from any `.script` or `.gui_script`.\n\nExtensions describe their API for editor auto-complete via `*.script_api` files (YAML format) located in their `api\u002F` directory. The format:\n\n```yaml\n- name: extension_name\n  type: table\n  desc: Extension description\n  members:\n  - name: function_name\n    type: function\n    desc: Function description\n    parameters:\n    - name: param_name\n      type: string\n      desc: Parameter description\n    returns:\n    - name: return_name\n      type: number\n      desc: Return value description\n```\n\nTypes: `table`, `string`, `boolean`, `number`, `function`. Multiple types: `[type1, type2]`.\n\n## Lua preprocessing\n\nDefold supports conditional compilation via the [Lua preprocessor extension](https:\u002F\u002Fgithub.com\u002Fdefold\u002Fextension-lua-preprocessor) (applies to all Lua files including `.lua` modules):\n\n```lua\n--#IF DEBUG\nlocal lives = 999\n--#ELSE\nlocal lives = 3\n--#ENDIF\n```\n\nKeywords: `RELEASE`, `DEBUG`, `HEADLESS`.\n\n## Type-specific references\n\nConsult the `references\u002F` directory for constraints, templates, and patterns specific to each script type:\n\n- `references\u002Fscript.md` — `go.property()` reference (types, constraints, overrides), templates\n- `references\u002Fgui_script.md` — GUI script constraints, template node access, templates\n- `references\u002Frender_script.md` — render pipeline architecture, system messages, full working templates\n- `references\u002Feditor_script.md` — module structure, commands, lifecycle hooks, execution modes, templates\n\n## Workflow\n\n### Creating a new Lua module (.lua)\n\n1. Use when logic is reusable across multiple scripts or screens.\n2. Create a local table, add functions, return it.\n3. Keep modules stateless when possible; if stateful, document that state is shared.\n4. Require with dot notation: `require(\"main.utils\")`, `require(\"screens.game.helpers\")`.\n\n### Creating a new script\n\n1. Determine the correct extension for the script type.\n2. Read the corresponding type-specific reference in `references\u002F` for constraints and templates.\n3. Follow the structure pattern: requires → helpers → declarations → callbacks.\n4. Only add lifecycle callbacks you actually need.\n\n### Editing an existing script\n\n1. Read the current file.\n2. Preserve existing declarations (e.g., `go.property()` names) and callback signatures.\n3. Add\u002Fmodify callbacks as needed.\n4. Changing a `go.property()` name or type may break overrides in `.go` and `.collection` files.\n\n","# Editing Defold Script Files and Lua Modules\n\nDefold has four Lua script types (each running in a different context with different APIs) and plain `.lua` modules for reusable logic.\n\n**For API details** use `defold-api-fetch` skill. **For conceptual manuals** use `defold-docs-fetch` skill. This skill covers script structure, constraints, and templates.\n\n## Lua modules (.lua)\n\nPlain `.lua` files are Lua modules used to encapsulate reusable logic. **Extract frequently used universal logic into `.lua` modules** — avoid duplication and keep scripts lean. Modules are required via `require(\"path.to.module\")` (dots as path separators).\n\nDefold projects typically use **Lua shared state** (`shared_state` in `game.project`). When enabled, all scripts, GUI scripts, and the render script run in the **same Lua context**. A Lua module required from any script has the **same context and state** within that single Lua interpreter instance — module-level locals and `package.loaded` are shared across all users of the module. Stateful modules behave like singletons.\n\n## Lua module structure (.lua)\n\nEncapsulate data and functions in a local table, return it:\n\n```lua\nlocal M = {}\n\nfunction M.hello()\n    print(\"Hello\")\nend\n\nreturn M\n```\n\nAvoid globals in modules. For stateful modules, internal state is shared between all callers (singleton-like). For stateless logic, pass state explicitly or use constructors that return new state tables. See [Modules manual](https:\u002F\u002Fdefold.com\u002Fllms\u002Fmanuals\u002Fmodules.md).\n\n## Script types\n\n| Extension | Context | Lua runtime | `go.property()` | Key namespaces |\n|---|---|---|---|---|\n| `.script` | Game object component | LuaJIT | Yes | `go`, `msg`, `vmath`, `timer`, `sys`, component namespaces (`sprite`, `label`, `factory`, `collectionfactory`, `collectionproxy`, `tilemap`, `model`, `sound`, `particlefx`, `buffer`, `resource`, `physics`) |\n| `.gui_script` | GUI component | LuaJIT | No | `gui`, `msg`, `vmath`, `sys` |\n| `.render_script` | Render pipeline (one per project) | LuaJIT | No | `render`, `graphics`, `camera`, `msg`, `vmath`, `sys` |\n| `.editor_script` | Defold editor | Lua 5.2 (luaj) | No | `editor`, `editor.ui`, `editor.prefs`, `editor.tx`, `http`, `json`, `zip`, `zlib` |\n\n## File format\n\nAll script types and `.lua` modules are plain Lua files (not Protobuf Text Format). Scripts use specific extensions (`.script`, `.gui_script`, etc.); modules use `.lua`.\n\n## Runtime environment notes (.script, .gui_script, .render_script)\n\n**Platform-specific**: `html5` module is only available on the **HTML5** platform.\n\n**App Manifest exclusions**: Some built-in modules (`liveupdate`, `image`, `types`, `profiler`, `sound`, `physics`, etc.) can be excluded via the App Manifest to reduce binary size. If excluded, their APIs will not be available at runtime.\n\n**No `utf8` module**: For working with non-ASCII strings, use the defold-utf8 dependency (`https:\u002F\u002Fgithub.com\u002Fd954mas\u002Fdefold-utf8\u002Farchive\u002Frefs\u002Fheads\u002Fmaster.zip`). API reference: [utf8.script_api](https:\u002F\u002Fgithub.com\u002Fd954mas\u002Fdefold-utf8\u002Fblob\u002Fmaster\u002Futf8\u002Fapi\u002Futf8.script_api).\n\n## Common runtime script patterns (.script, .gui_script, .render_script)\n\nAll runtime lifecycle callbacks receive `self` as the first parameter — a userdata that acts like a table for storing instance state.\n\n### Script structure\n\n1. **Module requires** (optional) — `local M = require(\"module\")`\n2. **Local helper functions** (optional) — must be at module scope, never inside other functions\n3. **Declarations** (`.script` only: `go.property()` at top level)\n4. **Lifecycle callbacks**\n\n### Lifecycle callback availability\n\n| Callback | `.script` | `.gui_script` | `.render_script` |\n|---|---|---|---|\n| `init(self)` | ✓ | ✓ | ✓ |\n| `final(self)` | ✓ | ✓ | — |\n| `fixed_update(self, dt)` | ✓ | — | — |\n| `update(self, dt)` \u002F `update(self)` | ✓ (dt) | ✓ (dt) | ✓ (no dt) |\n| `late_update(self, dt)` | ✓ | — | — |\n| `on_message(self, message_id, message, sender)` | ✓ | ✓ | ✓ (no sender) |\n| `on_input(self, action_id, action)` | ✓ | ✓ | — |\n| `on_reload(self)` | ✓ | ✓ | — |\n\n### Key rules\n\n- Store per-instance state in `self`, not in module-level locals (module-level locals are shared across all instances).\n- Omit unused callbacks — especially `update()` and `fixed_update()` which cost a call per frame even if empty.\n- Keep local helper functions at module scope, never inside other functions.\n\n## Native extensions\n\nNative extensions (C\u002FC++\u002FObjC\u002FJava) register their Lua functions into the global scope via the Lua C API (`lua_register`, `luaL_openlib`, etc.). This means extensions typically add a new global table (e.g., `myext`) with functions and constants accessible from any `.script` or `.gui_script`.\n\nExtensions describe their API for editor auto-complete via `*.script_api` files (YAML format) located in their `api\u002F` directory. The format:\n\n```yaml\n- name: extension_name\n  type: table\n  desc: Extension description\n  members:\n  - name: function_name\n    type: function\n    desc: Function description\n    parameters:\n    - name: param_name\n      type: string\n      desc: Parameter description\n    returns:\n    - name: return_name\n      type: number\n      desc: Return value description\n```\n\nTypes: `table`, `string`, `boolean`, `number`, `function`. Multiple types: `[type1, type2]`.\n\n## Lua preprocessing\n\nDefold supports conditional compilation via the [Lua preprocessor extension](https:\u002F\u002Fgithub.com\u002Fdefold\u002Fextension-lua-preprocessor) (applies to all Lua files including `.lua` modules):\n\n```lua\n--#IF DEBUG\nlocal lives = 999\n--#ELSE\nlocal lives = 3\n--#ENDIF\n```\n\nKeywords: `RELEASE`, `DEBUG`, `HEADLESS`.\n\n## Type-specific references\n\nConsult the `references\u002F` directory for constraints, templates, and patterns specific to each script type:\n\n- `references\u002Fscript.md` — `go.property()` reference (types, constraints, overrides), templates\n- `references\u002Fgui_script.md` — GUI script constraints, template node access, templates\n- `references\u002Frender_script.md` — render pipeline architecture, system messages, full working templates\n- `references\u002Feditor_script.md` — module structure, commands, lifecycle hooks, execution modes, templates\n\n## Workflow\n\n### Creating a new Lua module (.lua)\n\n1. Use when logic is reusable across multiple scripts or screens.\n2. Create a local table, add functions, return it.\n3. Keep modules stateless when possible; if stateful, document that state is shared.\n4. Require with dot notation: `require(\"main.utils\")`, `require(\"screens.game.helpers\")`.\n\n### Creating a new script\n\n1. Determine the correct extension for the script type.\n2. Read the corresponding type-specific reference in `references\u002F` for constraints and templates.\n3. Follow the structure pattern: requires → helpers → declarations → callbacks.\n4. Only add lifecycle callbacks you actually need.\n\n### Editing an existing script\n\n1. Read the current file.\n2. Preserve existing declarations (e.g., `go.property()` names) and callback signatures.\n3. Add\u002Fmodify callbacks as needed.\n4. Changing a `go.property()` name or type may break overrides in `.go` and `.collection` files.\n\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Findiesoftby\u002Fdefold-agent-config\u002Fdefold-scripts-editing",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill defold-scripts-editing",{"tool":53,"command":54},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill defold-scripts-editing",{"tool":56,"command":57},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill defold-scripts-editing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Findiesoftby\u002Fdefold-agent-config\u002Fdefold-scripts-editing\u002FSKILL.md",true,[],[62,76,86,95,101,108],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":72,"publishedAt":33},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[67],{"categoryNo":68,"categoryName":69,"taxonomyType":70,"taxonomyTypeDesc":71},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[73,74,75],"model","model hierarchy","model hierarchy skill",{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":82,"publishedAt":33},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[81],{"categoryNo":68,"categoryName":69,"taxonomyType":70,"taxonomyTypeDesc":71},[83,84,85],"MCP","zoom","zoom mcp",{"skillNo":87,"name":88,"nameZh":6,"description":6,"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":91,"publishedAt":33},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[92,93,94,84],"sdk","zoom apps sdk","apps",{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":33},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[97],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":107,"publishedAt":33},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[106],{"categoryNo":68,"categoryName":69,"taxonomyType":70,"taxonomyTypeDesc":71},[103],{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":33},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[110]]