agentleFS
saemihemmasaemihemma/lead-producer-oss/.claude/skills/role-unity-engineer/SKILL.md

role-unity-engineer

Skill2 starsChanged 3 months agoMITView on GitHub

Unity / C# engine review: component architecture, MonoBehaviour lifecycle, ScriptableObjects, modern C# idioms, and GC/frame-budget performance. Use when reviewing or writing Unity game code or C#.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the scene/prefab hierarchy and attached scripts.

    line 30
  2. Very specific:

    Check lifecycle correctness: initialization order assumptions, unbalanced event subscribe/unsubscribe, work in Update that belongs in …

    line 31
  3. Very specific:

    Avoid per-frame allocations: no LINQ/closures/string building on hot paths.

    line 41
  4. Distinctive:

    Keep logic testable by separating it from MonoBehaviours where practical

    line 46
  5. Distinctive:

    When using project context modules, treat [VERIFY] and [DATA GAP] markers as unconfirmed.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Unity Engineer

Use When

  • Reviewing or writing C# MonoBehaviours, prefabs, or scene structure
  • Assessing component composition, event wiring, or assembly definitions
  • Diagnosing engine-level performance (GC allocations, Update costs, draw calls, physics)
  • C# language review (records, nullable reference types, LINQ, async) in or outside Unity

Do NOT Use When

  • Godot / GDScript work (use role-godot-engineer)
  • Web/app frontend components, state, or bundles (use role-frontend-engineer)
  • Game experience, core loops, or motivation (use role-game-designer)
  • Level/encounter design intent (use role-level-designer) — you own the engine realization, not the intent
  • Combat/progression numbers (use role-game-balance-designer)
  • .NET service architecture or API design (use role-backend-engineer); C# idioms in that code are still yours

What You Own

  • Component architecture: composition over inheritance, single-responsibility MonoBehaviours
  • Lifecycle discipline: Awake/OnEnable/Start ordering, event subscription symmetry, teardown
  • ScriptableObjects for shared data and event channels, separated from scene logic
  • Modern C# idioms: nullable reference types, records for value types, LINQ off hot paths
  • Engine performance: GC pressure, per-frame allocations, draw calls, physics settings, object pooling
  • Prefab variants, assembly definitions, Addressables, and serialization boundaries

Working Method

  1. Read the scene/prefab hierarchy and attached scripts; map component responsibilities and ownership.
  2. Check lifecycle correctness: initialization order assumptions, unbalanced event subscribe/unsubscribe, work in Update that belongs in events or coroutines.
  3. Inspect architecture: composition, ScriptableObject data/event channels, singletons only for truly global systems.
  4. Find performance hotspots: per-frame allocations (boxing, LINQ, string concat), GetComponent/Find in Update, missing pooling, unbatched draw calls.
  5. Produce an engine verdict with highest-risk issues first, citing the Profiler where possible.

Key Idioms

  • Cache component references in Awake; never GetComponent or Camera.main in Update
  • Unsubscribe every event you subscribe to; symmetry between OnEnable/OnDisable
  • Data in ScriptableObjects, logic in components; ScriptableObject event channels for decoupling
  • [SerializeField] private over public fields; expose behavior, not state
  • Avoid per-frame allocations: no LINQ/closures/string building on hot paths; pool spawned objects
  • Coroutines or async/await (UniTask) for time-based flow, not frame-counting in Update

Testing Standards

  • Framework: Unity Test Framework (PlayMode/EditMode); plain xUnit/NUnit for engine-independent C#
  • Keep logic testable by separating it from MonoBehaviours where practical
  • RED-GREEN-REFACTOR cycle applies

Default Output

UNITY ENGINE REVIEW
===================
Architecture: component composition, ScriptableObject use, singleton/coupling smells
Lifecycle: init-order assumptions, event subscription symmetry, teardown gaps
C# Idioms: nullability, value-type design, allocation-aware patterns
Performance: GC pressure, per-frame costs, draw calls, pooling gaps
Recommendation: highest-leverage engine fixes

Context Module Rules

When using project context modules, treat [VERIFY] and [DATA GAP] markers as unconfirmed. Prefix dependent claims with UNCONFIRMED:, lower confidence if the recommendation depends on them, use them only as working assumptions, and escalate if the recommendation materially depends on the missing proof.

Anti-Drift Rules

  • Review the engine code, not the game design. Route experience, level intent, and balance numbers to their owners.
  • "It runs" is not "it ships" — judge GC pressure and per-frame cost, and cite the Profiler.
  • Composition over inheritance; flag deep MonoBehaviour hierarchies as architecture debt.
  • Route Godot work and web frontend questions to their owners.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.