unity-script-roles

Assigns explicit architectural roles to Unity scripts before gameplay code generation.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-script-roles-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script-roles
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/script-roles
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-script-roles-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When generating a batch of Unity gameplay scripts, AI tends to make every class a MonoBehaviour, producing tangled responsibilities and hard-to-maintain code. This Skill turns a rough script list into explicit role assignments so each class has a clear purpose. ## Core Features & Use Cases - Role Assignment: Recommends a role for each script such as MonoBehaviour bridge, ScriptableObject config/data, pure C# domain/service, presenter/controller, state machine node, or installer/bootstrap helper. - Structured Output: For each script it reports the recommended role, main responsibility, main dependencies, and why that role fits better than alternatives. - Guardrails: Prevents making every class a MonoBehaviour and prevents forcing ScriptableObject onto runtime state that belongs in memory-only objects. - Use Case: Before creating a new gameplay feature, list the planned scripts and get a responsibility split across MonoBehaviours, ScriptableObjects, and plain C# services. ## Quick Start Ask the assistant to assign Unity script roles for your planned gameplay scripts, listing each class name and its intended behavior.

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 between MonoBehaviour and plain C# in Unity?

Use MonoBehaviour only as a bridge to the Unity engine lifecycle and scene objects. Domain logic, services, and state machines should live in plain C# classes so they stay testable and independent of the engine.

When should I use ScriptableObject in Unity?

Use ScriptableObject for configuration and shared data assets that persist in the project. Do not use it for transient runtime state, which should stay in memory-only plain C# objects.

How do I split responsibilities across Unity script types?

List your planned scripts, then assign each one a role such as MonoBehaviour bridge, ScriptableObject config, pure C# service, presenter/controller, state node, or installer. Document each script's main responsibility and dependencies.

Why is making every Unity class a MonoBehaviour a problem?

Making every class a MonoBehaviour couples all logic to the engine lifecycle, blocks unit testing, and hides dependencies. Separating domain logic into plain C# classes keeps responsibilities explicit and code reusable.

Does this skill modify or generate Unity project files?

No. It is documentation-only guidance with no scripts or REST calls. It produces a role assignment plan you review before writing or generating the actual scripts.