code-writing-guide
Skill20 starsChanged 26 days agoUnlicenseView on GitHub
Provides coding guidelines for Unity projects. Make sure to use this skill whenever writing, creating, editing, or modifying code files. This includes implementing new features, fixing bugs, refactoring, adding tests, or any task that results in code changes. Even for small edits or one-line fixes, load this skill to ensure project conventions are followed.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nowsprinting/mcp-extension-unitytheir own version, first seen Jun 6, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nowsprinting/mcp-extension-unity★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- edit-sceneSkill
- fix-bugSkill
- plan-featureSkill
- refine-testsSkill
- resolve-diagnosticsSkill
- run-testsSkill
- test-designing-guideSkill
- test-writing-guideSkill
- unity-yaml-editing-guideSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Before modifying any code file, check if the editor is in Play Mode.
- Very specific: line 20
Never create .meta files. Unity editor creates them automatically.
- Very specific: line 21
When editing (creating or modifying) scene (.unity) or prefab (.prefab) files, use the edit-scene skill.
- Very specific: line 22
When instantiating a prefab multiple times, give each instance a unique GameObject.name.
- Distinctive: line 26
Read the appropriate resource file based on the situation:
- Very specific: line 28
Before writing or modifying any code file: Read ${CLAUDE_SKILL_DIR}/resources/coding-guideline.md
- Distinctive: line 30
Before writing or modifying MonoBehaviour lifecycle or event-handling methods (Awake, Start, OnEnable, OnDisable, OnDestroy, Update, …
- Very specific: line 31
Before referencing an API, verifying a package behavior, or looking up documentation: Read ${CLAUDE_SKILL_DIR}/resources/unity-references.md
- Very specific: line 32
When resolving diagnostics or handling code review feedback: Read ${CLAUDE_SKILL_DIR}/resources/diagnostics-review-feedback.md
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

