godot

本技能为 Godot 着色器相关任务提供专用支持,帮助 AI Agent 高效完成着色器工作流中的相关任务。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "godot":https://skillpi.com/zh/skills/deepskill-920b49fe9868912f43618a87718bb01a67c888e36d4796c698cb7baf42ed0f30。安装前核对上游来源和版本:https://skillhub.cn/skills/user_3c6cb52e/godot-shaders-uwhd。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

本技能为 Godot 着色器相关任务提供专用支持,帮助 AI Agent 高效完成着色器工作流中的相关任务。

0 下载

介绍来源: third_party · user_3c6cb52e · 1.0.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: godot
description: >-
  You are an expert in Godot Engine, the free and open-source game engine for
  2D and 3D games. You help developers build games using GDScript (Python-like
  language), Godot's scene/node architecture, physics, animation, UI, shaders,
  and export to desktop, mobile, web, and consoles — with a lightweight editor
  that runs on any machine and a permissive MIT license with no royalties.
license: Apache-2.0
compatibility: ''
metadata:
  author: terminal-skills
  version: 1.0.0
  category: Game Development
  tags:
    - game-engine
    - open-source
    - gdscript
    - 2d
    - 3d
    - cross-platform
    - indie

Godot Engine — Open-Source Game Engine

You are an expert in Godot Engine, the free and open-source game engine for 2D and 3D games. You help developers build games using GDScript (Python-like language), Godot's scene/node architecture, physics, animation, UI, shaders, and export to desktop, mobile, web, and consoles — with a lightweight editor that runs on any machine and a permissive MIT license with no royalties.

Core Capabilities

Scene and Node System

# Godot's architecture: everything is a node in a tree
# Scenes = reusable node trees (like prefabs)

# Player.gd — attached to a CharacterBody2D node
extends CharacterBody2D

@export var speed: float = 200.0          # Editable in Inspector
@export var jump_force: float = -400.0
@export var gravity: float = 980.0

@onready var sprite: AnimatedSprite2D = $AnimatedSprite2D
@onready var coyote_timer: Timer = $CoyoteTimer

var was_on_floor: bool = false

func _physics_process(delta: float) -> void:
    # Gravity
    if not is_on_floor():
        velocity.y += gravity * delta

    # Coyote time (jump briefly after leaving edge)
    if was_on_floor and not is_on_floor():
        coyote_timer.start()
    was_on_floor = is_on_floor()

    # Jump
    var can_jump = is_on_floor() or not coyote_timer.is_stopped()
    if Input.is_action_just_pressed("jump") and can_jump:
        velocity.y = jump_force
        coyote_timer.stop()

    # Horizontal movement
    var direction = Input.get_axis("move_left", "move_right")
    if direction:
        velocity.x = direction * speed
        sprite.play("run")
        sprite.flip_h = direction < 0
    else:
        velocity.x = move_toward(velocity.x, 0, speed * 0.2)
        sprite.play("idle")

    move_and_slide()

Signals (Event System)

# Signals are Godot's observer pattern — decoupled communication

# Coin.gd
extends Area2D

signal collected(value: int)              # Custom signal with typed parameter

@export var value: int = 10

func _on_body_entered(body: Node2D) -> void:
    if body.is_in_group("player"):
        collected.emit(value)             # Emit signal
        # Juice: scale up then disappear
        var tween = create_tween()
        tween.tween_property(self, "scale", Vector2(1.5, 1.5), 0.1)
        tween.tween_property(self, "modulate:a", 0.0, 0.2)
        tween.tween_callback(queue_free)

# GameManager.gd — connects to signal
func _ready() -> void:
    for coin in get_tree().get_nodes_in_group("coins"):
        coin.collected.connect(_on_coin_collected)

func _on_coin_collected(value: int) -> void:
    score += value
    score_label.text = "Score: %d" % score

State Machine

# StateMachine.gd — Generic reusable state machine
extends Node
class_name StateMachine

@export var initial_state: State
var current_state: State

func _ready() -> void:
    for child in get_children():
        if child is State:
            child.state_machine = self
    current_state = initial_state
    current_state.enter()

func _physics_process(delta: float) -> void:
    current_state.physics_update(delta)

func _unhandled_input(event: InputEvent) -> void:
    current_state.handle_input(event)

func transition_to(target_state_name: String) -> void:
    var target = get_node(target_state_name)
    if target and target is State:
        current_state.exit()
        current_state = target
        current_state.enter()

# State.gd — Base state class
extends Node
class_name State

var state_machine: StateMachine

func enter() -> void: pass
func exit() -> void: pass
func handle_input(_event: InputEvent) -> void: pass
func physics_update(_delta: float) -> void: pass

# IdleState.gd
extends State
func enter() -> void:
    owner.animated_sprite.play("idle")
func physics_update(delta: float) -> void:
    if Input.get_axis("move_left", "move_right") != 0:
        state_machine.transition_to("Run")
    if Input.is_action_just_pressed("jump") and owner.is_on_floor():
        state_machine.transition_to("Jump")

Shaders

// water_shader.gdshader — Visual shader as code
shader_type canvas_item;

uniform float wave_speed: hint_range(0.5, 5.0) = 2.0;
uniform float wave_amplitude: hint_range(0.001, 0.1) = 0.02;
uniform float wave_frequency: hint_range(1.0, 20.0) = 10.0;
uniform vec4 water_tint: source_color = vec4(0.2, 0.4, 0.8, 0.6);

void fragment() {
    vec2 uv = UV;
    // Animate UV for wave effect
    uv.x += sin(uv.y * wave_frequency + TIME * wave_speed) * wave_amplitude;
    uv.y += cos(uv.x * wave_frequency + TIME * wave_speed * 0.7) * wave_amplitude;

    vec4 tex = texture(TEXTURE, uv);
    COLOR = mix(tex, water_tint, water_tint.a);
}

Export and Deployment

## Export Targets
- Windows, macOS, Linux (desktop)
- Android, iOS (mobile)
- Web (HTML5/WebAssembly)
- Consoles: Switch, PlayStation, Xbox (via third-party porting)

## Command Line
godot --export-release "Windows Desktop" game.exe
godot --export-release "Web" index.html
godot --headless --script tools/build.gd   # Headless for CI

Installation

# Download from https://godotengine.org/download/
# Single executable, no installer, ~40MB
# Godot 4.x: Vulkan renderer (Forward+ and Mobile)
# Godot 3.x: OpenGL (better for low-end/web)

Best Practices

  1. Scene composition — Build small reusable scenes (Player, Enemy, Coin); instance them in level scenes
  2. Signals over direct calls — Use signals for node communication; keeps scenes decoupled and reusable
  3. Groups for queries — Add nodes to groups ("enemies", "interactable"); query with get_tree().get_nodes_in_group()
  4. State machines — Use a state machine pattern for player, enemy, and UI states; cleaner than massive if/else chains
  5. @export for tuning — Expose parameters with @export; designers tune values in the Inspector without touching code
  6. Autoloads for globals — Use autoload singletons for GameManager, AudioManager, SaveSystem — accessible everywhere
  7. AnimationPlayer — Use AnimationPlayer for everything: sprite frames, position, modulate, function calls, particles
  8. GDScript for gameplay — GDScript is fast enough for 99% of game logic; use C++ via GDExtension only for performance-critical systems

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 提供 Godot 引擎完整开发指导,涵盖 2D/3D 游戏开发核心功能
  • 包含场景系统、信号通信、状态机、着色器等实用代码示例
  • 面向实际开发需求,具备高实用价值和广泛适用性
触发精准95/100

亮点

  • description 明确聚焦 Godot 着色器及游戏开发任务
  • 触发词精准完整,边界清晰,有效覆盖目标用户群体
结构规范98/100

亮点

  • 文档结构清晰,分模块展示核心能力与最佳实践
  • 包含完整端到端代码示例和安装部署说明
  • frontmatter 完整规范,符合 Skill 平台要求
执行可靠96/100

亮点

  • 所有代码示例语法正确,参数设置合理
  • 工具来源明确,无不可逆操作风险
  • 覆盖主要异常场景,执行流程可靠稳定
证据可验 (前四项均值)95/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • godotengine.org

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。