init-template

$npx mdskill add striderZA/OpenCodeGameStudios/init-template

Transforms a cloned OCGS template into a clean, ready-to-use game project.

  • Solves the problem of setting up a new game project from a template.
  • Uses Read, Write, Edit, Bash, and question tools for setup.
  • Parses CLI arguments or prompts user for project identity and engine.
  • Installs modular frameworks and resets git history for a fresh start.

SKILL.md

.github/skills/init-templateView on GitHub ↗
---
name: init-template
description: "First-time repo setup for new projects. Transforms the cloned OCGS template into a clean, ready-to-use game project with your own identity."
argument-hint: "[--reset-git] [--name \"My Game\"] [--engine godot|unity|unreal]"
user-invocable: true
allowed-tools: Read, Glob, Grep, Write, Edit, Bash, question, Task
---

When this skill is invoked:

## Phase 1: Parse Arguments

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

- `--name "My Game"` → sets game name (skips the name question below)
- `--engine godot|unity|unreal` → sets engine (skips engine question)
- `--reset-git` → automatically offers git reset (skips the prompt)

If `--name` and `--engine` are both 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
- **What is your game's name?** (e.g., "My Game")
- **What is your game's one-line description?** (e.g., "A 2D platformer about a cat in space")

### Tab 2: Engine & Genre
- **Which engine are you using?** (godot / unity / unreal)
- **What genre best describes your game?** (e.g., platformer, RPG, puzzle, FPS, strategy)

### Tab 3: Team
- **Team size** (solo / small 2-5 / medium 6-15 / large 16+)
- **Preferred model tier** (default / workhorse / lightweight) — refer to the README's Model Mapping section for options

### Modular Installation

After setting project identity, install the desired framework modules:

```bash
node .agents/modules/install.mjs add core
node .agents/modules/install.mjs add engine-godot
node .agents/modules/install.mjs add art design ui qa release prototyping
```

Available modules (run `node .agents/modules/install.mjs list` 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 |
| `data` | Data file conventions |

## Phase 2: Replace README.md

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

```markdown
# [Game Name]

> [One-line description]

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

## Quick Start

```bash
opencode
```

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]`, and `[Engine]` with the user's answers from Phase 1.

## Phase 3: Update AGENTS.md

Read AGENTS.md and update:
- Set the engine to the user's choice by changing the `## Technology Stack` section
- Update the model assignment: replace the model table with the user's preference (default/workhorse/lightweight), mapping to their engine's specialist agents
- Remove or update any project-specific settings
- If AGENTS.md is missing or malformed, warn and skip this phase

## Phase 4: Update opencode.json

Read opencode.json and clean it up:
- Remove any internal-only plugin paths
- Set project name appropriately
- Keep the ccgs-hooks.ts plugin reference only if the file actually exists: `if [ -f .opencode/plugins/ccgs-hooks.ts ]; then ...`
- If opencode.json is missing or malformed, warn and skip this phase

## Phase 5: 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:

- `rm -f UPGRADING.md CONTRIBUTING.md SECURITY.md CODE_OF_CONDUCT.md`
- Clear `design/` contents only if empty of user files: `if ls design/*.md >/dev/null 2>&1; then echo "WARNING: design/ has content, skipping"; else rm -rf design/*; fi`
- Clear `src/` contents only if empty of user files: `if ls src/*.gd src/*.cs src/*.cpp src/*.ts >/dev/null 2>&1; then echo "WARNING: src/ has code files, skipping"; else rm -rf src/* && touch src/.gitkeep; fi`
- Clear `production/` contents only if empty of user files: similar guard
- On any error (file locked, permission denied), warn and continue to next item

## Phase 6: Optional Git Reset

If the user selected `--reset-git` or agrees when prompted:
- Offer to reset git history to a single commit
- `git checkout --orphan fresh-root`
- `git add -A`
- `git commit -m "Initial commit: scaffolded from OpenCode Game Studios template"`
- Delete all old tags (optional) — warn: if tags were previously pushed to remote, deletion requires `git push origin --delete <tag>` for each one
- Force push if needed (warn: this rewrites remote history for anyone who has cloned this repo)

## Phase 7: Summary

Print a completion summary:

```
✅ Template initialized

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

  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
```

More from striderZA/OpenCodeGameStudios

SkillDescription
art-bibleGuided, section-by-section Art Bible authoring. Creates the visual identity specification that gates all asset production. Run after /concept-brainstorm is approved and before /map-systems or any GDD authoring begins.
art-generateGenerates placeholder .aseprite files from asset specs using the Aseprite MCP. Reads asset specs and art bible, creates sprites with correct dimensions/palette/layers, exports PNGs. Run after /asset-spec has produced specs and /art-bible exists.
asset-auditAudits game assets for compliance with naming conventions, file size budgets, format standards, and pipeline requirements. Identifies orphaned assets, missing references, and standard violations.
asset-specGenerate per-asset visual specifications and AI generation prompts from GDDs, level docs, or character profiles. Produces structured spec files and updates the master asset manifest. Run after art bible and GDD/level design are approved, before production begins.
automated-smoke-testRun an automated smoke test using the godot-mcp server. Launches the project, captures debug output, and checks for errors or crashes.
balance-checkAnalyzes game balance data files, formulas, and configuration to identify outliers, broken progressions, degenerate strategies, and economy imbalances. Use after modifying any balance-related data or design. Use when user says 'balance report', 'check game balance', 'run a balance check'.
concept-brainstormGuided game concept ideation — from zero idea to a structured game concept document. Uses professional studio ideation techniques, player psychology frameworks, and structured creative exploration.
content-auditAudit GDD-specified content counts against implemented content. Identifies what's planned vs built.
create-architectureGuided, section-by-section authoring of the master architecture document for the game. Reads all GDDs, the systems index, existing ADRs, and the engine reference library to produce a complete architecture blueprint before any code is written. Engine-version-aware: flags knowledge gaps and validates decisions against the pinned engine version.
create-control-manifestAfter architecture is complete, produces a flat actionable rules sheet for programmers — what you must do, what you must never do, per system and per layer. Extracted from all Accepted ADRs, technical preferences, and engine reference docs. More immediately actionable than ADRs (which explain why).