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

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

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 agents/xeldaralz/everything-claude-unity/unity-linter
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.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.svg" alt="Measured on agentmods" 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. 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.00023 $0.00745
Opus 5 $0.00012 $0.00373
Sonnet 5 $0.00005 $0.00149
Haiku 4.5 $0.00002 $0.00075

Measured 5d ago against content hash a03dba627906, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 (21 stars, last pushed 4mo ago), licensed MIT. It adds 23 tokens to every session and 745 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-30.

Related

Other agents, from other repositories

verifying-worker-output

What a coordinator does after a worker reports succeeded. Dispatching workers and the report contract they follow live in the rove skill (.claude/skills/kobe/SKILL.md); this page starts where that ends — succeeded is a claim, not a verification. Every rule here was paid for in one night of verifying 26 worker PRs; the…

Sma1lboy/rove · 0 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

implementer

Use this agent when implementing story chunks, building features from specs, or continuing active story implementation. Owns the implement → validate → refine loop for each chunk. Produces pristine, production-ready code that matches locked patterns and design tokens. Context: Orchestrator is implementing a story and…

drobins25/craft · 292 tokens

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

tester

Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…

drobins25/craft · 200 tokens

product-anthropologist

The human-truth layer for product decisions. Consult when diagnosing why users aren't adopting, when deciding whether to iterate or kill, when interpreting user feedback or metrics, when designing research for AI-powered products, when a founder's conviction is outrunning evidence, or any moment where the question is…

drobins25/craft · 116 tokens