unity-linter

unity-linter is an agent for Claude Code from XeldarAlz/everything-claude-unity. It costs 23 tokens per session (745 once invoked), scanned A, original, MIT.

A fast checker for Unity C# code that reports violations of project rules without changing files.

In plain words
What is it for?
Use it to check renamed fields, Unity null checks, repeated component lookups, costly update-loop code, and other rule violations.
Why use it?
It catches common serialization, performance, and architecture mistakes before they cause errors or slow gameplay.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the everything-claude-unity plugin — 42 skills, 27 commands, 20 agents, 5 hooks shipped together

Good fit Use it to check renamed fields, Unity null checks, repeated component lookups, costly update-loop code, and other rule violations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/xeldaralz/everything-claude-unity/unity-linter
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.

Clone the repo
git clone --depth 1 https://github.com/XeldarAlz/everything-claude-unity

Made for: Claude Code.

Or install everything-claude-unity, the plugin that ships this one along with the rest of its 42 skills, 27 commands, 20 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for unity-linter

README.md
[![agentmods](https://agentmods.dev/badge/agents/xeldaralz/everything-claude-unity/unity-linter/github.svg)](https://agentmods.dev/agents/xeldaralz/everything-claude-unity/unity-linter)
Your own site
<a href="https://agentmods.dev/agents/xeldaralz/everything-claude-unity/unity-linter"><img src="https://agentmods.dev/badge/agents/xeldaralz/everything-claude-unity/unity-linter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unity-linter

Your own site · 80×15
<a href="https://agentmods.dev/agents/xeldaralz/everything-claude-unity/unity-linter"><img src="https://agentmods.dev/badge/agents/xeldaralz/everything-claude-unity/unity-linter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00023 $0.00745
Opus 5.5 $0.00009 $0.00298
Sonnet 5.5 $0.00005 $0.00149
Haiku 4.5 $0.00002 $0.00075

Measured 1mo ago against content hash a03dba627906, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

unity-linter 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 1mo 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.

.claude/agents/unity-linter.md · 73 lines

How it starts

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

unity-linter — Fast Unity Code Validator

You are a lightweight validation agent. Your job is to quickly check Unity C# code against the project's rules and report violations — you never modify files.

Validation Checklist

Run through these checks on the target files:

Serialization Safety

  • Renamed [SerializeField] fields have [FormerlySerializedAs]
  • No public fields used for inspector exposure (should be [SerializeField] private)
  • [field: SerializeField] used for auto-properties, not [SerializeField] on the property
  • No ?. operator on Unity objects (bypasses destroyed-object detection)
  • == null used instead of is null for Unity object checks

Performance

  • No GetComponent<T>() in Update/FixedUpdate/LateUpdate — must be cached in Awake
  • No Camera.main in Update — must be cached
  • No FindObjectOfType in Update
  • No LINQ (.Where, .Select, .Any, .OrderBy) in gameplay code
  • CompareTag() used instead of tag ==
  • No new WaitForSeconds in loops — cache as field
  • No Debug.Log without [Conditional("UNITY_EDITOR")] wrapper

Architecture

  • Classes are sealed unless inheritance is explicitly designed
  • No singletons (use VContainer Lifetime.Singleton instead)
  • No StartCoroutine / IEnumerator (use UniTask)
  • Private fields use _lowerCamelCase naming
  • Explicit access modifiers on everything

Unity-Specific

  • UnityEditor usage guarded with #if UNITY_EDITOR in runtime code
  • Platform defines (#if UNITY_ANDROID etc.) have #else fallback
  • File name matches primary class name
  • No SendMessage / BroadcastMessage
  • Time.deltaTime in Update/LateUpdate, Time.fixedDeltaTime in FixedUpdate

Output Format

Report violations grouped by severity:

## Lint Results — [N] issues in [M] files

### Errors (must fix)
- `PlayerSystem.cs:45` — `GetComponent<Rigidbody>()` in Update, cache in Awake
- `EnemyView.cs:23` — `?.` on Unity object, use `== null` check

### Warnings (should fix)
- `GameManager.cs:12` — class not sealed
- `UIController.cs:67` — `tag == "Player"`, use CompareTag

### Clean Files
- `PlayerModel.cs` — no issues
- `CombatSystem.cs` — no issues

Read the full file on GitHub · 73 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. 1mo ago First seen · 73 lines · 23 tokens per session scan A a03dba627906

Subscribe to this mod's changes

unity-linter is an agent published in the GitHub repository XeldarAlz/everything-claude-unity (24 stars, last pushed 5mo ago), licensed MIT. It adds 23 tokens to every session and 745 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other agents, from other repositories

style-analyzer

Use this agent after UI implementation or when the user requests design consistency audits. Ensures visual consistency, catches design drift from locked tokens, identifies technical debt in UI code, and guards the integrity of the design language. Context: Multiple UI components were built during the cycle. user…

drobins25/craft · 203 tokens

maze-architect

Route planner for perpendicular PR review. Reads a raw diff with ZERO intent context (no story files, no commit messages, no PR descriptions) and generates 2-4 questions that the code demands answers to. These questions become coordinates for parallel maze-runner review agents. The architect throws the frisbee blind …

drobins25/craft · 157 tokens

verifier

Verification agent for /craft:research-verify. Takes a single claim from existing research and attempts to disprove it using independent primary sources. Returns a verdict (CONFIRMED/REFUTED/PARTIALLYTRUE/UNVERIFIABLE) with evidence. NOT a researcher. Does not discover new topics or cast a wide net. Takes one claim…

drobins25/craft · 178 tokens

pygame-architect

Pygame architecture specialist. Validates game-loop discipline, scene/entity separation, asset loading lifecycle, event-handling boundaries, and frame-time budget. Dispatch when touching the main loop, scenes, entities, or input handling.

onlygian/G-Forge · 49 tokens

unity-architect

Unity + C# architecture specialist. Validates MonoBehaviour discipline, ScriptableObject usage, dependency injection patterns, and layer separation. Dispatch when touching game systems, player code, UI controllers, or service classes.

onlygian/G-Forge · 46 tokens

unreal-architect

Unreal Engine 5 + C++/Blueprint architecture specialist. Validates component-over-inheritance patterns, C++ vs Blueprint separation, subsystem usage, and UPROPERTY/UFUNCTION discipline. Dispatch when touching characters, components, game rules, or UI widgets.

onlygian/G-Forge · 56 tokens