unity — Claude Code skill for Unity and C# game dev
A skill that makes your coding agent follow Unity conventions: component architecture, ScriptableObjects, object pooling and profiler work.
npx skills add Mindrally/skills --skill unity -a claude-codeWhat unity does
This skill turns the assistant into a Unity developer who cares about frame time. It enforces C# standards: MonoBehaviour for GameObject components, ScriptableObjects for data, TryGetComponent instead of null checks, direct references instead of GameObject.Find(). Text rendering goes through TextMeshPro only.
The rules cover naming (m_VariableName for variables, c_ConstantName for constants, s_StaticName for statics), game systems and optimization. The agent is told to cache component references, cut draw calls with batching, build LOD systems and hunt bottlenecks in the profiler. There is a separate section on error handling: try-catch blocks, logging via Debug, graceful null handling.
Worth installing when your project is already on Unity and you keep deleting Find() calls from agent-written code. Nothing extra to set up, and the rules do not lock you to a specific engine version.
What it helps with
- split game logic into components instead of one giant class
- move configs and balance values into ScriptableObjects
- stop frame drops from frequent Instantiate calls
- find bottlenecks with the profiler
- unify naming for variables and constants
Example prompts for the agent
- Rewrite this enemy spawner to use object pooling so there are no runtime allocations
- Break the player logic into components and move the tuning values into a ScriptableObject
- Scan this script for unnecessary GameObject.Find() calls and replace them with direct references
How to install unity
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill unity -a claude-code2Manually: put the files in place
~/.claude/skills/unity/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/unity/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill unity -a codex2Manually: put the files in place
.agents/skills/unity/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill unity -a cursor2Manually: put the files in place
.cursor/skills/unity/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills unity2Manually: put the files in place
.github/skills/unity/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill unity -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path unityManually: put the files in place
.devin/skills/unity/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill unity -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about unity
How do I install the unity skill in Claude?
Run npx skills add Mindrally/skills --skill unity -a claude-code. The skill file lands at ~/.claude/skills/unity/SKILL.md.
What does the unity skill do?
It gives the agent Unity and C# rules: component-based architecture, ScriptableObjects, object pooling, batching, LOD and profiler use. Naming conventions and error handling are covered too.
Is the skill tied to a specific Unity version?
No, the rules do not target a particular engine version. They stick to general C# and Unity API practices.
Source text
SKILL.md · Apache-2.0
--- name: unity description: Expert in Unity and C# game development with performance optimization patterns metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Unity You are an expert in Unity game development and C# with deep knowledge of game architecture and performance optimization. ## Core Principles - Write clear, technical responses with precise C# and Unity examples - Leverage built-in features and prioritize maintainability following C# conventions - Structure projects modularly using component-based architecture - Prioritize performance, scalability, and maintainability in architecture ## C# Standards - Employ MonoBehaviour for GameObject components - Use ScriptableObjects for data containers and data-driven design - Use TryGetComponent to avoid null references - Prefer direct references over GameObject.Find() - Always use TextMeshPro for text rendering ## Naming Conventions - PascalCase for public members - camelCase for private members - Variables: `m_VariableName` - Constants: `c_ConstantName` - Statics: `s_StaticName` ## Game Systems - Utilize physics engine for physical interactions - Use Input System for player controls - Implement UI system for user interfaces - Apply state machines for complex behaviors ## Performance Optimization - Implement object pooling for frequently instantiated objects - Optimize draw calls through batching - Implement LOD (Level of Detail) systems - Use profiler to identify bottlenecks - Cache component references - Minimize garbage collection ## Error Handling - Implement error handling via try-catch blocks - Use Debug class for logging - Handle null references gracefully - Implement proper exception handling ## Best Practices - Use component-based design - Implement proper separation of concerns - Write modular, reusable code - Document public APIs and complex logic - Follow Unity's recommended project structure
© Mindrally · Apache-2.0 · Mindrally/skills