Best practices for writing Godot scripts, covering node initialization timing, use of @onready, avoiding defensive coding, and more. Intended for use when writing GDScript.
新编写的代码请严格按照编码风格进行编码 entries/style-guide.md
场景属性桥接(setter-only:先赋值、await ready 再写子节点;优先 %;getter 可省略;尽量不在 _ready 刷 UI)
entries/scene-property-setter-bridge.md
访问 unique 子节点默认用 %;仅热路径(如每帧)才 @onready 缓存
entries/onready-cache-percent.md
同一场景需多次生成的子场景(如子弹):用树里 InstancePlaceholder + create_instance()(默认 replace=false 保留占位符)代替再 @export PackedScene;要换父节点时先 remove_child 再挂到目标根
entries/instance-placeholder-spawn.md
子节点要访问所属场景根时用 owner,不要用 get_parent() 硬链
entries/owner-vs-get-parent.md
对场景中应存在的 unique 节点不要写多余 null 检查,让错误尽早暴露 entries/unique-nodes-no-null-guard.md
属性 setter 内对同名赋值由引擎写入隐式后备存储;无自定义 getter 时不必再声明 _x 后备字段,只写 setter 即可
entries/property-setter-self-assign.md
Resource / RefCounted 数据类同样用 setter 自赋值 + 隐式后备,不必显式 _backing;仅构造期需绕过 setter 时例外
entries/refcounted-backing-properties.md
在正文列表中增加一行摘要 + entries/ 链接,在 entries/ 下新增对应详述;条目保持短小可检索,不扩成替代官方文档的教程。
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer