Godot Gdscript Patterns
925236118/AlphaAgent
Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.
Expert blueprint for physics queries using RayCast, ShapeCast, and DirectSpaceState.
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install thedivergentai/GD-Agentic-Skills godot-raycasting-queries --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/godot-raycasting-queries .claude/skills/godot-raycasting-queries && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "godot-raycasting-queries" agent skill from https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-raycasting-queries into .claude/skills/godot-raycasting-queries/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "godot-raycasting-queries", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-raycasting-queriesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install thedivergentai/GD-Agentic-Skills godot-raycasting-queries --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/godot-raycasting-queries .agents/skills/godot-raycasting-queries && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "godot-raycasting-queries" agent skill from https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-raycasting-queries into .agents/skills/godot-raycasting-queries/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "godot-raycasting-queries", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install thedivergentai/GD-Agentic-Skills godot-raycasting-queries --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/godot-raycasting-queries .cursor/skills/godot-raycasting-queries && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "godot-raycasting-queries" agent skill from https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-raycasting-queries into .cursor/skills/godot-raycasting-queries/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "godot-raycasting-queries", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/thedivergentai/GD-Agentic-Skills.git --path skills/godot-raycasting-queries--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install thedivergentai/GD-Agentic-Skills godot-raycasting-queries --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/godot-raycasting-queries .gemini/skills/godot-raycasting-queries && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "godot-raycasting-queries" agent skill from https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-raycasting-queries into .gemini/skills/godot-raycasting-queries/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "godot-raycasting-queries", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install thedivergentai/GD-Agentic-Skills godot-raycasting-queriesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/godot-raycasting-queries .github/skills/godot-raycasting-queries && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "godot-raycasting-queries" agent skill from https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-raycasting-queries into .github/skills/godot-raycasting-queries/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "godot-raycasting-queries", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install thedivergentai/GD-Agentic-Skills godot-raycasting-queries --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/godot-raycasting-queries .opencode/skills/godot-raycasting-queries && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "godot-raycasting-queries" agent skill from https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-raycasting-queries into .opencode/skills/godot-raycasting-queries/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "godot-raycasting-queries", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
godot-raycasting-queriesExpert blueprint for physics queries using RayCast, ShapeCast, and DirectSpaceState.
Godot Raycasting Queries is an agent skill from thedivergentai/GD-Agentic-Skills. Expert blueprint for physics queries using RayCast, ShapeCast, and DirectSpaceState. Covers hit detection, volume overlap, mouse picking, and high-performance server-side intersection queries. Use when implementing projectiles, LOS, terrain grounding, or AI sensors. Keywords raycast, shapecast, directspacestate, intersectray, intersectshape, PhysicsRayQueryParameters, collision mask, mouse picking.
Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and reference files (for example `references/migration-notes.md` and `references/query-elite-patterns.md`).
It sits in Game Development, covering Game development and Backend development. It works with Godot. The repository describes itself as: The official "Long-Term Memory" for Godot 4.7+ AI Agents. A high-density library of 99 expert skills and 27 genre blueprints, providing audited, strictly typed GDScript patterns… The licence is LGPL-3.0.
Read from SKILL.md and the folder at commit 4c4d0ff. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 10 files in scripts/, which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.godotengine.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Godot Raycasting Queries loads about 3.3k tokens when it runs, and up to ~4.8k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 1,042 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from thedivergentai/GD-Agentic-Skills at commit 4c4d0ff, republished under its LGPL-3.0 licence (© thedivergentai). 1,042 words, ~3,300 tokens.
.claude/skills/godot-raycasting-queries/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.MANDATORY for common paths — read before implementing (do not improvise query APIs from memory):
- direct_space_state_raycast.gd — high-frequency
intersect_raywithout RayCast nodes.- query_exclusion_optimization.gd — RID exclude lists so casters never self-hit.
- shapecast_ground_detection.gd — footing / volume casts when thin rays tunnel or miss.
Do NOT Load every script below for one task. Open only the row that matches the decision table.
Expert usage of PhysicsDirectSpaceState2D/3D for bypassing node-based overhead in high-frequency queries.
Reliable ground/footing detection using volume-based ShapeCast instead of thin rays.
Implementing piercing projectiles that detect and return multiple hits in a single line.
AI sensor logic using a fan of raycasts to detect targets within a FOV cone.
Calculating bounces for lasers or bullets using collision normal reflection.
Checking for overlapping physics bodies at a single point (Explosion epicenters).
Using get_rest_info to detect stuck objects and resolve overlaps immediately.
Converting 2D screen coordinates to 3D world rays for point-and-click interaction.
Finding water surface height for buoyancy systems using high-to-low raycasting.
Optimizing performance by excluding specific RIDs (Resource IDs) from intersection checks.
direct_space_state outside of _physics_process() — The physics space can be locked or running on a separate thread; querying it in _process() is unsafe [1, 2].CollisionObject nodes — CSG shapes, GridMap, and TileMapLayer return themselves, not a generic physics body [5, 6].RayCast nodes update instantly — They update once per physics frame. If you move a node and query it immediately, you MUST call force_raycast_update() [3, 9].collision_mask and collision_layer to filter queries at the server level for maximum performance.query.exclude = [self.get_rid()] [20].cast_motion or high-frequency stepping for bullets.PhysicsServer directly in C++ if you reach extreme query counts.result.rid — RIDs are the fastest way to identify and exclude objects in subsequent queries, bypassing node-path lookups [20].Pick the cheapest API that answers the question. Always pair rays/shapes with RID exclude + masks (query_exclusion_optimization.gd).
| Need | Prefer | Cost | When | Script |
|---|---|---|---|---|
| Persistent sensor in the scene (ledge, aim assist debug) | RayCast2D/RayCast3D node | Low–med | Few casts; OK waiting one physics frame (or force_raycast_update()) | Scene node + NEVER rules |
| Hitscan / LOS / one-shot mid-frame ray | PhysicsDirectSpaceState*.intersect_ray | Low | High frequency, no permanent node | MANDATORY direct_space_state_raycast.gd |
| Footing, thick walls, melee volume | ShapeCast* / intersect_shape | Med–high | Thin ray tunnels or misses volume | MANDATORY shapecast_ground_detection.gd |
| Explosion / occupancy at a point | intersect_point | Low–med | Epicenter overlap list | point_in_shape_query.gd |
| Stuck / penetration resolve | get_rest_info | Med | Overlap recovery | rest_info_3d_stuck_fix.gd |
| Pierce / multi-hit along a line | Repeated intersect_ray + exclude RIDs | Med | Projectiles that keep going | multiple_hit_piercing_ray.gd |
| Screen → world click | Camera project + intersect_ray | Low | Picking | mouse_pick_3d_query.gd |
func screen_point_to_ray():
var space_state = get_world_3d().direct_space_state
var mouse_pos = get_viewport().get_mouse_position()
var origin = project_ray_origin(mouse_pos)
var end = origin + project_ray_normal(mouse_pos) * 2000
var query = PhysicsRayQueryParameters3D.create(origin, end)
var result = space_state.intersect_ray(query)
if result:
return result.collider
return nulldirect_space_state in _physics_process, not _process.query.exclude = [get_rid()] on rays from character center.path.size() == 2 on NavigationServer3D.map_get_path for strict mesh LOS (see deep dive).collider.get_meta(&"surface_type") beats class/group checks for decals/footsteps.intersect_ray.NavMesh LOS validator, surface metadata, picking baseline, tunneling notes — references/query-elite-patterns.md.
Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing work to a peer domain — do not preload the whole lattice.
RayCast* vs PhysicsDirectSpaceState* queries, result dictionaries, and exclude to avoid self-hits.intersect_ray / intersect_shape / intersect_point / get_rest_info / cast_motion contracts for mid-frame space queries.hit_from_inside, and collide-with flags for reusable ray parameter objects.force_raycast_update() is required after moving.force_shapecast_update() for footing/melee detection that thin rays miss.project_ray_origin / project_ray_normal for screen-to-world picking rays from the active camera._physics_process-only space access are language-level contracts this skill depends on.RayCast2D nodes vs direct space state for sensors.© thedivergentai, LGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 12 other files (scripts, references) in skills/godot-raycasting-queries of thedivergentai/GD-Agentic-Skills.
Open the folder on GitHubat commit 4c4d0ff
Godot Raycasting Queries next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Godot Raycasting Queries this skillthedivergentai/GD-Agentic-Skills | 821 | — | ~3.3k | Automated safety check: Pass | LGPL-3.0 | |
| Godot Gdscript Patterns925236118/AlphaAgent | 103 | 10 repos | ~5k | Automated safety check: Pass | MIT | |
| 2D Map and Scene Generator0x0funky/agent-sprite-forge | 4.4k | — | ~2.9k | Automated safety check: Pass | MIT | |
| Godot UI Integrationzimo-xiao-zheng/godot-ui-integration | 285 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Godot Wechat Minigame Adaptergodothub/godot-minigame | 187 | — | ~1.5k | Automated safety check: Pass | MIT | |
| AI Game Art Pipelineybuild-ai/ai-game-art-pipeline-skill | 297 | — | ~1.1k | Automated safety check: Pass | MIT |
925236118/AlphaAgent
Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.
0x0funky/agent-sprite-forge
Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.
zimo-xiao-zheng/godot-ui-integration
Build or revise Godot UI from an approved design, separated art, or a visual reference when scene structure, gameplay binding, and runtime visual verification all matter.
godothub/godot-minigame
Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout.
ybuild-ai/ai-game-art-pipeline-skill
Provider-neutral open-source skill for planning and producing game-runtime art assets and animation: static props/icons, canonical character sheets, combat sprites, 3D/video motion references…
RandallLiuXin/GodotMaker
Runtime debugging and live project inspection via godot-mcp.
thedivergentai/GD-Agentic-Skills
Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs.
thedivergentai/GD-Agentic-Skills
Expert patterns for 3D level design using GridMap with MeshLibrary, CSG constructive solid geometry, occlusion, and runtime GridMap builders.
thedivergentai/GD-Agentic-Skills
Expert patterns for migrating 2D games to 3D including node type conversions, camera systems (third-person, first-person, orbit), physics layer migration, sprite-to-model art pipeline, and control…
thedivergentai/GD-Agentic-Skills
Expert patterns for simplifying 3D games to 2D including dimension reduction strategies, 2.5D fake-depth, isometric ports, camera flattening, physics conversion, 3D-to-sprite art pipeline, and…
thedivergentai/GD-Agentic-Skills
Agentic eyes for Godot work: cross-platform screenshot CLI (asset/region/window/screen) to budgeted WebP, TEMP editor viewport bridge under .gdskills/, and Taste Receptor Atlas v2 (~237…
thedivergentai/GD-Agentic-Skills
Expert patterns for AnimationTree including StateMachine transitions, BlendSpace2D for directional movement, BlendTree for layered animations, root motion, transition conditions, advance…
Works with
Categories
Expert blueprint for physics queries using RayCast, ShapeCast, and DirectSpaceState. Godot Raycasting Queries is an agent skill from thedivergentai/GD-Agentic-Skills. Expert blueprint for physics queries using RayCast, ShapeCast, and DirectSpaceState.
Godot Raycasting Queries fits situations like: implementing projectiles; terrain grounding.
Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a claude-code`. Or copy the skill folder (skills/godot-raycasting-queries in thedivergentai/GD-Agentic-Skills) into .claude/skills/godot-raycasting-queries in your project. Claude Code loads it when a task matches its description.
Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a codex`. Or copy the skill folder (skills/godot-raycasting-queries in thedivergentai/GD-Agentic-Skills) into .agents/skills/godot-raycasting-queries in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-raycasting-queries -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/godot-raycasting-queries, .gemini/skills/godot-raycasting-queries, .github/skills/godot-raycasting-queries and .opencode/skills/godot-raycasting-queries in your project.
SKILL.md names no scripts, command-line tools or credentials: Godot Raycasting Queries is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: docs.godotengine.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Godot Raycasting Queries is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Godot Raycasting Queries: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars), Godot UI Integration (zimo-xiao-zheng/godot-ui-integration, 285 stars) and Godot Wechat Minigame Adapter (godothub/godot-minigame, 187 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
thedivergentai (a GitHub user) maintains it in thedivergentai/GD-Agentic-Skills, which has 821 GitHub stars. The repository holds 98 skills in this directory. The repository was last updated on September 9, 2026.
Source: thedivergentai/GD-Agentic-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.