unity-ui-toolkit-design-system AGENTS.md

unity-ui-toolkit-design-system AGENTS.md is an instructions file for Codex, OpenCode from sinanata/unity-ui-toolkit-design-system. It costs 3,290 tokens per session, scanned A, original, MIT.

Repository instructions for a reusable Unity 6 UI Toolkit design system containing themed components, icons, typography, and runtime support.

In plain words
What is it for?
Use them when consuming or extending the design system, building Unity interfaces, adding components or icons, or working with flat and world-space UI.
Why use it?
They explain the system’s purpose and non-negotiable styling rules, helping agents keep new work consistent and editable through shared tokens.

Instructions file for CodexOpenCode

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 instructions/sinanata/unity-ui-toolkit-design-system/agents-md
Clone the repo
git clone --depth 1 https://github.com/sinanata/unity-ui-toolkit-design-system

Made for: Codex, OpenCode.

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-ui-toolkit-design-system AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sinanata/unity-ui-toolkit-design-system/agents-md.svg)](https://agentmods.dev/instructions/sinanata/unity-ui-toolkit-design-system/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/sinanata/unity-ui-toolkit-design-system/agents-md"><img src="https://agentmods.dev/badge/instructions/sinanata/unity-ui-toolkit-design-system/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,290 This file is loaded in full into every session.
When invoked 3,290 The same file — it is already loaded in full.
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.03290 $0.03290
Opus 5 $0.01645 $0.01645
Sonnet 5 $0.00658 $0.00658
Haiku 4.5 $0.00329 $0.00329

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

Security

Grade A, and why

unity-ui-toolkit-design-system AGENTS.md 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.

AGENTS.md · 91 lines

How it starts

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

AGENTS.md

Guidance for AI coding agents (Codex, Cursor, GitHub Copilot, Claude Code, Windsurf, Aider, Zed, and others) working in this repository or consuming this package in another project. Humans: this is a fast, accurate map. The deeper docs are linked at the bottom.

What this project is

A drop-in design system for Unity 6 UI Toolkit (UIDocument and PanelRenderer, UXML and USS). It ships design tokens, 42 components, 120 SVG icons, a Google Fonts typography system, a one-class mobile flip, and a small auto-attaching C# runtime. Everything is themed dark and editable from a single stylesheet. Package id: com.sinanata.designsystem. License: MIT. The same components render on flat screens and, on Unity 6000.5+, in world space. Both UIDocument and PanelRenderer can host flat or world-space UI; the showcase uses PanelRenderer for its world-space gallery, and Unity now lists UIDocument under UI Toolkit > Legacy while keeping it fully supported (not [Obsolete], still world-space capable). Prefer PanelRenderer for new work.

Golden rules (do not violate)

  1. Style with tokens and classes, never hardcoded values. Every color, radius, spacing, and motion value comes from a var(--...) token in DesignTokens.uss. Do not write raw hex, px, or ms in component rules. If a value you need has no token, add the token first, then reference it.
  2. Never put var(...) in an inline UXML style="..." attribute. Unity 6's clone-time StyleVariableResolver throws and the whole VisualTreeAsset fails to clone ("The UXML file set for the UIDocument could not be cloned"). Author a USS class and add the class in UXML instead. var(...) is fine inside .uss files.
  3. Class naming is BEM with a ds- prefix. Block .ds-btn, element .ds-btn__icon (double underscore), modifier .ds-btn--primary (double hyphen), state .is-active / .is-open / .is-spinning (prefixed is-). Do not invent a new prefix or fork an existing component under a new name.
  4. The showcase is the test suite. Every component, state, and variant must appear in Assets/Showcase/Resources/DesignSystemShowcase.uxml. A rule change that does not update the showcase is incomplete.
  5. .meta files are tracked on purpose. Do not add them to .gitignore. They carry svgType: 3 for icons and the asmdef import settings consumers rely on.
  6. A font with no fallback chain is a bug, not a default. Unity silently serves missing glyphs from an OS font, so Arabic renders as Arial and Japanese as Microsoft YaHei in the Editor and as empty boxes in a WebGL build, with no warning in either. Never judge multilingual text by what the Editor shows. DsFonts.Coverage resolves through the explicit chain only; Design System > Showcase > Verify Fonts fails loudly on a gap.
  7. A fallback chain is still not enough for CJK. Chinese, Japanese and Korean share codepoints they draw differently, and a chain resolves per codepoint, not per language — so the first CJK font in it wins all the shared Han and Chinese comes out in Japanese letterforms. Nothing is missing, so coverage passes and the verifier goes green. Name the face with DsFonts.ApplyFace when you know the language. See docs/FONTS.md.
  8. Every material family's solid branch starts with dsfx_ownGeometry(f). Unity 6000.5 batches descendant quads into an ancestor's custom-material draw, so a plain solid child (a swatch, a status dot, an active-row background) arrives in your family's fragment shader; shade it and it renders as an invisible chip of your material. Everything failing the test takes dsfx_passthrough. This is the single easiest thing in the FX system to regress, and it fails as a rendering oddity rather than an error. Related and equally load-bearing: call dsfx_wellShade unconditionally, never from inside a profile branch — from inside one it crashes FXC with no message. See docs/MATERIALS.md.
  9. Material markers are ds-fx- prefixed and are not styling classes. They carry no USS rules; they are instructions read by C# (DsFxSpec). Rule 3's BEM grammar governs component classes — do not try to make markers obey it, and do not add USS rules for them.

Read the full file on GitHub · 91 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 · 91 lines · 3,290 tokens per session scan A 104c383f2397

Subscribe to this mod's changes

unity-ui-toolkit-design-system AGENTS.md is an instructions file published in the GitHub repository sinanata/unity-ui-toolkit-design-system (531 stars, last pushed 16d ago), licensed MIT. It adds 3,290 tokens to every session, about $0.0164 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.