code-standards

code-standards is a skill for Claude Code, Codex from tianzhiying/Unity-perf. It costs 58 tokens per session (4,710 once invoked), scanned A, original, MIT.

A set of C# and Unity rules for writing code and reviewing its design. Unity is a game-development engine, and a code review checks whether code is clear, consistent and maintainable.

In plain words
What is it for?
It helps write and review Unity C# code, choose suitable design patterns, improve naming and object relationships, and apply related guidance when explicitly reviewing other listed languages.
Why use it?
It provides a repeatable way to follow project conventions and spot design or quality problems during reviews.

Skill for Claude CodeCodex

Part of the unity-perf plugin — 3 skills 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 skills/tianzhiying/unity-perf/code-standards
Any agent
npx skills add tianzhiying/Unity-perf --skill code-standards
Clone the repo
git clone --depth 1 https://github.com/tianzhiying/Unity-perf

Made for: Claude Code, Codex.

Or install unity-perf, the plugin that ships this one along with the rest of its 3 skills.

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 code-standards

README.md
[![agentmods](https://agentmods.dev/badge/skills/tianzhiying/unity-perf/code-standards.svg)](https://agentmods.dev/skills/tianzhiying/unity-perf/code-standards)
Your own site
<a href="https://agentmods.dev/skills/tianzhiying/unity-perf/code-standards"><img src="https://agentmods.dev/badge/skills/tianzhiying/unity-perf/code-standards.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,710 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.00058 $0.04710
Opus 5 $0.00029 $0.02355
Sonnet 5 $0.00012 $0.00942
Haiku 4.5 $0.00006 $0.00471

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

Security

Grade A, and why

code-standards 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 3d 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.

skills/code-standards/SKILL.md · 138 lines

How it starts

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

C# coding standards (Unity client)

This skill has two uses: setting the standard while writing code (sections 1–3), and running the review protocol during a review (section 4).

Its scope is C# and Unity. The reference files also carry the rules for Go, C++, Java, and Lua — consult those only when you are explicitly reviewing one of those languages. The protocol structure carries over, but perspective C in step 1 (asset and configuration evidence) is Unity-specific and must be swapped for that language's equivalent evidence dimension.

The core of the review protocol is its structure — parallel multi-perspective passes plus an independent final review — not the checklist. It is more precise and covers more than a single agent reading straight through, so don't skip the protocol and just read the checklist.

0. Precedence and applicability

A project's existing conventions take precedence over this skill's defaults. When you pick up a repository, first look for .editorconfig and analyzer configuration, gofmt and lint configuration, .clang-format, checkstyle, and the project's own documentation (CLAUDE.md, README, .cursor/rules/, and so on). Standards are often written in non-.md extensions like .mdc, so read the repository index before asserting "there is no standard." Once found, it governs, and citing its clauses requires the verbatim line number.

Rules come in two tiers: violating one marked [HARD RULE] fails the review; ones marked [DEFAULT] apply when the project has no convention of its own.

Hot paths (frame loop, combat, network send/receive, high QPS) enforce all performance clauses, and any path that every user interaction must traverse falls under the same clauses. The cold-path exemption covers only editor tooling, one-off scripts, and initialization code.

1. Goals for every line you write

The goals must be met; the approach is yours.

  1. Peak algorithmic efficiency: think about the optimal order of magnitude before you start. What can be precomputed isn't computed at runtime, what can be incremental isn't done in full, what can be event-driven isn't polled.
  2. Space discipline: choose by access pattern, allocate by budget. Predictable capacities must be pre-set; caches must have a cap and an invalidation policy.
  3. Zero GC on hot paths: zero allocation within a frame in C# — eliminate boxing, closures, LINQ, string concatenation, and temporary collections. For per-language specifics see references/language-hard-rules.md.
  4. High cohesion, low coupling: single responsibility, one-directional dependencies. For the criteria see references/cohesion-coupling.md.
  5. Consistent naming and style: names must read as semantics, carrying units and direction. For C# specifics see references/naming-conventions.md.

Read the full file on GitHub · 138 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 138 lines · 58 tokens per session scan A 990c798d3ad6

Subscribe to this mod's changes

code-standards is a skill published in the GitHub repository tianzhiying/Unity-perf (2 stars, last pushed 1mo ago), licensed MIT. It adds 58 tokens to every session and 4,710 once invoked, about $0.0003 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

stata-skill

A packaged Stata Runner skill via official MCP-for-Stata server including statado, adopackageinstall, help, readlog and getdatainfo tools. Use it when (1) need to execute Stata do-file; (2) missing ado-packages; (3) find code error caused by syntax in Stata; (4) want to read smcl and text format log file with rich…

SepineTam/mcp-for-stata · 105 tokens

mcp-smoke-test

Run a local smoke test for the Stata-MCP server.

SepineTam/mcp-for-stata · 19 tokens

rfc-impl-generator

Generate RFC and IMPL documents from a user-provided feature/fix description. Use when the user says something like "I want to add a feature with codex", "Implement this", "Write an RFC for...", or provides a short idea that needs to be formalized into the ai-driven/rfc + ai-driven/impl pipeline.

SepineTam/mcp-for-stata · 74 tokens

ludoweft-localize

This skill should be used for game localization patches — when a project contains ludoweft.project.json, or when the user asks to localize, extract, translate, review, patch, or rebuild text in moddable game files, such as FreeMote info-PSB archives and MAGES visual novels. It covers resource inspection, extraction…

zeikar/ludoweft · 129 tokens

unity-ui-art-and-motion-production

Use when new or revised Unity UI visuals, icons, panels, 9-slice sprites, component states, HUD or menu layouts, popup motion, screen transitions, or flattened UI screenshot decomposition must be produced through Figma and integrated into uGUI, NGUI, or UI Toolkit; not for UI debugging, localization-only work…

hoatv2211/GameStudio-CodexKIT · 83 tokens

game-screenshot-showcase-and-store-packaging

Use when a Unity team needs approved PlayMode screenshots, immutable capture evidence, reviewed showcase slides, or report-only store screenshot packaging without auto-upload, signing, or submission.

hoatv2211/GameStudio-CodexKIT · 44 tokens