一键导入
setup-engine
Configure the project's game engine and version. Pins the engine in OPENCODE.md, creates reference docs, and sets up technical preferences for Godot.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure the project's game engine and version. Pins the engine in OPENCODE.md, creates reference docs, and sets up technical preferences for Godot.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | setup-engine |
| description | Configure the project's game engine and version. Pins the engine in OPENCODE.md, creates reference docs, and sets up technical preferences for Godot. |
| license | MIT |
| phase_automation | {"auto_proceed_default":false,"user_override_command":"/manual","phases":[{"phase":"Phase 1: Parse Arguments & Detect State","auto_conditions":[{"condition_type":"config_has_key","config_file":".opencode/docs/technical-preferences.md","key":"Engine & Language","action_if_met":"skip","notification":"✅ 引擎配置已存在,跳过版本选择"}]},{"phase":"Phase 2.5: Language Preference Selection","auto_conditions":[{"condition_type":"language_preference_set","action_if_met":"skip","notification":"✅ 语言偏好已配置,跳过此阶段"}]},{"phase":"Phase 6: Create Engine Reference","auto_conditions":[{"condition_type":"previous_phase_success","previous_phase":"Phase 5: Update OPENCODE.md","action_if_met":"proceed","notification":"🔧 自动创建引擎引用文档..."}]},{"phase":"Phase 7: Create Project Structure","auto_conditions":[{"condition_type":"previous_phase_success","previous_phase":"Phase 6","action_if_met":"proceed","notification":"📁 自动创建项目目录结构..."}]},{"phase":"Phase 8: Output Summary","auto_conditions":[{"condition_type":"previous_phase_success","previous_phase":"Phase 7","action_if_met":"proceed","notification":"✅ 引擎配置完成!"}]}]} |
Configure Godot engine settings, project structure, and technical preferences.
CHECK:
/setup-engine godot 4.6.1).opencode/docs/technical-preferences.mddesign/gdd/game-concept.mdIF version specified: Jump to Phase 2.5 IF no version: Proceed to Phase 2
STOP: Show detected state, ask "你想配置哪个 Godot 版本?" if not specified.
TRY WebSearch for latest Godot 4 stable version. IF WebSearch FAILS: Use default "4.6.1" (safe fallback)
ASK: "最新稳定版是 Godot [version]。使用这个版本?(Y/n)"
STOP: Wait for user confirmation.
ASK:
选择项目的语言偏好:
A) GDScript 为主 — 主要用 GDScript,快速迭代
B) C# 为主 — 主要用 C#,利用 .NET 生态
C) 双语言 — GDScript + C# 混合开发
推荐:
- 独立开发者/新手 → GDScript 为主
- 有 C# 经验/需要 .NET 库 → C# 为主
- 团队协作/大型项目 → 双语言
STORE user's choice for later phases.
STOP: Wait for user's choice.
Based on language preference, set up different configurations:
Tech Stack:
- Primary: GDScript
- Secondary: (not specified)
- Performance: GDExtension when needed
Project Structure:
src/
├── core/
├── systems/
├── gameplay/
│ └── *.gd
├── ui/
└── utils/
Key Skills: godot-gdscript, godot-specialist
Tech Stack:
- Primary: C#
- Secondary: (not specified)
- Performance: GDExtension when needed
Project Structure:
src/
├── Core/
├── Systems/
├── Gameplay/
│ └── *.cs
├── UI/
└── Utils/
Key Skills: godot-csharp, godot-specialist
Tech Stack:
- Languages: GDScript + C#
- Default: GDScript (game logic), C# (data/systems)
- Performance: GDExtension when needed
Project Structure:
src/
├── core/
├── systems/
│ ├── *.gd # GDScript systems
│ └── *.cs # C# systems
├── gameplay/
│ ├── *.gd # GDScript gameplay
│ └── *.cs # C# gameplay (optional)
├── ui/
└── utils/
Key Skills: godot-gdscript, godot-csharp, godot-specialist
Present EXACTLY what will be created/modified:
将要创建/修改的文件:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. OPENCODE.md
- Engine: Godot [version]
- Languages: [根据选择]
2. .opencode/docs/technical-preferences.md
- 语言偏好: [根据选择]
- 命名规范: [根据选择]
3. .opencode/docs/engine-reference/godot/VERSION.md
- 版本引用文档
4. 项目目录结构:
[根据语言偏好生成]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ASK: "确认创建这些文件?(Y/n)"
STOP: Wait for user approval.
Generate based on language preference:
## Technology Stack
- **Engine**: Godot [version]
- **Language**: GDScript (primary)
- **Performance**: GDExtension (C++/Rust) when needed
## Technology Stack
- **Engine**: Godot [version]
- **Language**: C# (primary)
- **Performance**: GDExtension (C++/Rust) when needed
## Technology Stack
- **Engine**: Godot [version]
- **Languages**: GDScript + C# (dual support)
- **Default**: GDScript (game logic), C# (data/systems)
- **Performance**: GDExtension (C++/Rust) when needed
ASK: "更新 OPENCODE.md?"
STOP: Wait for approval, then write.
Generate based on language preference:
# Technical Preferences
## Engine & Language
- **Engine**: Godot [version]
- **Primary Language**: GDScript
- **Performance**: GDExtension when needed
## Naming Conventions (GDScript)
| Element | Convention | Example |
|---------|------------|---------|
| Classes | PascalCase | PlayerController |
| Functions | snake_case | calculate_damage() |
| Variables | snake_case | current_health |
| Signals | snake_case | health_changed |
| Files | snake_case | player_controller.gd |
## Recommended Skills
- `/godot-gdscript` — GDScript patterns
- `/godot-specialist` — Engine guidance
# Technical Preferences
## Engine & Language
- **Engine**: Godot [version]
- **Primary Language**: C#
- **Performance**: GDExtension when needed
- **Target Framework**: .NET 8.0
## Naming Conventions (C#)
| Element | Convention | Example |
|---------|------------|---------|
| Classes | PascalCase | PlayerController |
| Methods | PascalCase | TakeDamage() |
| Properties | PascalCase | CurrentHealth |
| Fields | _camelCase | _currentHealth |
| Files | PascalCase | PlayerController.cs |
## Recommended Skills
- `/godot-csharp` — C# patterns
- `/godot-specialist` — Engine guidance
# Technical Preferences
## Engine & Language
- **Engine**: Godot [version]
- **Languages**: GDScript + C#
- **Default Usage**:
- GDScript: Game logic, UI, rapid prototyping
- C#: Data processing, .NET libraries, systems
## Naming Conventions
### GDScript
| Element | Convention | Example |
|---------|------------|---------|
| Functions | snake_case | calculate_damage() |
| Variables | snake_case | current_health |
| Files | snake_case | player_controller.gd |
### C#
| Element | Convention | Example |
|---------|------------|---------|
| Methods | PascalCase | TakeDamage() |
| Properties | PascalCase | CurrentHealth |
| Files | PascalCase | PlayerController.cs |
## Language Selection Guide
| Task | Recommended |
|------|-------------|
| Game logic | GDScript |
| UI | GDScript or C# |
| .NET libraries | C# |
| Heavy computation | C# or GDExtension |
| Rapid prototyping | GDScript |
## Recommended Skills
- `/godot-gdscript` — GDScript patterns
- `/godot-csharp` — C# patterns
- `/godot-specialist` — Engine guidance
SHOW: Full content preview.
ASK: "创建 technical-preferences.md?"
STOP: Wait for approval, then write.
CREATE .opencode/docs/engine-reference/godot/VERSION.md:
# Godot Version Reference
| Field | Value |
|-------|-------|
| **Engine** | Godot |
| **Version** | [version] |
| **Language Preference** | [GDScript/C#/双语言] |
| **Configured** | [date] |
## Key Features
- GDScript 2.0
- Improved C# support
- Vulkan rendering
- Native 2D engine
## Notes
[Language-specific notes based on preference]
WRITE without asking (informational only).
CREATE directories based on language preference:
src/
├── core/
├── systems/
├── gameplay/
├── ui/
└── utils/
assets/
├── sprites/
├── audio/
├── fonts/
└── resources/
design/
├── gdd/
└── levels/
tests/
prototypes/
production/
src/
├── Core/
├── Systems/
├── Gameplay/
├── UI/
└── Utils/
[Same assets, design, tests, prototypes, production]
src/
├── core/
├── systems/
├── gameplay/
├── ui/
└── utils/
[Same structure, both .gd and .cs files allowed]
SHOW: "创建目录结构..."
PRINT:
✅ 引擎配置完成
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Engine: Godot [version]
Language: [GDScript/C#/双语言]
OPENCODE.md: ✅ 已更新
Tech Prefs: ✅ 已创建
Project Structure: ✅ 已创建
下一步建议:
1. 查看 .opencode/docs/technical-preferences.md
2. 运行 /brainstorm 如果还没有游戏概念
3. 运行 /sprint-plan 来组织工作
语言相关 Skills:
- /godot-gdscript — GDScript 模式
- /godot-csharp — C# 模式
- /godot-specialist — 引擎指导
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STOP: Setup complete.
| Error | Fallback |
|---|---|
| WebSearch fails | Use "4.6.1" as default |
| Cannot read OPENCODE.md | Create new one from template |
| Directory creation fails | Ask user to create manually |
| User cancels | Abort gracefully, no files written |
| Phase | Action | Approval? |
|---|---|---|
| 1 | Detect state | No |
| 2 | Select version | Yes |
| 2.5 | Select language | Yes |
| 3 | Preview changes | Yes |
| 4 | Preview OPENCODE.md | Yes |
| 5 | Preview tech prefs | Yes |
| 6 | Create engine ref | No |
| 7 | Create directories | No |
| 8 | Summary | No |
| Setting | GDScript 为主 | C# 为主 | 双语言 |
|---|---|---|---|
| Primary language | GDScript | C# | Both |
| File naming | snake_case.gd | PascalCase.cs | Both |
| Key skills | godot-gdscript | godot-csharp | Both |
| Default for new code | GDScript | C# | Ask each time |