Skip to content

RandallLiuXin/GodotMaker / skills/core/project-scaffold

project-scaffold

Verified

Generate a new Godot game project with standardized ECS structure and tooling. Use when starting a new game: "create a project", "set up a new game", "scaffold", "initialize", "new project", "start building", "let's make it". Triggers after game-planner produces a confirmed plan, or when the user provides a game name + genre directly. Even for simple requests like "make me a new Godot project", use this skill to ensure proper ECS structure. Creates directory structure, project.godot, CLAUDE.md, gecs World setup, addon stubs, and template source files based on the game plan or user input.

templates/claude.md.tmpl

View on GitHub
# CLAUDE.md

## Project: {{game_title}}

{{game_description}}

Built with Godot 4.5+ and the gecs ECS framework.

## Architecture

ECS-native: components are data, systems are logic, entities are component bags.

### Directory Layout

- `src/components/` — C_ prefix, extends Component, @export vars only
- `src/systems/` — PascalCase + System suffix, extends System
- `src/entities/` — extends Entity, define_components()
- `scenes/` — .tscn scene files; gameplay scene contains a World child
  node wired via `ECS.world = $World` in the main script's `_ready()`
  (autoloading World breaks gecs v7.1.0)
- `test/` — gdUnit4 tests (TDD: test first, then implement)

### ECS Rules

1. Components hold data only — no logic, no methods that modify other components
2. Systems query entities by component composition and run logic each frame
3. One system writes each data field per entity — no write conflicts
4. Entity destruction: add DestroyTag component, DestructionSystem handles cleanup at frame end
5. Physics callbacks: never modify node tree directly — only add components or use SetDeferred

### gecs Quick Reference

```gdscript
# Component — pure data
class_name C_Velocity extends Component
@export var x: float = 0.0
@export var y: float = 0.0

# System — pure logic
class_name MovementSystem extends System
func query() -> QueryBuilder:
    return q.with_all([C_Velocity])
func process(entity: Entity, delta: float) -> void:
    var vel = entity.get_component(C_Velocity)
    entity.position += Vector2(vel.x, vel.y) * delta

# Entity — component bag
class_name PlayerEntity extends Entity
func define_components() -> Array:
    return [C_Velocity, C_Health, C_PlayerInput]
```

For full gecs API, use the **gecs** skill.

## Testing

- **Framework**: gdUnit4
- **TDD**: write test first, then implementation
- **Run single**: `godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --add res://test/xxx.gd --ignoreHeadlessMode`

## Build Check

- **Compile**: `godot --headless --quit 2>&1`
- Use the **headless-build** skill for structured error diagnosis

## Available Skills

GodotMaker skills in `.claude/skills/`:

| Skill | Purpose |
|-------|---------|
| **gecs** | ECS framework API reference and patterns |
| **headless-build** | Compile-check verification |
| **gdunit-driver** | Test runner and result parser |
| **godot-api** | Godot engine API lookup by version |
| **physics**, **ui**, **animation**, etc. | Post-implementation reviewers |

## Language

- Code, comments, commit messages: English
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall