godot-project-foundations by thedivergentai/gd-agentic-skills
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-project-foundations基于功能的组织、一致的命名规范以及版本控制规范,定义了专业的 Godot 项目。
强制要求 - 对于新项目:在搭建项目结构之前,请阅读
project_bootstrapper.gd- 自动生成功能文件夹和 .gitignore。
专业的项目脚手架工具,用于自动生成功能文件夹和 .gitignore。
应用高性能配置(ticks, FPS)并保存 override.cfg 的专业模式。
使用 RefCounted 委托的高级单例模式,以避免 SceneTree 臃肿。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
使用 emit_changed() 的响应式资源基础,适用于数据驱动的流水线。
自定义操作系统级别的 Logger 实现,用于捕获引擎输出以进行崩溃报告。
带有 Mutex 同步的健壮 WorkerThreadPool 实现。
带有进度状态的线程化非阻塞场景加载。
基础的 _unhandled_input 缓冲区,用于将硬件事件与帧率解耦。
强类型的全局信号总线,用于系统解耦。
原生提取项目版本和 CI/CD 构建元数据。
用于高频场景实例化的线程安全对象池。
请勿加载 dependency_auditor.gd,除非在排查加载错误。
/scripts, /sprites 文件夹。维护性极差。请使用基于功能的组织:/player, /ui。%场景唯一名称 来获得稳定的引用。.godot/ 文件夹会导致 100MB+ 的臃肿和冲突。.psd, .blend)除非被忽略,否则将被导入。duplicate(true)。load() 阻塞主线程 — 对于异步场景切换,请严格使用 ResourceLoader.load_threaded_request()。call_deferred()。WorkerThreadPool 或对象池时,请严格确保线程安全。_process() 处理精确输入 — 它与视觉帧率绑定。请严格使用 _unhandled_input() 来捕获精确的、与帧无关的事件。snake_case。(例如:player_controller.gd, main_menu.tscn)。
PascalCase 以匹配类名。PascalCase(例如:PlayerSprite, CollisionShape2D)。%场景唯一名称 以避免脆弱的 get_node() 路径。不要按 类型(例如 /scripts, /sprites)分组,而是按 功能(“是什么”,而不是“怎么做”)分组。
正确的结构:
/project.godot
/common/ # 全局资源、主题、共享脚本
/entities/
/player/ # 与玩家相关的一切
player.tscn
player.gd
player_sprite.png
/enemy/
/ui/
/main_menu/
/levels/
/addons/ # 第三方插件
.gitignore(忽略 .godot/ 文件夹和导入产物)。.gdignore(例如,原始设计源文件)。当被要求“设置项目”或“开始新游戏”时:
project.godot 存在。entities/ui/levels/common/.gitignore。README.md 解释基于功能的结构。tutorials/best_practices/project_organization.rsttutorials/best_practices/scene_organization.rst每周安装数
76
代码仓库
GitHub 星标数
62
首次出现
2026年2月10日
安全审计
安装于
opencode74
gemini-cli72
codex72
kimi-cli71
amp71
github-copilot71
Feature-based organization, consistent naming, and version control hygiene define professional Godot projects.
MANDATORY - For New Projects : Before scaffolding, read
project_bootstrapper.gd- Auto-generates feature folders and .gitignore.
Expert project scaffolding tool for auto-generating feature folders and .gitignore.
Expert pattern for applying high-performance profiles (ticks, FPS) and saving override.cfg.
Advanced Singleton pattern with RefCounted delegation to avoid SceneTree bloat.
Reactive Resource foundation using emit_changed() for data-driven pipelines.
Custom OS-level Logger implementation to capture engine output for crash reporting.
Robust WorkerThreadPool implementation with Mutex synchronization.
Threaded non-blocking scene loading with progress status.
Foundational _unhandled_input buffer to decouple hardware events from frame-rate.
Strongly-typed global Signal Bus for system decoupling.
Native extraction of project version and CI/CD build metadata.
Thread-safe Object Pool for high-frequency scene instantiation.
Do NOT Load dependency_auditor.gd unless troubleshooting loading errors.
/scripts, /sprites folders. Nightmare maintainability. Use feature-based: /player, /ui.%SceneUniqueNames for stable references..godot/ folder = 100MB+ bloat + conflicts..psd, .blend) in root will be imported unless ignored.duplicate(true) for unique instances with independent state.load() — Strictly use ResourceLoader.load_threaded_request() for async scene transitions.call_deferred() for thread-to-main-thread synchronization.WorkerThreadPool or Object Pool._process() for precise input — Tied to visual framerate. Strictly use _unhandled_input() to capture exact, frame-independent events.snake_case. (e.g., player_controller.gd, main_menu.tscn).
PascalCase to match class names.PascalCase (e.g., PlayerSprite, CollisionShape2D).%SceneUniqueNames for frequently accessed nodes to avoid brittle get_node() paths.Instead of grouping by type (e.g., /scripts, /sprites), group by feature (the "What", not the "How").
Correct Structure:
/project.godot
/common/ # Global resources, themes, shared scripts
/entities/
/player/ # Everything related to player
player.tscn
player.gd
player_sprite.png
/enemy/
/ui/
/main_menu/
/levels/
/addons/ # Third-party plugins
.gitignore tailored for Godot (ignoring .godot/ folder and import artifacts)..gdignore in folders that Godot should not scan/import (e.g., raw design source files).When asked to "Setup a project" or "Start a new game":
project.godot exists.entities/ui/levels/common/.gitignore.README.md explaining the feature-based structure.tutorials/best_practices/project_organization.rsttutorials/best_practices/scene_organization.rstWeekly Installs
76
Repository
GitHub Stars
62
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode74
gemini-cli72
codex72
kimi-cli71
amp71
github-copilot71
Next.js 15+ 最佳实践指南:文件约定、RSC边界、异步模式与性能优化
1,100 周安装