← Back to Skills Marketplace
1105
Downloads
1
Stars
6
Active Installs
1
Versions
Install in OpenClaw
/install godot-dev-guide
Description
Godot 4.x 完整開發指南。涵蓋 GDScript 模式、文件格式(.gd/.tscn/.tres)、場景架構、物理/UI/音效、性能優化、多平台導出、測試。自動觸發於 Godot 相關開發。
README (SKILL.md)
Godot Dev Guide Skill
Godot 4.x 遊戲開發完整指南,專為 AI 輔助開發設計。
核心原則
1. 文件格式差異(最重要!)
.gd → GDScript 程式碼(完整語言)
.tscn → 場景序列化(嚴格格式,非 GDScript)
.tres → 資源序列化(嚴格格式,非 GDScript)
⚠️ AI PITFALL:混淆 GDScript 與資源格式
# ❌ WRONG in .tres/.tscn
script = preload("res://script.gd")
var items = [1, 2, 3]
# ✅ CORRECT in .tres/.tscn
[ext_resource type="Script" path="res://script.gd" id="1"]
script = ExtResource("1")
items = Array[int]([1, 2, 3])
2. 類型系統(永遠使用)
# 變數類型
var health: int = 100
var speed: float = 200.0
var items: Array[Item] = []
var stats: Dictionary = {}
# 函數簽名
func calculate_damage(base: int, multiplier: float) -> int:
return int(base * multiplier)
3. 架構模式
組合優先於繼承
信號用於解耦通信
資源用於數據配置
自動載入用於全局系統
快速參考
項目結構
res://
├── project.godot
├── scenes/ # .tscn 場景
│ ├── player/
│ ├── enemies/
│ └── ui/
├── scripts/ # .gd 腳本
├── assets/ # 資源文件
├── autoload/ # 單例腳本
├── resources/ # .tres 資源
└── test/ # 測試
常用節點
| 2D | 3D | 用途 |
|---|---|---|
| CharacterBody2D | CharacterBody3D | 玩家/NPC 移動 |
| RigidBody2D | RigidBody3D | 物理模擬 |
| Area2D | Area3D | 碰撞檢測(無物理) |
| Sprite2D | MeshInstance3D | 視覺渲染 |
Export 變數
@export var speed: float = 5.0
@export_range(0, 100, 1) var health: int = 100
@export_file("*.tscn") var next_level: String
@export_group("Combat")
@export var damage: int = 10
信號模式
signal health_changed(current: int, maximum: int)
signal died
func take_damage(amount: int) -> void:
health -= amount
health_changed.emit(health, max_health)
if health \x3C= 0:
died.emit()
節點引用
@onready var sprite: Sprite2D = $Sprite2D
@onready var anim: AnimationPlayer = $AnimationPlayer
關鍵陷阱清單
| 陷阱 | 錯誤寫法 | 正確寫法 |
|---|---|---|
| .tres 使用 preload | preload("res://x.gd") |
ExtResource("id") |
| .tres 使用 var | var x = 5 |
x = 5 |
| 未類型化陣列 | [1, 2, 3] in .tres |
Array[int]([1, 2, 3]) |
| 缺少 ext_resource | 直接使用 id | 先宣告 ext_resource |
| @onready 初始化 | 在宣告時存取其他節點 | 等到 _ready() |
| 直接修改資源 | resource.value = x |
resource.duplicate() |
| 輸入處理 | UI 和遊戲混用 _input | UI 用 _gui_input |
參考文件
| 主題 | 路徑 |
|---|---|
| 項目結構 | references/01-project-structure.md |
| GDScript 模式 | references/02-gdscript-patterns.md |
| 文件格式 | references/03-file-formats.md |
| 場景與節點 | references/04-scenes-nodes.md |
| UI 與輸入 | references/05-ui-input.md |
| 物理系統 | references/06-physics.md |
| 音效與動畫 | references/07-audio-animation.md |
| 性能優化 | references/08-performance.md |
| 導出平台 | references/09-export.md |
| 測試指南 | references/10-testing.md |
CLI 快速命令
# 運行遊戲
godot --path .
# 驗證腳本
godot --path . --check-only --script path/to/script.gd
# 無頭測試
godot --path . --headless --quit
# 導出
godot --path . --export-release "Preset Name" builds/game.exe
Version: 1.0.0 | Last Updated: 2026-02-17
Usage Guidance
This skill is an instruction-only Godot 4.x reference and appears coherent and low-risk: it requests no credentials and performs no installs. Things to consider before installing: (1) autoInvoke/high priority means it will auto-trigger on Godot-related prompts—disable autonomous invocation or lower priority if you prefer manual use; (2) CLI examples call the local 'godot' binary and will read your project files if the agent executes them—ensure you are comfortable with the agent accessing the working directory; (3) BUILD_REPORT mentions combined sources (local material, GitHub, a third-party skill) — if licensing or provenance matters, review the reference files for copied content. If any of these are concerns, either run the skill manually or request the publisher add a note about provenance and licensing.
Capability Analysis
Type: OpenClaw Skill
Name: godot-dev-guide
Version: 1.0.0
The OpenClaw AgentSkills skill bundle is a comprehensive Godot 4.x development guide, explicitly designed for AI assistance. All code snippets, CLI commands, and documentation (including SKILL.md, BUILD_REPORT.md, REVIEW_REPORT.md, and reference files) are benign. The 'AI PITFALL' sections are instructional, clearly distinguishing between '❌ WRONG' and '✅ CORRECT' practices, aiming to guide the AI agent towards best practices rather than tricking it into harmful actions. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection with harmful intent. All operations described are standard Godot development workflows.
Capability Assessment
Purpose & Capability
Name/description, files, and runtime instructions are all focused on Godot 4.x development; nothing requested (no env vars, no binaries, no installs) is disproportionate to a documentation/assistant skill.
Instruction Scope
SKILL.md contains code examples, file-format guidance, and CLI commands (godot --path ..., headless checks, export). These may cause the agent to read or validate local project files when invoked (expected for a dev guide). It does not instruct collection or exfiltration of unrelated system data.
Install Mechanism
No install spec and no code files to execute at install time; risk is low because the skill is instruction-only and nothing is downloaded or written by an installer.
Credentials
The skill declares no environment variables, credentials, or config paths. All referenced resources are project files and Godot artifacts relevant to the stated purpose.
Persistence & Privilege
Registry flags show always=false but SKILL.md frontmatter sets autoInvoke: true and a high priority with multiple triggers, and model invocation is allowed—this means the agent may autonomously activate the skill on Godot-related prompts. That behavior is coherent with an auto-triggering dev helper but may cause frequent automatic activations.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install godot-dev-guide - After installation, invoke the skill by name or use
/godot-dev-guide - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Complete Godot 4.x development guide with 28 AI pitfall annotations
Metadata
Frequently Asked Questions
What is Godot Dev Guide?
Godot 4.x 完整開發指南。涵蓋 GDScript 模式、文件格式(.gd/.tscn/.tres)、場景架構、物理/UI/音效、性能優化、多平台導出、測試。自動觸發於 Godot 相關開發。 It is an AI Agent Skill for Claude Code / OpenClaw, with 1105 downloads so far.
How do I install Godot Dev Guide?
Run "/install godot-dev-guide" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Godot Dev Guide free?
Yes, Godot Dev Guide is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Godot Dev Guide support?
Godot Dev Guide is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Godot Dev Guide?
It is built and maintained by IsonaEi (@isonaei); the current version is v1.0.0.
More Skills