Skip to content

Unity Script Writer

Caution

Write Unity C# scripts following SOLID principles. Handles MonoBehaviour lifecycle, ScriptableObjects, physics, UI Toolkit, and addressable asset loading.

By Anthropic 3,200 v1.0.0 Updated 2026-03-05

Install

Claude Code

Copy the SKILL.md file to .claude/skills/unity-script.md

About This Skill

Unity Script Writer gives your AI agent deep familiarity with Unity's C# scripting ecosystem, producing clean, performant game code that follows Unity best practices and avoids common pitfalls that cause performance issues at runtime.

MonoBehaviour Mastery

The skill understands the full Unity lifecycle: Awake, OnEnable, Start, Update, FixedUpdate, LateUpdate, and OnDestroy. It uses each callback correctly — physics in FixedUpdate, camera-following in LateUpdate, and initialization order management with Awake vs Start.

Data Architecture

Favors ScriptableObjects for game configuration, avoiding hardcoded values and reducing scene coupling. Implements the event channel pattern with ScriptableObject-based events for loose coupling between systems.

Performance Patterns

Caches component references in Awake (no GetComponent in Update), uses object pooling for frequently instantiated objects, avoids string-based SendMessage, and writes allocation-free hot path code with struct value types.

Modern Unity APIs

Supports both the classic Input system and the new Input System package, UI Toolkit for editor and runtime UI, Addressables for asset streaming, and the Entities/DOTS architecture for performance-critical systems.

Use Cases

  • Implementing game mechanics with proper MonoBehaviour patterns
  • Creating ScriptableObject-based data architecture for game configs
  • Building event-driven systems with C# events and UnityEvents
  • Writing Unity Editor tools and custom inspector scripts

Pros & Cons

Pros

  • + Avoids common Unity performance pitfalls automatically
  • + Generates clean ScriptableObject data architecture
  • + Understands both legacy and modern Unity API paradigms
  • + Writes editor tooling scripts alongside runtime code

Cons

  • - Cannot open the Unity Editor or run Play Mode tests directly
  • - DOTS/ECS patterns require project setup that must be done manually

Related AI Tools

Related Skills

Stay Updated on Agent Skills

Get weekly curated skills + safety alerts

每周精选 Skills + 安全预警