Skip to content
Testing
Skill

/code-writing-guide

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

From plugin
unity-coding-skills
2010 skills3 agents

Claude Code

$ npx -y skills add nowsprinting/unity-coding-skills --skill code-writing-guide --agent claude-code

SKILL.md

code-writing-guide.SKILL.md
name: code-writing-guide
description: >-
  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.
user-invocable: false
license: Unlicense
metadata:
  author: Koji Hasegawa

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`
Read more
@nowsprinting
Ships withunity-coding-skills

A Claude Code plugin for Unity development that enables coding agents to work autonomously through a test-first workflow — writing reliable, maintainable tests before production code, then iterating to completion without constant oversight.

2010 skills3 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
20
Star history of nowsprinting/unity-coding-skills on GitHub, a chart by star-history.com

Other skills on unity-coding-skills.

More skills from other plugins.

api-review

api-review

Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…

@microsoft@microsoftInstall Skill
add-e2e-selectors

add-e2e-selectors

Add reliable @grafana/e2e-selectors to interactive elements and key containers in the Grafana frontend. Use when adding e2e…

grafana1d78k
@grafana@grafanaInstall Skill
promptfoo-evals

promptfoo-evals

Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…

@promptfoo@promptfooInstall Skill
deepeval

deepeval

DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…

@confident-ai@confident-aiInstall Skill

Questions about code-writing-guide.

Which coding agents can use code-writing-guide?
code-writing-guide installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.