headless-scripting

Run GDScript files against Summer Engine headlessly for operations no MCP tool exposes.

66|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/SummerEngine/summer --skill headless-scripting-summerengine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: headless-scripting
Source: https://github.com/SummerEngine/summer/tree/main/library/skills/headless-scripting
Command: npx skills add https://github.com/SummerEngine/summer --skill headless-scripting-summerengine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Many engine operations — navmesh baking, collision shape generation, TileSet authoring, asset re-imports, exports — have no MCP tool, and agents often wrongly conclude they are impossible. This Skill teaches how to run arbitrary GDScript against a real project via the engine binary in headless mode, while avoiding the measured traps: silent hangs, fake exit codes, null screenshots, and editor-connection hijacking. ## Core Features & Use Cases - Headless script execution: Invoke the engine binary with --headless --disable-crash-handler -s res://script.gd, with scripts extending SceneTree or MainLoop, and lint first using --check-only. - Resource authoring recipes: Bake navmeshes with NavigationServer3D, generate trimesh/convex collision shapes, author Animations and TileSets, pack scenes with correct owner settings, and save via ResourceSaver. - Asset import and export: Re-import raw files written to disk with --import, and produce runnable builds with --export-release and a hand-written export_presets.cfg. - Use Case: An agent needs a navmesh for a level but no MCP tool exists. It writes a GDScript that bakes from source geometry, runs it headless against the project, checks stderr for errors, and verifies the saved .tres from a second process. ## Quick Start Ask the agent to bake a navmesh for the current Summer project by writing a SceneTree GDScript and running it headless with the engine binary from summer_get_project_context.

Frequently Asked Questions about headless-scripting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a GDScript file headlessly in Summer Engine?

Invoke the engine binary with --headless --disable-crash-handler --path <project-dir> -s res://script.gd. The script must extend SceneTree or MainLoop and call quit() when done. Get the binary path from summer_get_project_context's engineBinaryPath field.

How do I bake a navmesh from a script in Godot or Summer Engine?

Create a NavigationMesh, fill a NavigationMeshSourceGeometryData3D with meshes, then call NavigationServer3D.bake_from_source_geometry_data and save with ResourceSaver. Check the save return value, since a silent non-zero ships a level with no navmesh.

Why does my headless script hang with no output?

The script almost certainly extends Node instead of SceneTree or MainLoop. The engine's rejection path opens a modal alert that never renders headlessly, blocking forever. Kill the process and fix the first line of the script.

Can I take screenshots or measure FPS in headless mode?

No. Headless uses the dummy rendering driver, so viewport images are null and draw_calls stay at 0.0 forever. Use the --summer-verify windowed instance instead, which renders offscreen at position (-32000,-32000) with a real renderer.

Why does load() fail on a PNG I wrote to the project directory?

A raw file on disk is not an imported resource; it lacks the .import sidecar and the imported artifact. Either save resources directly as .tres via ResourceSaver, or run the engine with --import and verify the sidecar exists.

What are the limitations of headless scripting in Summer Engine?

Lightmap baking fails headless because there is no RenderingDevice, occlusion culling bake is editor-button only, and EditorInterface is unavailable outside the editor. Also, --import on shipped builds up to 0.5.55 hijacks the user's editor connection, so warn before running it on an open project.