home / skills / hhhh124hhhh / godot-mcp / godot-project-creator

This skill automates Godot project creation and scene management from natural language, generating complete architecture, configurations, and templates for

npx playbooks add skill hhhh124hhhh/godot-mcp --skill godot-project-creator

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
7.3 KB
---
name: godot-project-creator
description: 智能化 Godot 项目创建与场景管理技能,支持自然语言描述自动生成完整项目架构
---

# Godot 项目创建专家技能

## 技能概述

`godot-project-creator` 是一个智能化的 Godot 项目创建和场景管理技能,能够根据用户的自然语言描述自动生成完整的 Godot 项目架构、配置文件和基础场景结构。

## 核心功能

### 🏗️ 项目架构设计
- **智能项目类型识别**:自动识别游戏类型(平台跳跃、RPG、射击、益智等)
- **最佳实践架构**:根据项目类型生成符合 Godot 4.x 最佳实践的目录结构
- **模块化设计**:创建高度模块化、可扩展的项目结构

### 📁 完整项目结构生成
- **标准化目录**:自动创建 assets、scripts、scenes、data 等标准目录
- **资源组织**:按功能分类组织资源文件(characters、ui、sounds、music等)
- **脚本架构**:创建清晰的脚本继承关系和模块分离

### ⚙️ 配置文件智能配置
- **project.godot 优化**:根据项目需求配置 Godot 项目设置
- **输入映射**:预设常用输入控制方案
- **渲染设置**:配置合适的渲染管线和显示设置

### 🎬 场景模板系统
- **主场景创建**:生成功能完整的主游戏场景
- **UI场景**:创建用户界面场景(菜单、HUD、设置等)
- **游戏逻辑场景**:创建游戏管理器和控制器场景

## 使用方法

### 基础项目创建

```
用户: "我想创建一个2D平台跳跃游戏"
系统: 自动分析需求并创建:
- Player 角色(带物理控制)
- 平台场景系统
- 相机跟随系统
- 基础UI界面
- 游戏管理器
```

### 复杂项目架构

```
用户: "创建一个RPG游戏,包含角色系统、物品系统和战斗系统"
系统: 智能生成:
- 模块化角色系统架构
- 物品数据库结构
- 回合制战斗系统
- 保存/加载系统
- 多场景管理
```

### 项目重构优化

```
用户: "帮我重新组织这个混乱的项目结构"
系统: 分析现有代码并:
- 重新规划目录结构
- 分离功能模块
- 优化脚本继承关系
- 标准化命名规范
```

## 工作流程

### 1. 需求分析阶段
```bash
# 分析用户自然语言描述
- 识别游戏类型和核心机制
- 提取技术需求(2D/3D、网络、物理等)
- 评估复杂度和扩展性需求
```

### 2. 架构设计阶段
```bash
# 设计项目架构
- 选择合适的设计模式
- 规划模块依赖关系
- 设计数据流和通信机制
```

### 3. 自动生成阶段
```bash
# 生成项目文件
- 创建目录结构
- 生成配置文件
- 创建基础脚本模板
- 设置场景文件
```

### 4. 验证优化阶段
```bash
# 验证生成结果
- 检查文件完整性
- 验证配置正确性
- 运行基础测试
- 提供使用指导
```

## MCP 工具集成

该技能会自动调用以下 MCP 工具:

### 核心工具
- `create_node` - 创建游戏节点
- `create_scene` - 创建场景文件
- `create_script` - 创建脚本文件
- `get_project_info` - 获取项目信息

### 配置工具
- `detect_godot_version` - 检测 Godot 版本
- `check_godot_api_compatibility` - 检查 API 兼容性
- `fix_godot_api_compatibility` - 修复兼容性问题

### 编辑器工具
- `play_scene` - 测试运行场景
- `reload_scene` - 重新加载场景
- `save_scene` - 保存场景

## 项目模板库

### 2D 游戏模板
- **平台跳跃**:角色控制、物理平台、相机跟随
- **射击游戏**:玩家控制、敌人AI、弹幕系统
- **格斗游戏**:角色状态机、战斗系统、连击系统
- **益智游戏**:关卡系统、交互逻辑、计分系统

### 3D 游戏模板
- **第一人称射击**:FPS控制器、武器系统、敌人AI
- **第三人称冒险**:角色控制、摄像机系统、交互系统
- **竞速游戏**:车辆物理、赛道系统、AI对手

### 系统模板
- **RPG系统**:角色属性、物品系统、技能系统
- **策略游戏**:回合系统、AI决策、资源管理
- **多人游戏**:网络同步、房间管理、匹配系统

## 智能特性

### 自然语言理解
- **意图识别**:准确理解用户的项目需求
- **实体提取**:提取游戏类型、机制、平台等关键信息
- **上下文理解**:结合之前的对话历史理解需求

### 最佳实践应用
- **设计模式**:自动应用合适的设计模式(单例、状态机、观察者等)
- **代码规范**:遵循 GDScript 编码规范和 Godot 最佳实践
- **性能优化**:考虑性能因素设计架构

### 扩展性设计
- **模块化架构**:创建易于扩展和修改的模块化结构
- **配置驱动**:使用配置文件管理游戏参数
- **插件系统**:预留插件和模组扩展接口

## 质量保证

### 代码质量
- **语法检查**:确保生成的代码语法正确
- **类型安全**:使用强类型和类型提示
- **文档完整**:为生成的代码添加详细注释

### 架构质量
- **依赖管理**:清晰的模块依赖关系
- **接口设计**:定义清晰的模块接口
- **错误处理**:完善的错误处理机制

### 可维护性
- **命名规范**:统一的命名约定
- **代码组织**:逻辑清晰的代码结构
- **版本控制**:友好的 Git 提交结构

## 示例输出

### 创建2D平台跳跃游戏
```bash
用户输入: "我想做一个超级马里奥那样的2D平台跳跃游戏"

自动生成:
1. 项目结构
   ├── assets/
   │   ├── characters/player/
   │   ├── environments/tiles/
   │   └── ui/
   ├── scripts/
   │   ├── player/
   │   ├── gameplay/
   │   └── ui/
   ├── scenes/
   │   ├── levels/
   │   ├── ui/
   │   └── main_game.tscn
   └── data/
       ├── level_data.json
       └── character_stats.json

2. 核心脚本
   - Player.gd (角色控制)
   - GameManager.gd (游戏管理)
   - CameraController.gd (相机控制)
   - LevelManager.gd (关卡管理)

3. 场景文件
   - 主游戏场景(包含玩家、相机、UI)
   - 角色场景(包含物理组件和动画)
   - UI场景(包含HUD和菜单)

4. 配置文件
   - project.godot (优化配置)
   - 输入映射 (跳跃、移动、动作)
   - 物理设置 (重力、摩擦力等)
```

## 使用限制和注意事项

### 当前版本限制
- **复杂度限制**:超大型项目可能需要分步骤创建
- **特殊需求**:某些特殊功能需要手动实现
- **性能要求**:高性能需求项目需要额外优化

### 最佳使用方式
- **明确需求**:提供清晰的项目描述
- **迭代开发**:先创建基础架构,再逐步添加功能
- **及时反馈**:对生成结果提供反馈以便优化

## 故障排除

### 常见问题
1. **文件创建失败**:检查权限和磁盘空间
2. **配置错误**:验证 Godot 版本兼容性
3. **语法错误**:运行兼容性检查工具

### 调试方法
- 查看详细的生成日志
- 使用内置的验证工具
- 检查 MCP 工具连接状态

## 更新日志

### v1.0.0 (当前版本)
- 基础项目创建功能
- 2D/3D 游戏模板支持
- 自然语言理解
- MCP 工具集成

### 计划功能
- 更多游戏模板
- 高级架构模式
- AI 辅助设计建议
- 团队协作功能

---

**技能状态**: ✅ 可用
**最后更新**: 2025-11-09
**兼容性**: Godot 4.5+
**依赖**: Godot MCP 工具集

Overview

This skill automates Godot project creation and scene management from natural language descriptions. It generates a complete Godot 4.x project skeleton, configures project settings, and scaffolds scenes and scripts following best practices. Use it to speed up prototyping, standardize project layouts, and enforce modular architecture.

How this skill works

You describe the game or system in plain language and the skill analyzes intent, extracts entities (2D/3D, mechanics, features), and maps them to templates. It designs a directory structure, creates project.godot and input mappings, and generates scene and script templates (player, UI, managers). Built-in validators check Godot version and API compatibility and run basic syntax and configuration checks.

When to use it

  • Starting a new Godot 2D or 3D project and you want a production-ready skeleton
  • Converting a high-level game design into an initial code and scene layout
  • Refactoring a messy project to a modular, maintainable structure
  • Prototyping multiple game types quickly (platformer, RPG, shooter, puzzle)
  • Preparing a baseline project with correct Godot settings and input mappings

Best practices

  • Provide a clear, concise description of core mechanics and target platform
  • Start with a minimal prototype template then iterate feature-by-feature
  • Keep modules focused (player, UI, systems) and avoid cross-responsibility
  • Review generated scripts and add project-specific logic rather than relying solely on templates
  • Use version control and commit generated scaffolding before heavy edits

Example use cases

  • Generate a 2D platformer skeleton with player physics, camera follow, and level manager
  • Create an RPG baseline with character, inventory, and combat system templates
  • Reorganize an existing project: standardize directories, separate UI and gameplay scripts
  • Produce a multiplayer-ready project outline with networking stubs and sync patterns
  • Scaffold multiple level scenes and a UI menu system for rapid playtesting

FAQ

Which Godot versions are supported?

Templates and checks target Godot 4.x; compatibility detection notifies when adjustments are needed.

Can it modify an existing project safely?

Yes — it analyzes the project and proposes a refactor plan; always back up or commit before applying changes.

Does it generate complete gameplay logic?

It scaffolds robust templates and core systems, but project-specific mechanics and polish usually require manual implementation.