Files
dotfiles/claude/.claude/skills/godot-docs/SKILL.md
2026-08-04 11:42:09 +02:00

3.0 KiB

name, description
name description
godot-docs Use whenever you need Godot Engine API facts — a class, method signature, property, signal, constant, enum, annotation or theme item — or when you are unsure whether a Godot symbol exists. Run the offline `godoc` CLI instead of guessing from memory or fetching docs.godotengine.org, because `godoc` is indexed from the exact engine source this machine builds against.

Godot API reference (offline)

godoc serves the Godot class reference from a local SQLite index built out of the engine source tree. It is authoritative for the installed engine version. Check the version with godoc info.

Do not answer Godot API questions from memory. Signatures change between minor versions. Run the tool.

Do not fetch docs.godotengine.org for class reference. The website tracks a different version than the local build.

Commands

godoc show Node3D                 # full class: description, members, subclasses
godoc show Node3D --brief         # header and member counts only
godoc show Node3D.look_at         # one member, with parameters and defaults
godoc show Sprite2D.position      # resolves through the inheritance chain
godoc look_at                     # bare name: every class that declares it
godoc search rotate toward point  # full text search, bm25 ranked
godoc members Button --kind signal
godoc tree CharacterBody2D
godoc info                        # engine version and index build time

Add --json to any command for structured output. Add --kind, --cls, -n to search. Run godoc kinds for valid kinds.

Which command to use

You need Command
An exact signature you can name godoc show Class.member
To know what a class offers godoc show Class
Only one category of member godoc members Class --kind method
To find a symbol by behaviour godoc search <words>
To confirm a symbol exists godoc show <name>, exit 1 means no

Use show before search. Exact lookup is precise; search is ranked prose matching and can rank a near miss first.

Exit codes

0 hit, 1 no match, 2 index missing or unreadable. On exit 2, run godoc index --force.

Scope

Covers the class reference only: 1058 classes, ~23.7k members, including @GDScript annotations and @GlobalScope functions. It does not cover the narrative tutorials (2D/3D guides, shader guides, export guides). Use WebFetch on docs.godotengine.org for those, and say so when you do.

Maintenance

Source: ~/projects/godoc (stdlib Python only, no virtualenv). After a git pull in the Godot source, run godoc index --force. See ~/projects/godoc/README.md to change or extend the tool.

The same index is available over MCP for Claude Desktop and Cursor. Run godoc mcp --install to register it, or godoc mcp --print-config for the snippet. In Claude Code, prefer the CLI above: it costs no context until you call it.

To set the tool up on another machine, follow ~/projects/godoc/INSTALL-MCP.md. It is a runbook written for an agent and it covers fetching the Godot documentation XML.