Agent Skills
› Besty0728/Unity-Skills
› unity-script-roles
unity-script-roles
GitHub为Unity脚本职责划分提供建议,帮助将脚本列表转化为明确角色,避免过度使用MonoBehaviour,推荐ScriptableObject或纯C#等合适类型。
Trigger Scenarios
确定类的职责
在类型间拆分职责
在 MonoBehaviour 与纯 C# 间抉择
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. 为 Unity 脚本职责划分提供建议。"
}
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
-
25d511e
Current 2026-08-13 09:15
压缩 SKILL.md description 至约5191字符,并将路由说明移至 Triggers 章节
- ec9f870 2026-07-05 14:41


