Unity Script Writer
CautionWrite Unity C# scripts following SOLID principles. Handles MonoBehaviour lifecycle, ScriptableObjects, physics, UI Toolkit, and addressable asset loading.
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
Claude Code
Paid
Anthropic's agentic CLI for autonomous terminal-native coding workflows
- Terminal-native autonomous coding agent
- Full file system and shell access for multi-step tasks
- Deep codebase understanding via repository indexing
Cursor
Freemium
AI-native code editor with deep multi-model integration and agentic coding
- AI-native Cmd+K inline editing and generation
- Composer Agent for autonomous multi-file changes
- Full codebase indexing and context awareness
GitHub Copilot
Freemium
AI pair programmer that suggests code in real time across your IDE
- Real-time code completions across 30+ languages
- Copilot Chat for natural language code Q&A
- Pull request description and summary generation
Related Skills
React Component Generator
CautionGenerate React components following best practices with proper typing, accessibility, testing, and Storybook stories.
Systematic Debugging
CautionSystematic debugging with root cause analysis, stack trace interpretation, and hypothesis-driven troubleshooting.
Stay Updated on Agent Skills
Get weekly curated skills + safety alerts
每周精选 Skills + 安全预警