unity-script-roles

Assign architectural roles to Unity C# scripts with rationale.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/Yuan-Zzzz/FrogRE --skill unity-script-roles-yuan-zzzz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script-roles
Source: https://github.com/Yuan-Zzzz/FrogRE/tree/main/.codex/skills/unity-skills/skills/script-roles
Command: npx skills add https://github.com/Yuan-Zzzz/FrogRE --skill unity-script-roles-yuan-zzzz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many Unity projects default to making every new class a MonoBehaviour, which leads to tight coupling, unnecessary GameObject attachments, and unclear responsibilities. This Skill helps teams and AI tooling decide the appropriate architectural role for each script so code is more maintainable and efficient.

Core Features & Use Cases

  • Role assignment: Recommend whether a script should be MonoBehaviour, ScriptableObject, pure C# service, presenter/controller, state node, or installer.
  • Per-script rationale: Provide main responsibility, core dependencies, and a short justification for the chosen role to guide implementation or code generation.
  • Use case: During feature scoping, turn a rough list of gameplay script names into a clean design plan that prevents overuse of MonoBehaviour and clarifies lifetime and data ownership.

Quick Start

Analyze the following list of Unity script names and return for each the recommended role, main responsibility, main dependencies, and why that role is a better fit than alternatives.

Frequently Asked Questions about unity-script-roles

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

FAQPage Schema
How do I decide which Unity scripts should be MonoBehaviour versus ScriptableObject?

To decide if a script should be a MonoBehaviour or ScriptableObject, evaluate its architectural role and data ownership. MonoBehaviour handles GameObject interactions, while ScriptableObject manages shared data, preventing tight coupling and clarifying lifetime ownership for better separation of concerns.

What is the best way to assign architectural roles to C# gameplay scripts in Unity?

The best way to assign architectural roles to Unity C# scripts is evaluating main responsibilities and dependencies. This categorizes scripts into MonoBehaviour, ScriptableObject, pure C# services, presenters, state machines, or installers, producing per-script recommendations for a clean design plan.

Why does defaulting every new class to MonoBehaviour cause issues in Unity architecture?

Defaulting every new class to MonoBehaviour causes Unity architecture issues by creating tight coupling, unnecessary GameObject attachments, and unclear responsibilities. Assigning specific roles like pure C# services or presenters improves separation of concerns and code maintainability.

Can I get a rationale for choosing a pure C# service over a MonoBehaviour for my Unity script?

Yes, you can get a rationale for choosing a pure C# service over a MonoBehaviour. The role assignment process provides per-script recommendations including main responsibility, core dependencies, and a short justification explaining why the chosen role fits better than alternatives.

When do I need to separate concerns using presenters or installers in Unity C#?

You need to separate concerns using presenters or installers in Unity C# when feature scoping requires a clean design plan. Assigning these architectural roles prevents MonoBehaviour overuse, clarifies data ownership, and provides structured guidance suitable for automated code generation.