agentleFS
nowsprintingnowsprinting/unity-coding-skills/skills/code-writing-guide/SKILL.md

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

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    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.

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
  1. Very specific:

    Before modifying any code file, check if the editor is in Play Mode.

    line 18
  2. Very specific:

    Never create .meta files. Unity editor creates them automatically.

    line 20
  3. Very specific:

    When editing (creating or modifying) scene (.unity) or prefab (.prefab) files, use the edit-scene skill.

    line 21
  4. Very specific:

    When instantiating a prefab multiple times, give each instance a unique GameObject.name.

    line 22
  5. Distinctive:

    Read the appropriate resource file based on the situation:

    line 26
  6. Very specific:

    Before writing or modifying any code file: Read ${CLAUDE_SKILL_DIR}/resources/coding-guideline.md

    line 28
  7. Distinctive:

    Before writing or modifying MonoBehaviour lifecycle or event-handling methods (Awake, Start, OnEnable, OnDisable, OnDestroy, Update, …

    line 30
  8. Very specific:

    Before referencing an API, verifying a package behavior, or looking up documentation: Read ${CLAUDE_SKILL_DIR}/resources/unity-references.md

    line 31
  9. Very specific:

    When resolving diagnostics or handling code review feedback: Read ${CLAUDE_SKILL_DIR}/resources/diagnostics-review-feedback.md

    line 32

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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_control tool 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 .meta files. Unity editor creates them automatically.
  • When editing (creating or modifying) scene (.unity) or prefab (.prefab) files, use the edit-scene skill.
  • 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

Download now (ZIP)

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.