godot-gdscript-mastery
БесплатноЗапускает вложенные скриптыНе проверенExpert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed…
от thedivergentai★ 1 019 звёзд на GitHubОб этом скилле
GDScript Mastery
Expert guidance for writing performant, maintainable GDScript — Godot-landmine decision trees, not a style-guide reprint.
Do NOT Load
- Do not load this skill for general prose style or Godot engine version upgrades (3→4 / 4.x hops) — those live in godot-version-migration (plus official upgrading guides via that hub).
- Do not preload every script below; open only the MANDATORY pointer for the Core Directive you are implementing.
- Do not treat EditorScript utilities (
type_checker,performance_analyzer,signal_architecture_validator) as runtime gameplay code.
NEVER Do in GDScript
- NEVER use
@onreadyand@exporton the same variable — Initialization order will cause@onreadyto overwrite the Inspector value. - NEVER modify a Dictionary's size while iterating it — Use
dict.keys().duplicate()or iterate a clone to safely erase elements. - NEVER use string-based
connect("signal", ...)— Always use the Signal object syntax (button.pressed.connect(...)) for compile-time safety. - NEVER attempt to override non-virtual native engine methods — Overriding
queue_free()orget_class()is unsupported and will be ignored by engine callbacks. - NEVER use dynamic
get_node()or$inside_process()— Fetching paths every frame stalls the CPU. Cache and use@onready. - NEVER use
Parent.method()calls — Violates "Signal Up, Call Down". Use signals to communicate with parents. - NEVER use
isfollowed by a hard cast — If the type check passes but the object changes, it crashes. Useasand check for null. - NEVER use
print()for production debugging — Usepush_error(),push_warning(), or breakpoints. - NEVER pre-load huge resources in
_ready()— UseResourceLoader.load_threaded_request()for async loading. - NEVER use global variables in Autoloads when
static varis sufficient — Static variables offer better encapsulation.
Core Directives (decision trees + MANDATORY scripts)
1. Strong Typing & Performance
| Landmine | Decision |
|---|---|
Hot path still Variant? |
Annotate vars/returns; prefer typed collections |
Generic math in _process? |
Use typed helpers (absf, ceili, clampf) |
| Green safe-lines missing? | Fix inference with := or explicit types |
MANDATORY: typed_collections_mastery.gd, array_preallocation_perf.gd, type_checker.gd (EditorScript audit).
2. Signal Architecture
| Landmine | Decision |
|---|---|
| Child needs parent reaction? | Emit signal up — never call parent methods |
| Cross-script payload unsafe? | Typed signal name(arg: Type) |
| Connect visibility? | Prefer _ready() connects over invisible editor-only wiring |
MANDATORY: typed_signal_definitions.gd, signal_architecture_validator.gd.
3. Node Access & Lifecycle Safety
| Landmine | Decision |
|---|---|
| Need child nodes? | @onready / %UniqueName — never in _init() |
| Scene-instanced node with ctor args? | Use @export injection — _init(args) breaks PackedScene.instantiate() |
| Path lookup every frame? | Cache once; never $ / get_node in _process |
MANDATORY: safe_type_casting.gd.
4. Callable & Signal (First-Class)
| Landmine | Decision |
|---|---|
| Extra context on callback? | Callable.bind(...) |
| Discard unused signal args? | Callable.unbind(n) |
| One-off timeout logic? | Inline lambda OK; keep refs if create_callback-style longevity matters |
MANDATORY: callable_binding_context.gd, unbind_signal_args.gd, advanced_lambdas.gd, functional_lambda_logic.gd.
5. Async, Statics & Safe Collections
| Landmine | Decision |
|---|---|
| Sequence timers without threads? | await chains — see await manager |
| Global state without Autoload bloat? | static var (+ nullify large statics when done) |
| Erase while iterating Dictionary? | Clone keys first |
MANDATORY: await_sequence_manager.gd, static_var_singleton_alt.gd, dictionary_safe_iteration.gd, performance_analyzer.gd (EditorScript).
Script Catalog (all files)
| Script | When to open |
|---|---|
| typed_collections_mastery.gd | Typed Array/Dictionary opcodes |
| functional_lambda_logic.gd | reduce / all / any |
| advanced_lambdas.gd | Higher-or |
Установить godot-gdscript-mastery в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл godot-gdscript-mastery?
Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: static_typing, signal_architecture, unique_nodes, @onready, class_name, signal_up_call_down, Callable.bind, typed_collections, await_sequence.
Как установить скилл godot-gdscript-mastery?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл godot-gdscript-mastery запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic