mcpbeat Sign in

Godot 3d World Building Agent Skill

Expert patterns for 3D level design using GridMap with MeshLibrary, CSG constructive solid geometry, occlusion, and runtime GridMap builders. Use when building 3D levels, modular tilesets, or BSP-style geometry. For sky/fog/Environment recipes, route to godot-3d-lighting. Trigger keywords: GridMap, MeshLibrary, set_cell_item, get_cell_item, map_to_local, local_to_map, CSGCombiner3D, CSGBox3D, CSGSphere3D, CSGPolygon3D, OccluderInstance3D, bake CSG.

10k tokens
context cost
the whole folder, loaded on every use
13
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
451
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-3d-world-building

The instruction itself

31 sections, as written by the author

3D World Building

Expert guidance for level design with GridMaps, CSG bake, and occlusion — not lighting/atmosphere authorship.

NEVER Do

  • NEVER forget to bake GridMap navigation — GridMaps don't auto-generate navigation meshes. Use EditorPlugin or manual NavigationRegion3D.
  • NEVER use CSG for final game geometry — CSG is for prototyping. Convert to static meshes for performance (use "Bake CSG Mesh" in editor).
  • NEVER scale GridMap cell size after placing tiles — Changing cell_size doesn't update existing tiles, causing misalignment. Set it once at the start.
  • NEVER ship a MeshLibrary item without verifying collision — Call mesh_library.get_item_shapes(tile_index) (or inspect the source scene StaticBody3D + CollisionShape3D) before convert; empty shapes spawn visual-only geometry players fall through.
  • NEVER bake CSG before the combiner has a settled frame — Extract meshes only after await get_tree().process_frame (see safe_csg_baking.gd); baking mid-recompute yields empty or stale ArrayMesh data. Order: finish boolean edits → wait one frame → bake → delete CSG → add collision.
  • NEVER animate CSG nodes during gameplay — Moving a CSG node within another forces the CPU to recalculate the boolean geometry, causing significant performance drops.
  • NEVER place generic logic nodes in a GridMap — GridMap is highly optimized only for meshes, navigation, and collision. Use proxy tiles + scripts for spawns/triggers.
  • NEVER use non-manifold meshes in CSG — Custom CSGMesh3D assets must be manifold (closed, no self-intersections). Non-manifold meshes break the CSG algorithm.

Godot 4.7: 3D Editor Workflow

  • Path3D supports snap-to-colliders for path point placement on geometry.
  • 3D vertex snapping with vertex/origin base setting (editor B key workflow).
  • EditorSceneFormatImporter uses ImportFlags enum for import constants.

Available Scripts

> MANDATORY: Read the appropriate script before implementing the corresponding pattern.

> Do NOT Load lighting/sky/fog scripts or deep Environment tutorials here — route to godot-3d-lighting.

collision_gen.gd

Automatic collision shape generation from meshes. Use when importing models without collision or for procedural geometry.

gridmap_runtime_builder.gd

Sole streaming / runtime GridMap entry — batch tile placement, chunk-style rebuilds, and auto-navigation baking. Prefer this over ad-hoc WorldStreamer stubs.

csg_bake_tool.gd

EditorScript to bake CSG geometry to static meshes with proper materials and collision. Use when finalizing level prototypes.

safe_csg_baking.gd

Expert technique for safe CSG baking. Awaits the end of the frame before extracting baked meshes to avoid empty data.

lod_manager.gd

Level-of-detail switching based on camera distance. Manages mesh swapping and visibility for large outdoor scenes.

occlusion_setup.gd

OccluderInstance3D configuration for manual occlusion culling. Use for indoor levels with many rooms.

grid_map_logic_manager.gd

Proxy-tile pattern: replace invisible MeshLibrary markers with spawn/trigger scenes at _ready, then clear proxy cells.

world_streamer.gd

ResourceLoader.load_threaded_request queue — stutter-free chunk instantiation after background load completes.


Golden Path (GridMap / CSG / Occlusion)

  • MeshLibrary — Source scene: MeshInstance3D + StaticBody3D/CollisionShape3D → Convert To MeshLibrary → verify get_item_shapes().
  • GridMap — Set cell_size once, place cells, bake NavigationRegion3D. Runtime rebuilds: MANDATORY gridmap_runtime_builder.gd.
  • CSG greybox — Prototype with CSGCombiner3D → MANDATORY safe_csg_baking.gd / csg_bake_tool.gd → delete live CSG.
  • Occlusion / LOD — Indoor rooms: occlusion_setup.gd. Distance swaps: lod_manager.gd.
  • Sky / fog / WorldEnvironment — Out of scope; use peer godot-3d-lighting (keep only a DirectionalLight3D present if volumetric fog is enabled elsewhere).

GridMap Fundamentals

Setup (compact)

extends GridMap

func _ready() -> void:
    mesh_library = load("res://tilesets/dungeon_library.tres")
    cell_size = Vector3(2, 2, 2)  # Set once; never after tiles exist

Cell API: set_cell_item(pos, index, orientation]), get_cell_item, INVALID_CELL_ITEM, local_to_map / map_to_local. For batch/runtime placement and nav bake, load [gridmap_runtime_builder.gd — do not paste a custom chunk streamer.

Collision verification

var shapes := mesh_library.get_item_shapes(tile_index)
if shapes.is_empty():
    push_error("Tile %d has no collision — fix MeshLibrary source scene" % tile_index)

CSG Bake Order

  • Finish boolean edits under CSGCombiner3D.
  • await get_tree().process_frame (WHY: CSG dirty flags settle one frame late).
  • Bake to MeshInstance3D + collision via scripts above; remove CSG from exported scenes.
  • Never animate CSG at runtime.

Brush types (Box/Cylinder/Sphere/Polygon) are editor greybox tools only — not shipping geometry.


Streaming Decision

| Need | Action |

|------|--------|

| Runtime GridMap tiles / chunk rebuild + nav bake | MANDATORY gridmap_runtime_builder.gd |

| Large open-world scene streaming | Peer godot-genre-open-world |

| Ad-hoc WorldStreamer inline stub | Cut — do not reintroduce incomplete load-from-file TODOs |


Expert Techniques

Spatially Partitioning MultiMeshes

Partition dense props into regional MultiMeshInstance3D nodes so frustum/occlusion can cull whole clusters (single MultiMesh AABB draws everything).

GridMap Logic Proxies

Use invisible proxy tile IDs for spawns/triggers; at _ready, get_used_cells_by_item, instantiate logic scenes, clear proxy cells. Keep logic off the GridMap itself.

Interior-Mapping

For city-scale fake interiors, use a spatial shader on window planes — peer godot-shaders-basics. Do not paste full shader recipes here.

Edge Cases

  • No collision: empty get_item_shapes → fix MeshLibrary source.
  • CSG z-fight: tiny offset on subtraction brushes before bake.

Deep recipes (on demand)

| Topic | Reference / script |

|-------|-------------------|

| GridMap / CSG bake walkthrough | gridmap-and-csg.md |

| Chunk streaming / procgen rooms | streaming-and-procgen.md |

| Proxy spawn tiles | grid_map_logic_manager.gd |

| Threaded chunk load | world_streamer.gd |

Reference

> Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation

Prerequisites
  • godot-project-foundations — scene tree, resources, and import basics before MeshLibrary conversion and WorldEnvironment setup.
  • godot-physics-3d — StaticBody3D/CollisionShape3D patterns that must land in MeshLibrary source scenes or players fall through tiles.
  • godot-gdscript-mastery — typed GridMap/CSG scripting, signals, and await/process_frame patterns used in bake and runtime builders.
Complements
Downstream / consumers
  • godot-procedural-generation — dungeon/terrain generators that write cells into GridMap as the placement backend.
  • godot-genre-open-world — chunk streaming, floating origin, and HLOD built on these world-building primitives.
  • godot-genre-sandbox — player-driven building and editable voxel/grid worlds that reuse GridMap/CSG bake flows.
Master
  • godot-master — library router and mirrored module entry for cross-skill discovery.

Other skills for the same job

different authors, same section of the catalogue
Internal Comms
by anthropics
vendor ×13

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

6k tokens
Competitive Ads Extractor
by frostant
×10

Extracts and analyzes competitors' ads from ad libraries (Facebook, LinkedIn, etc.) to understand what messaging, problems, and creative approaches are working. Helps inspire and improve your own ad campaigns.

2k tokens
Lead Research Assistant
by frostant
×8

Identifies high-quality leads for your product or service by analyzing your business, searching for target companies, and providing actionable contact strategies. Perfect for sales, business development, and marketing professionals.

2k tokens
Developer Growth Analysis
by frostant
×6

Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.

4k tokens
App Store Optimization
by alirezarezvani
×3

Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

55k tokens scripts
Deeptools
by christophacham
×3

NGS analysis toolkit. BAM to bigWig conversion, QC (correlation, PCA, fingerprints), heatmaps/profiles (TSS, peaks), for ChIP-seq, RNA-seq, ATAC-seq visualization.

21k tokens scripts
Pymatgen
by christophacham
×3

Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.

26k tokens scripts
Enhance Prompt
by google-labs-code
vendor ×2

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

3k tokens

How to use it

Copy the folder

Take thedivergentai/godot-3d-world-building from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.