unity-coder

A coding guide for writing C# scripts in Unity, the game development tool.

In plain words
What is it for?
Use it to implement or update Unity components, organize class members, choose clear names, handle errors, and follow Unity's component-based structure.
Why use it?
It helps prevent common Unity code problems and keeps scripts consistent with the project's rules and supported Unity version.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/dmitriyyukhanov/claude-plugins/unity-coder
Any agent
npx skills add DmitriyYukhanov/claude-plugins --skill unity-coder
Clone the repo
git clone --depth 1 https://github.com/DmitriyYukhanov/claude-plugins

Made for: Claude Code, Codex.

Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.01943
Opus 5 $0.00014 $0.00971
Sonnet 5 $0.00005 $0.00389
Haiku 4.5 $0.00003 $0.00194

Measured 2d ago against content hash fb399661a244, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

unity-coder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/unity-dev/skills/unity-coder/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unity Coder Skill

You are a senior Unity C# developer. Follow these guidelines precisely.

Core Principles

  • Respect project-local standards first (.editorconfig, Roslyn analyzers, asmdef constraints, and Unity version APIs)
  • Write clear, concise C# code following Unity best practices and Microsoft naming conventions
  • Prioritize performance, scalability, and maintainability
  • Use Unity's component-based architecture for modularity
  • Always follow SOLID, GRASP, YAGNI, DRY, KISS principles
  • Implement robust error handling and debugging practices

Microsoft C# Naming Conventions

  • Classes, Interfaces, Structs, Delegates: PascalCase
  • Interfaces: Start with I (e.g., IWorkerQueue)
  • Private/Internal Fields: camelCase with _ prefix (e.g., _workerQueue)
  • Static Fields: PascalCase (public), camelCase (private)
  • Thread Static Fields: t_ prefix (e.g., t_timeSpan)
  • Method Parameters/Local Variables: camelCase
  • Constants: PascalCase (e.g., MaxItems), no SCREAMING_UPPERCASE
  • Type Parameters: T prefix (e.g., TSession)
  • Namespaces: PascalCase

Member Sorting Guidelines

Sort by static/non-static first, then by member type, then by visibility:

  1. Static/Non-Static: Static members first, then instance members
  2. Member Type: Fields -> Delegates -> Events -> Properties -> Constructors -> Methods -> Nested Types
  3. Fields Order: Constants -> Static Readonly -> Static -> Readonly -> Instance
  4. Visibility: Public -> Protected -> Internal -> Protected Internal -> Private
  5. Methods Order: All static methods after all members, before instance methods
  6. Unity lifecycle methods (Awake, Start, Update, etc.) at top of instance methods section
  7. Alphabetical ordering within each group

Important: Do NOT reorder members when refactoring existing code unless explicitly requested.

Unity-Specific Guidelines

Components & Inspector

  • Components: MonoBehaviour for GameObjects, ScriptableObjects for data containers
  • Properties vs Fields: Prefer auto-properties over public fields
  • Inspector: Use [SerializeField] for private fields, [field:SerializeField] for auto-properties
  • Editor Code: Wrap with #if UNITY_EDITOR
  • References: Prefer direct references over GameObject.Find() or Transform.Find()
  • TryGetComponent: Use to avoid null reference exceptions

Read the full file on GitHub · 205 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 205 lines · 27 tokens per session scan A fb399661a244

Subscribe to this mod's changes

unity-coder is a skill published in the GitHub repository DmitriyYukhanov/claude-plugins (7 stars, last pushed 2d ago), licensed MIT. It adds 27 tokens to every session and 1,943 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

unity-game-dev

Use when the user wants to create, set up, or open a Unity project with AI assistance, install the Unity-MCP plugin, or connect Unity to ai-game.dev. Covers project creation, plugin install, login, and opening the editor via unity-mcp-cli.

IvanMurzak/ai-game-dev-plugin · 58 tokens

unreal-game-dev

Use when the user wants to create, set up, or open an Unreal Engine project with AI assistance, install the Unreal-MCP plugin, or connect Unreal to ai-game.dev. Covers project creation, plugin install, login, and opening the editor via unreal-mcp-cli.

IvanMurzak/ai-game-dev-plugin · 60 tokens

godot-game-dev

Use when the user wants to create, set up, or open a Godot project with AI assistance, install the Godot-MCP addon, or connect Godot to ai-game.dev. Covers project creation, plugin install, login, and opening the editor via godot-cli.

IvanMurzak/ai-game-dev-plugin · 61 tokens

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

assets-prefab-save

Save the currently opened prefab edit stage back to its prefab asset without exiting the stage. Pair with 'assets-prefab-open' to enter the edit mode first.

IvanMurzak/Unity-MCP · 37 tokens

retro

Facilitate a structured sprint retrospective — what went well, what didn't, and prioritized action items with owners and deadlines. Use when running a retrospective, reflecting on a sprint, creating action items from team feedback, or learning how to run effective retros.

phuryn/pm-skills · 52 tokens