Init template

From striderZA/OpenCodeGameStudios · View interactive version

Init template is an AI agent skill from the GitHub repository striderZA/OpenCodeGameStudios. First-time repo setup for new projects. Transforms the cloned OCGS template into a clean, ready-to-use game project with your own identity and harness.

How to use this skill

Skill file

When this skill is invoked:

Phase 1: Parse Arguments

Check if CLI arguments were passed (from argument-hint):

If --name, --engine, and --harness are all provided, skip the interactive prompt entirely and proceed to Phase 2 using the provided values.

Otherwise, use question to gather missing details:

Tab 1: Project Identity

Tab 2: Engine & Genre

Tab 3: Team

Tab 4: Agent Harness

The template ships configuration for all five. The answer selects the module install target, the MCP config file, and the harness config this skill validates. It does not delete the others unless the user asks in Phase 7.

| Harness | Content target | MCP file | Notes |

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

| OpenCode | .opencode/{agents,skills,commands,rules} | opencode.json (mcp.servers) | Windows checkouts may need node tools/fix-opencode-symlinks.mjs |

| Pi | .agents/{agents,skills,commands,rules} | .pi/mcp.json (mcpServers) | Project MCP loads only after the project is trusted |

| omp | .omp/agents + .agents/{skills,commands,rules} | .omp/mcp.json (mcpServers) | Agents are generated into .omp/agents/; they inherit the session tool set |

| Claude Code | .claude/{agents,skills,commands,rules} | .mcp.json (mcpServers) | Agents gain name: frontmatter; project MCP needs approval |

| Codex | .codex/agents + .agents/skills | .codex/config.toml ([mcp_servers.*]) | Agents are converted to TOML; commands and path-rules do not map |

Phase 2: Install Modules

Install the desired framework modules for the selected harness. Pass --harness on every command. add is idempotent: modules already present in the harness install state are skipped.

# Required
node .opencode/modules/install.mjs add core --harness <harness>

# Engine specialists (choose the module matching --engine)
node .opencode/modules/install.mjs add engine-godot --harness <harness>   # or engine-unity / engine-unreal / engine-sfml3 / engine-raylib / engine-bevy

# Common starter set
node .opencode/modules/install.mjs add art design ui qa release prototyping --harness <harness>

Use --force only to refresh files after an upgrade; it overwrites existing module files and refreshes the install record.

Available modules (run node .opencode/modules/install.mjs list --harness <harness> to see all):

| Module | Description |

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

| core | Framework skeleton (required) |

| art | Aseprite MCP, art generation, art bible |

| design | Game mechanics, systems design, combat |

| architecture | Technical planning, ADRs |

| stories | Epics, stories, dev workflow, code review |

| programming | Gameplay, AI, engine, network agents + rules |

| ui | UX design, UI programming, accessibility |

| audio | Audio direction, sound design |

| narrative | Story, world-building, dialogue |

| level-design | Level layout, encounter design |

| qa | Testing strategy, bug tracking, profiling |

| release | Release management, sprints, changelogs |

| prototyping | Rapid prototyping, exploration |

| live-ops | Post-launch content, community |

| localization | i18n, translation pipeline |

| engine-godot | Godot 4 specialists |

| engine-unity | Unity specialists |

| engine-unreal | Unreal Engine 5 specialists |

| engine-sfml3 | SFML 3 specialist |

| engine-raylib | Raylib specialist |

| engine-bevy | Bevy specialists |

| data | Data file conventions |

If a module has an MCP fragment for the selected harness, the installer merges it into that harness's MCP file. If the server already exists, it is left untouched and reported as skipped.

Agent installation differs by harness: omp definitions are generated into

.omp/agents/, Claude Code definitions gain the required name: frontmatter in

.claude/agents/, and Codex definitions are converted to

.codex/agents/*.toml. OpenCode and Pi use .agents/agents/ content directly.

Phase 3: Replace README.md

Write a fresh README.md to the project root. Use a template structure like:

# [Game Name]

> [One-line description]

Built with [Engine] using [OpenCode Game Studios](https://github.com/striderZA/OpenCodeGameStudios).

## Quick Start

[harness command]


Type `/start` for onboarding, or browse all skills with `/`.

## Project Structure

/

├── src/ # Game source code

├── assets/ # Game assets (art, audio, vfx)

├── design/ # Game design documents

├── docs/ # Technical documentation

└── production/ # Sprint plans, session logs


## License

[Choose a license]

Replace [Game Name], [One-line description], [Engine], and [harness command] with the user's answers from Phase 1. Harness commands: opencode, pi, omp, claude, codex.

Phase 4: Update AGENTS.md

Read AGENTS.md and update:

Phase 5: Configure the Selected Harness

Read and validate only the config for the selected harness. If a file is missing or malformed, warn and skip that item.

OpenCode

```bash

node tools/fix-opencode-symlinks.mjs

```

Pi

oh-my-pi (omp)

Claude Code

```markdown

@AGENTS.md

```

Codex

Phase 6: Remove Internal Files

For each file/directory below, check existence first before deleting. If the directory already has user-created content, warn and skip rather than destroying it:

Phase 7: Optional Harness Pruning

Ask with question:

Never delete these shared paths, whichever harness was selected:

Prune list per selected harness:

| Selected | Safe to remove |

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

| OpenCode | .pi/settings.json, .omp/config.yml, .omp/mcp.json, .omp/agents/, .claude/{agents,skills,commands,rules,modules}/, .codex/, .cursor/rules/ |

| Pi | .opencode/{agents,skills,commands,rules}, .omp/, .claude/{agents,skills,commands,rules,modules}/, .codex/, .cursor/rules/ |

| omp | .opencode/{agents,skills,commands,rules}, .pi/settings.json, .claude/{agents,skills,commands,rules,modules}/, .codex/, .cursor/rules/ |

| Claude Code | .opencode/{agents,skills,commands,rules}, .pi/settings.json, .omp/, .codex/, .cursor/rules/ |

| Codex | .opencode/{agents,skills,commands,rules}, .pi/settings.json, .omp/, .claude/{agents,skills,commands,rules,modules}/, .cursor/rules/ |

Show the resolved paths before deleting. Do not delete files that are not on this list. Remove empty parent directories only after their contents are gone.

Phase 8: Optional Git Reset

If the user selected --reset-git or agrees when prompted:

Phase 9: Summary

Print a completion summary:

✅ Template initialized

  Project: [Game Name]
  Engine:  [Engine]
  Team:    [Size]
  Harness: [Harness]

  What's next:
  - Run /setup-engine [engine] to configure your engine docs
  - Run /concept-brainstorm to start designing your game concept
  - Run /start for guided onboarding
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.