unity-architecture

Define Unity module boundaries, scene composition, and refactoring guidance.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/lrbjk/FenShen_Remake_V0 --skill unity-architecture-lrbjk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-architecture
Source: https://github.com/lrbjk/FenShen_Remake_V0/tree/main/.codex/skills/unity-skills/skills/architecture
Command: npx skills add https://github.com/lrbjk/FenShen_Remake_V0 --skill unity-architecture-lrbjk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides actionable guidance to prevent messy, tightly-coupled Unity projects by defining clear module boundaries, scene composition, data ownership, and refactor direction before writing large amounts of gameplay code. It helps teams avoid over-engineering for prototypes and under-architecting for long-lived projects by recommending the smallest effective structure for the project's scope.

Core Features & Use Cases

  • Scope identification: Distinguish prototype, small-game, and long-lived project requirements and trade-offs.
  • Core loop and runtime systems: Define the minimal runtime systems needed to support gameplay without unnecessary layers.
  • Module recommendations: Suggest 3–7 modules with one-line responsibilities and how they interact.
  • Scene/bootstrap plan: Specify where composition and initialization happen and what stays in scenes.
  • Data ownership guidance: Recommend what belongs in scene objects, ScriptableObjects, or plain C# classes.
  • Communication and decoupling rules: Advise when to use direct references, interfaces, events, or command patterns.
  • Performance and risk focus: Call out hot paths and optimization concerns and what to monitor now.
  • Do now / skip now: Prioritize what to implement immediately vs what to defer to avoid over-engineering.

Quick Start

Analyze my Unity project and recommend an architecture for a small-game including recommended modules, a scene bootstrap plan, data ownership rules, communication patterns, and immediate priorities.

Frequently Asked Questions about unity-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure my Unity game architecture to avoid tightly-coupled code?

To structure your Unity game architecture, define clear module boundaries, scene composition, and data ownership before writing gameplay code. Recommend 3–7 modules with one-line responsibilities and establish communication patterns to prevent tightly-coupled projects.

What is the best way to manage data ownership between ScriptableObjects and plain C# classes in Unity?

Data ownership in Unity depends on project scope. ScriptableObjects are recommended for shared configuration data, while plain C# classes manage runtime state. Define what belongs in scene objects versus C# classes to ensure clear data ownership.

How do I plan a scene bootstrap layer for a long-lived Unity project?

Plan a scene bootstrap layer for a long-lived Unity project by specifying where composition and initialization happen. Define what stays in scenes versus the bootstrap layer, ensuring minimal runtime systems support gameplay without unnecessary layers.

Does this Unity architecture guidance work for small prototypes or only long-lived projects?

This Unity architecture guidance scales from prototypes to long-lived projects. It helps avoid over-engineering for prototypes by recommending the smallest effective structure, while providing under-architecture prevention for long-lived scopes.

When should I use direct references versus events for Unity module communication?

Use direct references for tightly-bound Unity modules, and events or command patterns for decoupled communication. Advise on communication and decoupling rules based on your specific module boundaries to determine when to use interfaces or events.

How do I prioritize what to implement immediately versus defer in Unity system design?

Prioritize Unity system design by focusing on performance risk and hot paths first. Use a do now / skip now approach to implement immediate core loop requirements and defer optimization concerns to avoid over-engineering.