Skip to content

Latest commit

 

History

87 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-coding-skills

A Claude Code plugin for Unity development that enables coding agents to work autonomously through a test-first workflow — writing reliable, maintainable tests before production code, then iterating to completion without constant oversight.

Reliable tests give the agent a clear signal: green means done. This plugin provides the methodology, conventions, and tools to make that signal trustworthy.

Skills

Skill Description Required
code-writing-guide Coding conventions and guidelines for Unity C# projects
edit-scene Creates and modifies .unity and .prefab files MCP Server and MCP Server Extension for Unity plugin
fix-bug Diagnoses and fixes bugs using a test-first workflow (reproduce, diagnose, fix)
plan-feature Orchestrates the test-first planning workflow for feature implementation in plan mode
refine-tests Reviews existing test code for conformance to the test design and writing guides, then applies the refinements
resolve-diagnostics Resolves IDE diagnostics at warning or higher severity in the specified files, then reformats them MCP Server
run-tests Running Unity tests via the run_unity_tests tool MCP Server and MCP Server Extension for Unity plugin
test-designing-guide Design maintainable test cases; reduce redundant tests, tests without assertions, and unnecessary test doubles
test-writing-guide Conventions for writing Unity Test Framework test code Test Helper and UI Test Helper package
unity-yaml-editing-guide Guidelines for directly hand-editing Unity YAML asset files

Tip

Some skills require the MCP servers or UPM packages listed in the table above. If you use a different MCP server, tool, or package, please modify the skill accordingly.

Subagents

Agent Description
failing-test-writer Implements test code from the plan file's Test Cases table and confirms tests fail as expected (Step 2 of dev workflow)
test-deduplicator Removes duplicate tests and merges parameterizable tests in modified test files (Step 4 of dev workflow)
test-designer Designs test cases during plan mode after class/method designs are produced, using the test-designing-guide skill

Installation

User-scope installation

Add the marketplace and install the plugin:

/plugin marketplace add nowsprinting/unity-coding-skills
/plugin install unity-coding-skills@nowsprinting-unity-coding-skills

Project-scope installation (team sharing)

Add the marketplace and install the plugin with --scope project:

/plugin marketplace add nowsprinting/unity-coding-skills
/plugin install unity-coding-skills@nowsprinting-unity-coding-skills --scope project

Commit the resulting .claude/settings.json to your repository.

Note

When team members trust the project folder, Claude Code prompts them to install the marketplace and plugin automatically.

Recommended Project Settings

1. MCP Server Configuration

The run-tests and edit-scene skills require the JetBrains Rider built-in MCP server and extension.

  1. Enable built-in MCP Server
  2. Click the "Auto-Configure" button
  3. Install MCP Server Extension for Unity plugin

Important

JetBrains Rider 2026.2.1 or later is recommended.

Important

On Rider 2026.2, when both the JetBrains and Rider MCP toolsets are enabled, they expose tools with the same name. Prefer the tools provided by Rider, and disable the duplicates:

  • Under the Analysis toolset: get_file_problems, lint_files
  • Under the Formatting toolset: reformat_file

Tip

The JetBrains MCP server also provides tools useful for coding agents, such as list_directory_tree, search_file, search_regex, search_symbol, and search_text.

Note

The MCP server is registered under different names depending on your Rider version: rider on Rider 2026.2 or later, jetbrains on versions earlier than 2026.2.

Note

When Rider is earlier than 2026.2 and you are using other JetBrains IDEs simultaneously with Rider, port numbers are assigned in the order they are launched. For example, if you launch Rider after IDEA, the port number for Rider will be 64343.

2. Install UTF Analyzers (strongly recommended)

UTF Analyzers diagnose Unity Test Framework API usages that freeze the Unity Editor (e.g., Assert.ThrowsAsync, async delegates in Throws constraints, DelayedConstraint) before tests run. Install either the UPM package via OpenUPM or the NuGet package via NuGetForUnity.

3. Enforcing coding rules via analyzers and inspections

The skills resolve Roslyn analyzer and IDE inspection diagnostics at warning or higher severity during the refactoring phase. Therefore, any coding rule you want Claude to respect must be set to warning or higher severity in .editorconfig or .globalconfig.

Tip

You can find the open-source Roslyn analyzer version compatible with your project's Unity version in Which version of Roslyn analyzers should I use with Unity?.

Settings examples for maintainability

Code written by coding agents often has maintainability problems, such as leftover unused members and overly complex methods. The following settings help Claude avoid them.

To prevent leaving unused types and members, add the following to .editorconfig:

resharper_unused_type_local_highlighting = warning
resharper_unused_type_global_highlighting = warning
resharper_unused_member_global_highlighting = warning
resharper_unused_member_local_highlighting = warning

To keep method complexity under control, install one of the following Rider plugins:

Warning

In Rider 2026.2.1, there is an issue where the get_file_problems and lint_files tools fail to correctly return diagnostic messages from plugins. see: RIDER-142275

4. Untracking temporary files via .gitignore

The skills place temporary editor script files under Assets/UnityCodingSkills/. Adding the following pattern to your project's .gitignore is recommended:

Assets/UnityCodingSkills*

Usage

Test-first feature implementation planning

/plan-feature <SPEC>

The created plan file includes the following:

  • Layered-designed test cases to reduce redundant tests, tests without assertions, and unnecessary test doubles:
    • Editor tests (Edit Mode tests for editor extensions and validate assets)
    • Unit tests (Play Mode tests for runtime code)
    • Integration tests including UI operation and layout assertions
    • Visual verification tests using image analysis
  • Test-first development workflow
    • Effective (failable) test code
    • Definition of Done
    • Safe refactoring to improve internal quality (uses /simplify skill and static analysis)

Important

This skill requires plan mode.

Bug fixes through reproduction testing

/fix-bug <INCIDENT>

Create, run, and verify tests to reproduce the bug, then fix it.

Important

This skill must be used outside plan mode.

Tip

The INCIDENT can specify an issue description or the failed test name.

Note

Depending on the incident, the root cause may be identified before writing a reproduction test. Under adjustment.

Refine existing test code for conformance to the test design and writing guides

/refine-tests <PATH>

Note

This skill is intended for use outside plan mode, but it can also be used from plan mode.

Contributing

Contributions are welcome. However, we will decline contributions that we cannot maintain — such as adding support for different coding agents or MCP servers. Please fork this repository and customize it for your needs instead.

License

This project is released into the public domain under the Unlicense.

About

Skills and subagents for developing Unity projects with Claude Code — maintainable test design and implementation, test-first workflow, coding guidelines, scene editing, and more.

Topics

Resources

Stars

21 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages