[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HSNA6EM1YDN4DAWWKCEEAM":3,"skill-same:01M6HSNA6EM1YDN4DAWWKCEEAM":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":23,"linkOnly":24,"markdownContent":25,"markdownBody":26,"frontMatter":27,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M6HSNA6EM1YDN4DAWWKCEEAM","godot-tscn-format",null,"Godot .tscn 场景文件格式规范。让 AI 能够直接读写 Godot 场景文件，理解节点树结构、外部\u002F内嵌资源引用、Transform 变换、信号连接等。当需要创建或修改 .tscn 文件时使用此 Skill。","welflau\u002Fai-dev-system","welflau","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7010385?v=4","01M6HPTDGF18RFY07M229P8CTM","01M6HPTDMRMZCJPYBFEA9XVVYT",3,"MIT","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fmagicai-hub\u002Fskills\u002Fgodot-tscn-format\u002FSKILL.md",[],[18,19,20,21,22],"format","godot","godot tscn format","transform","文件","2026-11-10 10:12:30",false,"---\nname: godot-tscn-format\ndescription: \"Godot .tscn 场景文件格式规范。让 AI 能够直接读写 Godot 场景文件，理解节点树结构、外部\u002F内嵌资源引用、Transform 变换、信号连接等。当需要创建或修改 .tscn 文件时使用此 Skill。\"\nversion: 1.0.0\n---\n\n# Godot .tscn 场景文件格式规范\n\n> **用途**：让 AI 能够直接读写 Godot 场景文件  \n> **版本**：v1.0 · 2026-04-24  \n> **适用引擎**：Godot 4.x\n\n---\n\n## 核心原则\n\n**Godot 场景文件是纯文本**，AI 可以直接通过 `write_to_file` 和 `replace_in_file` 操作，无需任何中间层。\n\n---\n\n## 一、文件结构总览\n\n```\n[gd_scene load_steps=N format=3 uid=\"uid:\u002F\u002Fxxx\"]    ← 头部（必需）\n\n[ext_resource type=\"Type\" path=\"res:\u002F\u002F...\" id=\"ID\"]  ← 外部资源引用（可选）\n[ext_resource ...]\n\n[sub_resource type=\"Type\" id=\"ID\"]                   ← 内嵌资源定义（可选）\nproperty = value\n[sub_resource ...]\n\n[node name=\"Name\" type=\"Type\"]                       ← 根节点（必需）\nproperty = value\n\n[node name=\"Child\" type=\"Type\" parent=\".\"]           ← 子节点\nproperty = value\n\n[connection signal=\"sig\" from=\"Node\" to=\"Target\" method=\"func\"]  ← 信号连接（可选）\n```\n\n---\n\n## 二、头部声明\n\n### 2.1 基本格式\n\n```\n[gd_scene load_steps=4 format=3]\n```\n\n| 字段 | 说明 |\n|------|------|\n| `load_steps` | 资源加载步数 = ext_resource 数 + sub_resource 数 + 1（场景本身） |\n| `format` | 固定为 `3`（Godot 4.x） |\n| `uid` | 可选，Godot 自动生成的唯一 ID，创建时可省略 |\n\n### 2.2 计算 load_steps\n\n```python\nload_steps = len(ext_resources) + len(sub_resources) + 1\n```\n\n示例：2 个外部资源 + 3 个内嵌资源 → `load_steps=6`\n\n---\n\n## 三、外部资源引用 (ext_resource)\n\n### 3.1 格式\n\n```\n[ext_resource type=\"Type\" path=\"res:\u002F\u002Fpath\u002Fto\u002Ffile\" id=\"ID\"]\n```\n\n### 3.2 常见类型\n\n| type | 文件类型 | 示例 |\n|------|----------|------|\n| `Script` | GDScript | `path=\"res:\u002F\u002Fscripts\u002Fplayer.gd\"` |\n| `PackedScene` | 场景 | `path=\"res:\u002F\u002Fscenes\u002Fenemy.tscn\"` |\n| `Material` | 材质资源 | `path=\"res:\u002F\u002Fmaterials\u002Ffloor.tres\"` |\n| `Texture2D` | 2D 纹理 | `path=\"res:\u002F\u002Ftextures\u002Ficon.png\"` |\n| `AudioStream` | 音频 | `path=\"res:\u002F\u002Faudio\u002Fshoot.wav\"` |\n| `Shader` | 着色器 | `path=\"res:\u002F\u002Fshaders\u002Foutline.gdshader\"` |\n\n### 3.3 ID 命名规范\n\nAI 生成时使用有意义的 ID：\n```\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fplayer.gd\" id=\"1_player_script\"]\n[ext_resource type=\"Material\" path=\"res:\u002F\u002Fresources\u002Ffloor_mat.tres\" id=\"2_floor_mat\"]\n[ext_resource type=\"PackedScene\" path=\"res:\u002F\u002Fscenes\u002Fbullet.tscn\" id=\"3_bullet_scene\"]\n```\n\n---\n\n## 四、内嵌资源定义 (sub_resource)\n\n### 4.1 格式\n\n```\n[sub_resource type=\"Type\" id=\"ID\"]\nproperty1 = value1\nproperty2 = value2\n```\n\n### 4.2 常用碰撞形状\n\n```\n# 胶囊体（角色常用）\n[sub_resource type=\"CapsuleShape3D\" id=\"CapsuleShape3D_player\"]\nradius = 0.35\nheight = 1.8\n\n# 球体\n[sub_resource type=\"SphereShape3D\" id=\"SphereShape3D_001\"]\nradius = 0.5\n\n# 盒子\n[sub_resource type=\"BoxShape3D\" id=\"BoxShape3D_floor\"]\nsize = Vector3(10, 0.2, 10)\n\n# 圆柱体\n[sub_resource type=\"CylinderShape3D\" id=\"CylinderShape3D_001\"]\nheight = 2.0\nradius = 0.5\n\n# 2D 形状\n[sub_resource type=\"RectangleShape2D\" id=\"RectangleShape2D_001\"]\nsize = Vector2(32, 32)\n\n[sub_resource type=\"CircleShape2D\" id=\"CircleShape2D_001\"]\nradius = 16.0\n```\n\n### 4.3 常用网格\n\n```\n# 盒子网格\n[sub_resource type=\"BoxMesh\" id=\"BoxMesh_001\"]\nsize = Vector3(1, 1, 1)\n\n# 球体网格\n[sub_resource type=\"SphereMesh\" id=\"SphereMesh_001\"]\nradius = 0.5\nheight = 1.0\n\n# 胶囊网格\n[sub_resource type=\"CapsuleMesh\" id=\"CapsuleMesh_001\"]\nradius = 0.5\nheight = 2.0\n\n# 圆柱网格\n[sub_resource type=\"CylinderMesh\" id=\"CylinderMesh_001\"]\ntop_radius = 0.5\nbottom_radius = 0.5\nheight = 2.0\n\n# 平面网格\n[sub_resource type=\"PlaneMesh\" id=\"PlaneMesh_001\"]\nsize = Vector2(10, 10)\n```\n\n### 4.4 材质（内嵌）\n\n```\n[sub_resource type=\"StandardMaterial3D\" id=\"Material_red\"]\nalbedo_color = Color(1, 0, 0, 1)\nroughness = 0.8\nmetallic = 0.2\n\n# 发光材质\n[sub_resource type=\"StandardMaterial3D\" id=\"Material_glow\"]\nemission_enabled = true\nemission = Color(1, 0.8, 0, 1)\nemission_energy_multiplier = 2.0\n```\n\n---\n\n## 五、节点声明 (node)\n\n### 5.1 根节点\n\n```\n[node name=\"Player\" type=\"CharacterBody3D\"]\nscript = ExtResource(\"1_player_script\")\n```\n\n### 5.2 子节点\n\n```\n[node name=\"ChildName\" type=\"NodeType\" parent=\".\"]\nproperty = value\n```\n\n| parent 值 | 含义 |\n|-----------|------|\n| `.` | 直接子节点（父节点是根） |\n| `ParentName` | 指定父节点名 |\n| `Parent\u002FChild` | 嵌套路径 |\n\n### 5.3 引用资源\n\n```\n# 引用外部资源\nscript = ExtResource(\"1_player_script\")\nmesh = ExtResource(\"2_mesh\")\n\n# 引用内嵌资源\nshape = SubResource(\"CapsuleShape3D_player\")\nmesh = SubResource(\"BoxMesh_001\")\n```\n\n### 5.4 实例化场景\n\n```\n[node name=\"Enemy1\" parent=\"Enemies\" instance=ExtResource(\"4_enemy_scene\")]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, -10)\n```\n\n---\n\n## 六、Transform 变换\n\n### 6.1 Transform3D 格式\n\n```\ntransform = Transform3D(bx.x, bx.y, bx.z, by.x, by.y, by.z, bz.x, bz.y, bz.z, ox, oy, oz)\n```\n\n| 参数 | 含义 |\n|------|------|\n| bx (1-3) | X 轴基向量 |\n| by (4-6) | Y 轴基向量 |\n| bz (7-9) | Z 轴基向量 |\n| o (10-12) | 位置 (origin) |\n\n### 6.2 常用变换\n\n```\n# 单位变换（默认位置）\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)\n\n# 仅位置\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 2, -10)\n\n# 位置 + 缩放 0.5\ntransform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 5, 2, -10)\n\n# 绕 Y 轴旋转 90°（sin90=1, cos90=0）\ntransform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 0)\n```\n\n### 6.3 Transform2D 格式\n\n```\ntransform = Transform2D(cos, sin, -sin, cos, x, y)\n\n# 单位变换\ntransform = Transform2D(1, 0, 0, 1, 100, 200)\n\n# 旋转 45° 位于 (100, 200)\ntransform = Transform2D(0.707, 0.707, -0.707, 0.707, 100, 200)\n```\n\n---\n\n## 七、常用属性值格式\n\n### 7.1 基础类型\n\n```\n# 布尔\nvisible = true\nenabled = false\n\n# 整数\nhealth = 100\n\n# 浮点\nspeed = 10.5\n\n# 字符串\nname = \"Player\"\n```\n\n### 7.2 向量\n\n```\n# Vector2\nposition = Vector2(100, 200)\nsize = Vector2(32, 32)\n\n# Vector3\nposition = Vector3(0, 1.5, 0)\ntarget_position = Vector3(0, 0, -100)\n\n# Vector4\ncustom_data = Vector4(1, 2, 3, 4)\n```\n\n### 7.3 颜色\n\n```\n# Color(R, G, B, A) 范围 0.0-1.0\nlight_color = Color(1, 0.85, 0.3, 1)\nalbedo_color = Color(0.25, 0.25, 0.3, 1)\n\n# 半透明\nmodulate = Color(1, 1, 1, 0.5)\n```\n\n### 7.4 数组\n\n```\n# PackedStringArray\nconfig\u002Ffeatures = PackedStringArray(\"4.6\", \"Forward Plus\")\n\n# PackedVector2Array\npolygon = PackedVector2Array(0, 0, 100, 0, 100, 100, 0, 100)\n\n# 普通数组\ngroups = [\"enemy\", \"damageable\"]\n```\n\n---\n\n## 八、信号连接 (connection)\n\n### 8.1 格式\n\n```\n[connection signal=\"signal_name\" from=\"NodePath\" to=\"TargetPath\" method=\"method_name\"]\n```\n\n### 8.2 示例\n\n```\n# 同级节点连接\n[connection signal=\"timeout\" from=\"ShootCooldown\" to=\".\" method=\"_on_shoot_cooldown_timeout\"]\n\n# 子节点连接到根\n[connection signal=\"body_entered\" from=\"HitArea\" to=\".\" method=\"_on_hit_area_body_entered\"]\n\n# 带 flags\n[connection signal=\"pressed\" from=\"Button\" to=\".\" method=\"_on_button_pressed\" flags=1]\n```\n\n---\n\n## 九、完整示例模板\n\n### 9.1 3D 角色场景\n\n```\n[gd_scene load_steps=3 format=3]\n\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fplayer.gd\" id=\"1_script\"]\n\n[sub_resource type=\"CapsuleShape3D\" id=\"CapsuleShape3D_001\"]\nradius = 0.35\nheight = 1.8\n\n[node name=\"Player\" type=\"CharacterBody3D\"]\nscript = ExtResource(\"1_script\")\n\n[node name=\"CollisionShape3D\" type=\"CollisionShape3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)\nshape = SubResource(\"CapsuleShape3D_001\")\n\n[node name=\"Camera3D\" type=\"Camera3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)\nfov = 75.0\n\n[node name=\"MeshInstance3D\" type=\"MeshInstance3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)\n```\n\n### 9.2 2D 角色场景\n\n```\n[gd_scene load_steps=3 format=3]\n\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fplayer_2d.gd\" id=\"1_script\"]\n[ext_resource type=\"Texture2D\" path=\"res:\u002F\u002Fsprites\u002Fplayer.png\" id=\"2_texture\"]\n\n[sub_resource type=\"RectangleShape2D\" id=\"RectangleShape2D_001\"]\nsize = Vector2(32, 48)\n\n[node name=\"Player\" type=\"CharacterBody2D\"]\nscript = ExtResource(\"1_script\")\n\n[node name=\"Sprite2D\" type=\"Sprite2D\" parent=\".\"]\ntexture = ExtResource(\"2_texture\")\n\n[node name=\"CollisionShape2D\" type=\"CollisionShape2D\" parent=\".\"]\nshape = SubResource(\"RectangleShape2D_001\")\n```\n\n### 9.3 UI 场景\n\n```\n[gd_scene load_steps=2 format=3]\n\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fhud.gd\" id=\"1_script\"]\n\n[node name=\"HUD\" type=\"CanvasLayer\"]\nscript = ExtResource(\"1_script\")\n\n[node name=\"MarginContainer\" type=\"MarginContainer\" parent=\".\"]\nanchors_preset = 15\nanchor_right = 1.0\nanchor_bottom = 1.0\noffset_left = 20.0\noffset_top = 20.0\noffset_right = -20.0\noffset_bottom = -20.0\n\n[node name=\"VBoxContainer\" type=\"VBoxContainer\" parent=\"MarginContainer\"]\nlayout_mode = 2\n\n[node name=\"ScoreLabel\" type=\"Label\" parent=\"MarginContainer\u002FVBoxContainer\"]\nlayout_mode = 2\ntext = \"Score: 0\"\n\n[node name=\"TimeLabel\" type=\"Label\" parent=\"MarginContainer\u002FVBoxContainer\"]\nlayout_mode = 2\ntext = \"Time: 60\"\n```\n\n---\n\n## 十、AI 操作指南\n\n### 10.1 创建新场景\n\n```python\n# AI 直接使用 write_to_file\nwrite_to_file(\"res:\u002F\u002Fscenes\u002Fnew_scene.tscn\", \"\"\"\n[gd_scene load_steps=1 format=3]\n\n[node name=\"Root\" type=\"Node3D\"]\n\"\"\")\n```\n\n### 10.2 修改现有场景\n\n```python\n# 使用 replace_in_file 修改属性\nreplace_in_file(\"res:\u002F\u002Fscenes\u002Fplayer.tscn\",\n    old_str='fov = 75.0',\n    new_str='fov = 90.0'\n)\n```\n\n### 10.3 添加节点\n\n```python\n# 在场景末尾添加节点（信号连接之前）\nreplace_in_file(\"res:\u002F\u002Fscenes\u002Fplayer.tscn\",\n    old_str='[connection signal=',\n    new_str='''[node name=\"NewChild\" type=\"Node3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)\n\n[connection signal='''\n)\n```\n\n### 10.4 常见错误排查\n\n| 错误 | 原因 | 修复 |\n|------|------|------|\n| `load_steps` 不匹配 | 资源数计算错误 | 重新计算 ext + sub + 1 |\n| `id not found` | 引用了不存在的资源 ID | 检查 ExtResource\u002FSubResource ID |\n| 场景无法加载 | parent 路径错误 | 检查节点层级关系 |\n| 属性无效 | 类型拼写错误 | 查阅 Godot 文档确认属性名 |\n\n---\n\n## 十一、快速参考\n\n### 常用节点类型\n\n| 类别 | 3D | 2D |\n|------|-----|-----|\n| 基础 | Node3D | Node2D |\n| 物理角色 | CharacterBody3D | CharacterBody2D |\n| 刚体 | RigidBody3D | RigidBody2D |\n| 静态体 | StaticBody3D | StaticBody2D |\n| 碰撞形状 | CollisionShape3D | CollisionShape2D |\n| 网格 | MeshInstance3D | - |\n| 精灵 | - | Sprite2D |\n| 相机 | Camera3D | Camera2D |\n| 灯光 | DirectionalLight3D, OmniLight3D, SpotLight3D | PointLight2D, DirectionalLight2D |\n\n### 常用 UI 节点\n\n| 节点 | 用途 |\n|------|------|\n| Control | UI 基类 |\n| CanvasLayer | UI 层 |\n| Label | 文本 |\n| Button | 按钮 |\n| TextureRect | 图片 |\n| ProgressBar | 进度条 |\n| VBoxContainer \u002F HBoxContainer | 布局容器 |\n| MarginContainer | 边距容器 |\n","# Godot .tscn 场景文件格式规范\n\n> **用途**：让 AI 能够直接读写 Godot 场景文件  \n> **版本**：v1.0 · 2026-04-24  \n> **适用引擎**：Godot 4.x\n\n---\n\n## 核心原则\n\n**Godot 场景文件是纯文本**，AI 可以直接通过 `write_to_file` 和 `replace_in_file` 操作，无需任何中间层。\n\n---\n\n## 一、文件结构总览\n\n```\n[gd_scene load_steps=N format=3 uid=\"uid:\u002F\u002Fxxx\"]    ← 头部（必需）\n\n[ext_resource type=\"Type\" path=\"res:\u002F\u002F...\" id=\"ID\"]  ← 外部资源引用（可选）\n[ext_resource ...]\n\n[sub_resource type=\"Type\" id=\"ID\"]                   ← 内嵌资源定义（可选）\nproperty = value\n[sub_resource ...]\n\n[node name=\"Name\" type=\"Type\"]                       ← 根节点（必需）\nproperty = value\n\n[node name=\"Child\" type=\"Type\" parent=\".\"]           ← 子节点\nproperty = value\n\n[connection signal=\"sig\" from=\"Node\" to=\"Target\" method=\"func\"]  ← 信号连接（可选）\n```\n\n---\n\n## 二、头部声明\n\n### 2.1 基本格式\n\n```\n[gd_scene load_steps=4 format=3]\n```\n\n| 字段 | 说明 |\n|------|------|\n| `load_steps` | 资源加载步数 = ext_resource 数 + sub_resource 数 + 1（场景本身） |\n| `format` | 固定为 `3`（Godot 4.x） |\n| `uid` | 可选，Godot 自动生成的唯一 ID，创建时可省略 |\n\n### 2.2 计算 load_steps\n\n```python\nload_steps = len(ext_resources) + len(sub_resources) + 1\n```\n\n示例：2 个外部资源 + 3 个内嵌资源 → `load_steps=6`\n\n---\n\n## 三、外部资源引用 (ext_resource)\n\n### 3.1 格式\n\n```\n[ext_resource type=\"Type\" path=\"res:\u002F\u002Fpath\u002Fto\u002Ffile\" id=\"ID\"]\n```\n\n### 3.2 常见类型\n\n| type | 文件类型 | 示例 |\n|------|----------|------|\n| `Script` | GDScript | `path=\"res:\u002F\u002Fscripts\u002Fplayer.gd\"` |\n| `PackedScene` | 场景 | `path=\"res:\u002F\u002Fscenes\u002Fenemy.tscn\"` |\n| `Material` | 材质资源 | `path=\"res:\u002F\u002Fmaterials\u002Ffloor.tres\"` |\n| `Texture2D` | 2D 纹理 | `path=\"res:\u002F\u002Ftextures\u002Ficon.png\"` |\n| `AudioStream` | 音频 | `path=\"res:\u002F\u002Faudio\u002Fshoot.wav\"` |\n| `Shader` | 着色器 | `path=\"res:\u002F\u002Fshaders\u002Foutline.gdshader\"` |\n\n### 3.3 ID 命名规范\n\nAI 生成时使用有意义的 ID：\n```\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fplayer.gd\" id=\"1_player_script\"]\n[ext_resource type=\"Material\" path=\"res:\u002F\u002Fresources\u002Ffloor_mat.tres\" id=\"2_floor_mat\"]\n[ext_resource type=\"PackedScene\" path=\"res:\u002F\u002Fscenes\u002Fbullet.tscn\" id=\"3_bullet_scene\"]\n```\n\n---\n\n## 四、内嵌资源定义 (sub_resource)\n\n### 4.1 格式\n\n```\n[sub_resource type=\"Type\" id=\"ID\"]\nproperty1 = value1\nproperty2 = value2\n```\n\n### 4.2 常用碰撞形状\n\n```\n# 胶囊体（角色常用）\n[sub_resource type=\"CapsuleShape3D\" id=\"CapsuleShape3D_player\"]\nradius = 0.35\nheight = 1.8\n\n# 球体\n[sub_resource type=\"SphereShape3D\" id=\"SphereShape3D_001\"]\nradius = 0.5\n\n# 盒子\n[sub_resource type=\"BoxShape3D\" id=\"BoxShape3D_floor\"]\nsize = Vector3(10, 0.2, 10)\n\n# 圆柱体\n[sub_resource type=\"CylinderShape3D\" id=\"CylinderShape3D_001\"]\nheight = 2.0\nradius = 0.5\n\n# 2D 形状\n[sub_resource type=\"RectangleShape2D\" id=\"RectangleShape2D_001\"]\nsize = Vector2(32, 32)\n\n[sub_resource type=\"CircleShape2D\" id=\"CircleShape2D_001\"]\nradius = 16.0\n```\n\n### 4.3 常用网格\n\n```\n# 盒子网格\n[sub_resource type=\"BoxMesh\" id=\"BoxMesh_001\"]\nsize = Vector3(1, 1, 1)\n\n# 球体网格\n[sub_resource type=\"SphereMesh\" id=\"SphereMesh_001\"]\nradius = 0.5\nheight = 1.0\n\n# 胶囊网格\n[sub_resource type=\"CapsuleMesh\" id=\"CapsuleMesh_001\"]\nradius = 0.5\nheight = 2.0\n\n# 圆柱网格\n[sub_resource type=\"CylinderMesh\" id=\"CylinderMesh_001\"]\ntop_radius = 0.5\nbottom_radius = 0.5\nheight = 2.0\n\n# 平面网格\n[sub_resource type=\"PlaneMesh\" id=\"PlaneMesh_001\"]\nsize = Vector2(10, 10)\n```\n\n### 4.4 材质（内嵌）\n\n```\n[sub_resource type=\"StandardMaterial3D\" id=\"Material_red\"]\nalbedo_color = Color(1, 0, 0, 1)\nroughness = 0.8\nmetallic = 0.2\n\n# 发光材质\n[sub_resource type=\"StandardMaterial3D\" id=\"Material_glow\"]\nemission_enabled = true\nemission = Color(1, 0.8, 0, 1)\nemission_energy_multiplier = 2.0\n```\n\n---\n\n## 五、节点声明 (node)\n\n### 5.1 根节点\n\n```\n[node name=\"Player\" type=\"CharacterBody3D\"]\nscript = ExtResource(\"1_player_script\")\n```\n\n### 5.2 子节点\n\n```\n[node name=\"ChildName\" type=\"NodeType\" parent=\".\"]\nproperty = value\n```\n\n| parent 值 | 含义 |\n|-----------|------|\n| `.` | 直接子节点（父节点是根） |\n| `ParentName` | 指定父节点名 |\n| `Parent\u002FChild` | 嵌套路径 |\n\n### 5.3 引用资源\n\n```\n# 引用外部资源\nscript = ExtResource(\"1_player_script\")\nmesh = ExtResource(\"2_mesh\")\n\n# 引用内嵌资源\nshape = SubResource(\"CapsuleShape3D_player\")\nmesh = SubResource(\"BoxMesh_001\")\n```\n\n### 5.4 实例化场景\n\n```\n[node name=\"Enemy1\" parent=\"Enemies\" instance=ExtResource(\"4_enemy_scene\")]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, -10)\n```\n\n---\n\n## 六、Transform 变换\n\n### 6.1 Transform3D 格式\n\n```\ntransform = Transform3D(bx.x, bx.y, bx.z, by.x, by.y, by.z, bz.x, bz.y, bz.z, ox, oy, oz)\n```\n\n| 参数 | 含义 |\n|------|------|\n| bx (1-3) | X 轴基向量 |\n| by (4-6) | Y 轴基向量 |\n| bz (7-9) | Z 轴基向量 |\n| o (10-12) | 位置 (origin) |\n\n### 6.2 常用变换\n\n```\n# 单位变换（默认位置）\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)\n\n# 仅位置\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 2, -10)\n\n# 位置 + 缩放 0.5\ntransform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 5, 2, -10)\n\n# 绕 Y 轴旋转 90°（sin90=1, cos90=0）\ntransform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 0)\n```\n\n### 6.3 Transform2D 格式\n\n```\ntransform = Transform2D(cos, sin, -sin, cos, x, y)\n\n# 单位变换\ntransform = Transform2D(1, 0, 0, 1, 100, 200)\n\n# 旋转 45° 位于 (100, 200)\ntransform = Transform2D(0.707, 0.707, -0.707, 0.707, 100, 200)\n```\n\n---\n\n## 七、常用属性值格式\n\n### 7.1 基础类型\n\n```\n# 布尔\nvisible = true\nenabled = false\n\n# 整数\nhealth = 100\n\n# 浮点\nspeed = 10.5\n\n# 字符串\nname = \"Player\"\n```\n\n### 7.2 向量\n\n```\n# Vector2\nposition = Vector2(100, 200)\nsize = Vector2(32, 32)\n\n# Vector3\nposition = Vector3(0, 1.5, 0)\ntarget_position = Vector3(0, 0, -100)\n\n# Vector4\ncustom_data = Vector4(1, 2, 3, 4)\n```\n\n### 7.3 颜色\n\n```\n# Color(R, G, B, A) 范围 0.0-1.0\nlight_color = Color(1, 0.85, 0.3, 1)\nalbedo_color = Color(0.25, 0.25, 0.3, 1)\n\n# 半透明\nmodulate = Color(1, 1, 1, 0.5)\n```\n\n### 7.4 数组\n\n```\n# PackedStringArray\nconfig\u002Ffeatures = PackedStringArray(\"4.6\", \"Forward Plus\")\n\n# PackedVector2Array\npolygon = PackedVector2Array(0, 0, 100, 0, 100, 100, 0, 100)\n\n# 普通数组\ngroups = [\"enemy\", \"damageable\"]\n```\n\n---\n\n## 八、信号连接 (connection)\n\n### 8.1 格式\n\n```\n[connection signal=\"signal_name\" from=\"NodePath\" to=\"TargetPath\" method=\"method_name\"]\n```\n\n### 8.2 示例\n\n```\n# 同级节点连接\n[connection signal=\"timeout\" from=\"ShootCooldown\" to=\".\" method=\"_on_shoot_cooldown_timeout\"]\n\n# 子节点连接到根\n[connection signal=\"body_entered\" from=\"HitArea\" to=\".\" method=\"_on_hit_area_body_entered\"]\n\n# 带 flags\n[connection signal=\"pressed\" from=\"Button\" to=\".\" method=\"_on_button_pressed\" flags=1]\n```\n\n---\n\n## 九、完整示例模板\n\n### 9.1 3D 角色场景\n\n```\n[gd_scene load_steps=3 format=3]\n\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fplayer.gd\" id=\"1_script\"]\n\n[sub_resource type=\"CapsuleShape3D\" id=\"CapsuleShape3D_001\"]\nradius = 0.35\nheight = 1.8\n\n[node name=\"Player\" type=\"CharacterBody3D\"]\nscript = ExtResource(\"1_script\")\n\n[node name=\"CollisionShape3D\" type=\"CollisionShape3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)\nshape = SubResource(\"CapsuleShape3D_001\")\n\n[node name=\"Camera3D\" type=\"Camera3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)\nfov = 75.0\n\n[node name=\"MeshInstance3D\" type=\"MeshInstance3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)\n```\n\n### 9.2 2D 角色场景\n\n```\n[gd_scene load_steps=3 format=3]\n\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fplayer_2d.gd\" id=\"1_script\"]\n[ext_resource type=\"Texture2D\" path=\"res:\u002F\u002Fsprites\u002Fplayer.png\" id=\"2_texture\"]\n\n[sub_resource type=\"RectangleShape2D\" id=\"RectangleShape2D_001\"]\nsize = Vector2(32, 48)\n\n[node name=\"Player\" type=\"CharacterBody2D\"]\nscript = ExtResource(\"1_script\")\n\n[node name=\"Sprite2D\" type=\"Sprite2D\" parent=\".\"]\ntexture = ExtResource(\"2_texture\")\n\n[node name=\"CollisionShape2D\" type=\"CollisionShape2D\" parent=\".\"]\nshape = SubResource(\"RectangleShape2D_001\")\n```\n\n### 9.3 UI 场景\n\n```\n[gd_scene load_steps=2 format=3]\n\n[ext_resource type=\"Script\" path=\"res:\u002F\u002Fscripts\u002Fhud.gd\" id=\"1_script\"]\n\n[node name=\"HUD\" type=\"CanvasLayer\"]\nscript = ExtResource(\"1_script\")\n\n[node name=\"MarginContainer\" type=\"MarginContainer\" parent=\".\"]\nanchors_preset = 15\nanchor_right = 1.0\nanchor_bottom = 1.0\noffset_left = 20.0\noffset_top = 20.0\noffset_right = -20.0\noffset_bottom = -20.0\n\n[node name=\"VBoxContainer\" type=\"VBoxContainer\" parent=\"MarginContainer\"]\nlayout_mode = 2\n\n[node name=\"ScoreLabel\" type=\"Label\" parent=\"MarginContainer\u002FVBoxContainer\"]\nlayout_mode = 2\ntext = \"Score: 0\"\n\n[node name=\"TimeLabel\" type=\"Label\" parent=\"MarginContainer\u002FVBoxContainer\"]\nlayout_mode = 2\ntext = \"Time: 60\"\n```\n\n---\n\n## 十、AI 操作指南\n\n### 10.1 创建新场景\n\n```python\n# AI 直接使用 write_to_file\nwrite_to_file(\"res:\u002F\u002Fscenes\u002Fnew_scene.tscn\", \"\"\"\n[gd_scene load_steps=1 format=3]\n\n[node name=\"Root\" type=\"Node3D\"]\n\"\"\")\n```\n\n### 10.2 修改现有场景\n\n```python\n# 使用 replace_in_file 修改属性\nreplace_in_file(\"res:\u002F\u002Fscenes\u002Fplayer.tscn\",\n    old_str='fov = 75.0',\n    new_str='fov = 90.0'\n)\n```\n\n### 10.3 添加节点\n\n```python\n# 在场景末尾添加节点（信号连接之前）\nreplace_in_file(\"res:\u002F\u002Fscenes\u002Fplayer.tscn\",\n    old_str='[connection signal=',\n    new_str='''[node name=\"NewChild\" type=\"Node3D\" parent=\".\"]\ntransform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)\n\n[connection signal='''\n)\n```\n\n### 10.4 常见错误排查\n\n| 错误 | 原因 | 修复 |\n|------|------|------|\n| `load_steps` 不匹配 | 资源数计算错误 | 重新计算 ext + sub + 1 |\n| `id not found` | 引用了不存在的资源 ID | 检查 ExtResource\u002FSubResource ID |\n| 场景无法加载 | parent 路径错误 | 检查节点层级关系 |\n| 属性无效 | 类型拼写错误 | 查阅 Godot 文档确认属性名 |\n\n---\n\n## 十一、快速参考\n\n### 常用节点类型\n\n| 类别 | 3D | 2D |\n|------|-----|-----|\n| 基础 | Node3D | Node2D |\n| 物理角色 | CharacterBody3D | CharacterBody2D |\n| 刚体 | RigidBody3D | RigidBody2D |\n| 静态体 | StaticBody3D | StaticBody2D |\n| 碰撞形状 | CollisionShape3D | CollisionShape2D |\n| 网格 | MeshInstance3D | - |\n| 精灵 | - | Sprite2D |\n| 相机 | Camera3D | Camera2D |\n| 灯光 | DirectionalLight3D, OmniLight3D, SpotLight3D | PointLight2D, DirectionalLight2D |\n\n### 常用 UI 节点\n\n| 节点 | 用途 |\n|------|------|\n| Control | UI 基类 |\n| CanvasLayer | UI 层 |\n| Label | 文本 |\n| Button | 按钮 |\n| TextureRect | 图片 |\n| ProgressBar | 进度条 |\n| VBoxContainer \u002F HBoxContainer | 布局容器 |\n| MarginContainer | 边距容器 |\n",{"name":5,"version":28,"description":7},"1.0.0","main","18d0e63d1313ca87098f614aa7c1e2dcf6de79c7","backend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fmagicai-hub\u002Fskills\u002Fgodot-tscn-format",1,"https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system","https:\u002F\u002Fgithub.com\u002Fwelflau","2026-11-10 11:14:25",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add welflau\u002Fai-dev-system --skill godot-tscn-format",{"tool":42,"command":43},"bunx","bunx skills add welflau\u002Fai-dev-system --skill godot-tscn-format",{"tool":45,"command":46},"pnpm","pnpm dlx skills add welflau\u002Fai-dev-system --skill godot-tscn-format","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fmagicai-hub\u002Fskills\u002Fgodot-tscn-format\u002FSKILL.md",true,[],[51,86,118,143,169,193],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":55,"licenseFileUrl":56,"sourceHtmlUrl":57,"categories":58,"keywords":64,"publishedAt":23},"01M6HSTDP4M3JFXEBK91VFB4PA","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fweb-artifacts-builder\u002FSKILL.md",[59],{"categoryNo":60,"categoryName":61,"taxonomyType":62,"taxonomyTypeDesc":63},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85],"web artifacts builder","web","artifacts","artifacts builder","builder","frontend","css","components","react","routing","state management","state","file","Tailwind","use","single-file","simple","ui components","multi","for","single",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":55,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":102,"publishedAt":23},"01M6HSDXH0JSP8R3QTNY9XZ8HN","frontend-design","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Ffrontend-design\u002FSKILL.md",[93,94,97],{"categoryNo":60,"categoryName":61,"taxonomyType":62,"taxonomyTypeDesc":63},{"categoryNo":95,"categoryName":96,"taxonomyType":62,"taxonomyTypeDesc":63},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":98,"categoryName":99,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[70,103,104,71,66,72,73,105,106,107,67,108,109,110,79,111,112,113,114,115,116,117],"design","frontend design","react components","create","code","examples","applications","landing","ui design","pages","aesthetics","web ui","with","generic","when",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":55,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":126,"publishedAt":23},"01M6HSA77QYVP7A72HREGTDN2C","algorithmic-art","Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Falgorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Falgorithmic-art\u002FSKILL.md",[125],{"categoryNo":95,"categoryName":96,"taxonomyType":62,"taxonomyTypeDesc":63},[127,128,129,106,107,130,131,132,133,79,134,135,136,137,115,138,139,140,141,142,117],"algorithmic art","Art","algorithmic","flow","js","work","interactive","generative art","exploration","systems","users","Existing","request","generative","copyright","fields",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":55,"licenseFileUrl":147,"sourceHtmlUrl":148,"categories":149,"keywords":151,"publishedAt":23},"01M6HS9HE0X390Y6RQKTY1YNGJ","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Ftheme-factory\u002FSKILL.md",[150],{"categoryNo":95,"categoryName":96,"taxonomyType":62,"taxonomyTypeDesc":63},[152,153,154,155,156,157,67,158,159,160,110,161,162,112,163,115,164,165,166,84,167,168],"theme factory","factory","theme","docs","toolkit","generate","SET","fly","slides","styling","artifact","themes","you","fonts","can","apply","new",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":178,"publishedAt":23},"01M6HS74GASM6FJ77F83EY679E","browsing","Use when you need direct browser control - teaches Chrome DevTools Protocol for controlling existing browser sessions, multi-tab management, form automation, and content extraction via use_browser MCP tool","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Fsuperpowers-chrome\u002Fskills\u002Fbrowsing\u002FSKILL.md",[175],{"categoryNo":176,"categoryName":177,"taxonomyType":62,"taxonomyTypeDesc":63},"01JBSEEDCAT000000000000023","Skill与智能体开发",[171,179,180,181,182,183,184,185,186,187,188,79,189,190,191,192,83,164,84,138],"MCP","automation","chrome","sessions","protocol","browser","devtools","chrome devtools","tool","direct","browser control","control","via","form",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":55,"licenseFileUrl":197,"sourceHtmlUrl":198,"categories":199,"keywords":206,"publishedAt":23},"01M6HS6BZT2CKDNQ6YF20DXN4T","slack-gif-creator","Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like \"make me a GIF of X doing Y for Slack.\"","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Fslack-gif-creator\u002FSKILL.md",[200,203],{"categoryNo":201,"categoryName":202,"taxonomyType":62,"taxonomyTypeDesc":63},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":204,"categoryName":205,"taxonomyType":62,"taxonomyTypeDesc":63},"01JBSEEDCAT000000000000016","图像与多媒体",[207,208,209,210,211,212,213,214,215,79,216,137,217,218,219,84,139,117],"slack gif creator","slack","gif","creator","validation","Tools","constraints","Animation","knowledge","me","make","Utilities","concepts"]