unity-script-roles
GitHub辅助在Unity开发中为脚本类分配明确角色(如MonoBehaviour、ScriptableObject或纯C#),避免过度使用MonoBehaviour,优化架构职责拆分。
Trigger Scenarios
Install
npx skills add Besty0728/Unity-Skills --skill unity-script-roles -g -y
SKILL.md
Frontmatter
{
"name": "unity-script-roles",
"description": "Advise on assigning Unity script roles"
}
Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via
GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.
Triggers
- Deciding a class's role
- Splitting responsibilities across types
- Choosing between MonoBehaviour and plain C#
- 确定类的职责、在类型间拆分职责、在 MonoBehaviour 与纯 C# 间抉择
Unity Script Roles
Use this skill before creating a batch of gameplay scripts.
Goal
Turn a rough script list into explicit roles so AI does not generate everything as MonoBehaviour.
Output Format
- Script name
- Recommended role
- Main responsibility
- Main dependencies
- Why this role fits better than the alternatives
Common Roles
MonoBehaviourbridgeScriptableObjectconfig/data- pure C# domain/service
- presenter / controller
- state / state machine node
- installer / bootstrap helper
Guardrails
Mode: Documentation only — no REST skills to gate; load freely under any operating mode (Approval / Auto / Bypass).
- Do not make every class a
MonoBehaviour. - Do not force
ScriptableObjectonto runtime state that should stay in memory-only objects.
Version History
- 5ee8388 Current 2026-08-17 04:12
-
25d511e
2026-08-13 09:15
压缩 SKILL.md description 至约5191字符,并将路由说明移至 Triggers 章节
- ec9f870 2026-07-05 14:41


