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.
npx agentmods add skills/nowsprinting/unity-coding-skills/code-writing-guidenpx skills add nowsprinting/unity-coding-skills --skill code-writing-guidegit clone --depth 1 https://github.com/nowsprinting/unity-coding-skillsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00072 | $0.00604 |
| Opus 5 | $0.00036 | $0.00302 |
| Sonnet 5 | $0.00014 | $0.00121 |
| Haiku 4.5 | $0.00007 | $0.00060 |
Grade A, and why
code-writing-guide 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Guide for writing code in Unity projects.
Rules
- Before modifying any code file, check if the editor is in Play Mode. If it is, stop it using the
unity_play_controltool first — Play Mode may skip recompilation, leaving stale code active. - When a change is a structural refactoring — renaming a symbol, extracting a method/interface/base class, changing a method signature, moving a type to another namespace, or deleting a symbol — use the Rider MCP refactoring tools (
rename_refactoring,extract_method,extract_interface,extract_base_class,change_api_signature,move_type_to_namespace,reorganize_namespaces,safe_delete) instead of text edits. They update all references and call sites across the solution. - Never create
.metafiles. Unity editor creates them automatically. - When editing (creating or modifying) scene (
.unity) or prefab (.prefab) files, use theedit-sceneskill. - When instantiating a prefab multiple times, give each instance a unique
GameObject.name; otherwise, automated tests cannot identify a specific instance. Use a concrete name (e.g.,"<PrefabName>(Hero)") or append an index (e.g.,"<PrefabName>(0)").
Resources
Read the appropriate resource file based on the situation:
- Before writing or modifying any code file: Read
${CLAUDE_SKILL_DIR}/resources/coding-guideline.md - Before writing or modifying any code file: Read
${CLAUDE_SKILL_DIR}/resources/unity-modern-guidelines.md - Before writing or modifying MonoBehaviour lifecycle or event-handling methods (Awake, Start, OnEnable, OnDisable, OnDestroy, Update, FixedUpdate, LateUpdate, OnCollision*, OnTrigger*, OnGUI, OnMouse*, OnBecame*, OnPreCull, OnPreRender, OnPostRender, OnRenderImage, OnRenderObject, OnWillRenderObject, OnAnimatorMove, OnAnimatorIK, OnDrawGizmos): Read
${CLAUDE_SKILL_DIR}/resources/unity-event-functions.md - Before referencing an API, verifying a package behavior, or looking up documentation: Read
${CLAUDE_SKILL_DIR}/resources/unity-references.md - When resolving diagnostics or handling code review feedback: Read
${CLAUDE_SKILL_DIR}/resources/diagnostics-review-feedback.md
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.
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.
- 2d ago First seen · 33 lines · 72 tokens per session scan A b49ed8f92756
code-writing-guide is a skill published in the GitHub repository nowsprinting/unity-coding-skills (19 stars, last pushed 2d ago), licensed Unlicense. It adds 72 tokens to every session and 604 once invoked, about $0.0004 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.
Other skills, from other repositories
unity-pipeline
Drive this repo's running Unity Editor from the shell via the official unity CLI and the com.unity.pipeline package — recompile/test loop, C# eval, console logs, Game/Scene screenshots, the srgate SerializeReference check, and authoring new [CliCommand] commands. Use whenever a task needs to compile, test, inspect, or…
editor-media-capture
Shoot Unity Editor screenshots and GIFs for this package's documentation without the user touching Unity — floating Inspectors, TypeSelectorWindow dropdowns, prefab-mode states, and ffmpeg GIF assembly. Use when a task asks for docs media (PNG/GIF) of editor UI under Documentation/Images, or when scripting…
sync-readmes
Verify and update Aspid.FastTools README files against the actual codebase — namespaces, public API, CreateAssetMenu paths — keeping EN/RU and root/Documentation copies in sync.
build-analyzer
Build the Roslyn analyzer and deploy the resulting DLL into the Unity package.
build-generator
Build Roslyn source generators and deploy the resulting DLL into the Unity package.
unity
Compile, test, and drive Unity for this repo's C# packages (unity/core, jint, quickjs, clearscript) and the two Unity projects (tests/, kitchen-sink/). Use when a change touches C# under unity/, when Unity test results are needed, when a rendering snapshot has to be checked or regenerated, or when the app has to be…