unity-script-roles
GitHub辅助Unity开发者在游戏脚本开发前,将粗略的脚本列表转化为明确的职责角色。通过分析推荐MonoBehaviour、ScriptableObject或纯C#等合适类型,优化架构设计,避免过度使用MonoBehaviour。
触发场景
安装
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.
版本历史
- 5ee8388 当前 2026-08-17 04:12
-
25d511e
2026-08-13 09:15
压缩 SKILL.md description 至约5191字符,并将路由说明移至 Triggers 章节
- ec9f870 2026-07-05 14:41


