Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill unity -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/unity/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/unity/

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

Similar skills

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set168

django-python A skill that steers your agent through Django work: MVT structure, ORM over raw SQL, class-based views and view-level error handling. CX Codex +1 933installs security-best-practices A skill providing security principles for backend and microservice development. It helps agents enforce strict input validation, protect APIs, and prevent sensitive data leaks. CX Codex +1 930installs flutter Enforces Flutter and Dart standards: feature-first clean architecture, state management with Riverpod or BLoC, and strict limits on widget tree depth. CX Codex +1 925installs laravel-development A skill that keeps your agent inside Laravel conventions: SOLID, PSR-12, Eloquent over raw SQL. Useful whenever the AI writes PHP in a Laravel app. CX Codex +1 909installs design-systems Walks your agent through design tokens, a component library and accessibility rules in one project. CX Codex +1 903installs wordpress The wordpress skill gives an agent a rulebook for WordPress and WooCommerce work in PHP. It keeps code inside WordPress standards and reminds the agent about hooks, nonces and prepared queries. CX Codex +1 894installs mongodb-development MongoDB development rules: schemas, indexes, aggregation pipelines, Mongoose and Payload CMS. Useful when the agent writes a TypeScript backend. CX Codex +1 891installs scikit-learn-best-practices A skill that hands your agent scikit-learn conventions: pipelines, cross-validation, metrics, model persistence. Useful when you write ML code in Python. CX Codex +1 888installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor