godot-composition — Claude Code skill: component architecture
Tells your agent to build Godot entities from components instead of inheritance chains, with ready-made GDScript files for health, hitboxes and movement.
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-composition -a claude-codeWhat godot-composition does
The skill pushes a "Has-A" model: a player, enemy or weapon is a root orchestrator node holding specialised child components. That root script carries no logic of its own — it passes data between children. Shipped scripts cover health_component.gd, hit_box_component.gd, hurt_box_component.gd, velocity_component.gd, interaction_component.gd, follower_component.gd, state_component_vsm.gd, status_effect_component.gd and visual_sync_component.gd.
Wiring goes through typed @export slots or %UniqueNames in the scene. Reaching for $ or get_node() to grab a component is off the table, because rearranging the tree breaks those paths. A component stays selfish: it never references its owner, talking upward with signals and receiving calls downward. The skill marks composition_root_init.gd as the mandatory first read.
A decision table sorts the grey areas. Gameplay behaviours belong in components, cross-scene services such as audio or saves go to Autoload, and inheritance is reserved for genuine engine-class specialisation. You need Godot and GDScript — this is a set of rules plus scripts, not a library you import into a project.
What it helps with
- split a player controller into separate components
- reuse health logic across players and enemies
- wire hitboxes and damage areas without hardcoded scene paths
- build a state machine out of child nodes
- keep sprite flipping out of movement logic
Example prompts for the agent
- Refactor
player.gdinto components following godot-composition - Give this enemy shooting through a separate component, no inheritance
- Check my scene: components should be wired with
@export, not$
How to install godot-composition
1Skills CLI (Vercel)
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-composition -a claude-code2Manually: put the files in place
~/.claude/skills/godot-composition/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/godot-composition/
1Skills CLI (Vercel)
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-composition -a codex2Manually: put the files in place
.agents/skills/godot-composition/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-composition -a cursor2Manually: put the files in place
.cursor/skills/godot-composition/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install thedivergentai/Game-Dev-Agentic-Skills godot-composition2Manually: put the files in place
.github/skills/godot-composition/SKILL.md1Skills CLI (Vercel)
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-composition -a gemini-cli2Platform CLI
gemini skills install https://github.com/thedivergentai/Game-Dev-Agentic-Skills --path skills/godot-compositionManually: put the files in place
.devin/skills/godot-composition/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-composition -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about godot-composition
How do I install godot-composition in Claude?
Run npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-composition -a claude-code. The skill file lands at ~/.claude/skills/godot-composition/SKILL.md.
What does godot-composition do?
It gives your agent architectural rules for Godot games: entities are assembled from components, and the root script only orchestrates them. Bundled scripts handle health, hitboxes, movement, interaction and states.
How is composition different from inheritance here?
Inheritance is kept for engine-class specialisation with a shared lifecycle. Adding a feature such as shooting or health through a parent chain is explicitly disallowed — that becomes its own component.