mcpField
U
Unity Script Validator

Unity Script Validator

github.com/dev-gomTesting & quality9756 installsUpdated 41w ago
Repository

About Unity Script Validator

Unity Script Validator is a skill for Unity developers that checks C# scripts for common practices and performance patterns, then provides fixes and refactored examples.

Key features

  1. 01Check field declarations
  2. 02Review component caching
  3. 03Identify costly string and object lookups
  4. 04Check update loops and coroutines
  5. 05Provide fixes and refactored examples

Use cases

  1. 01Quickly review existing Unity scripts
  2. 02Find performance issues in script code
  3. 03Apply consistent C# practices

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dev-gom/claude-code-marketplace --skill unity-script-validator

After installing, type/unity-script-validatorin Claude Code to confirm it loaded.

Details

From the project README

Unity Script Validator

Validates Unity C# scripts against best practices and performance patterns specific to Unity game development.

What This Skill Checks

  • Field declarations: [SerializeField] private instead of public fields
  • Component caching: GetComponent in Awake/Start, not Update (~100x faster)
  • String operations: StringBuilder for frequent concatenation
  • GameObject.Find: Cache references, avoid in Update (O(n) operation)
  • Code organization: #region directives, consistent ordering
  • XML documentation: <summary> tags on public methods
  • Update vs FixedUpdate: Appropriate usage for physics/non-physics
  • Coroutines: Prefer for intermittent tasks over Update

Provides: Issues found, specific fixes, performance impact estimates, refactored code examples.

Compatibility

Applies to Unity 2019.4 LTS and later (including Unity 6).

See patterns.md and examples.md for detailed optimization techniques.

When to Use vs Other Components

Use this Skill when: Quick validation of existing Unity scripts for best practices and common issues

Use @unity-scripter agent when: Writing new code or implementing Unity features from scratch

Use @unity-refactor agent when: Improving code quality, applying design patterns, or modernizing legacy code

Use @unity-performance agent when: Deep performance profiling, memory optimization, or platform-specific tuning

Use /unity:new-script command when: Creating new scripts from production-ready templates

Related Skills

  • unity-scene-optimizer: For scene-level performance analysis
  • unity-template-generator: For generating validated script templates

Comments

Markdown supported