code-writing-guide
/code-writing-guide
Stosuje konwencje projektu Unity przy każdej zmianie kodu, także przy drobnych poprawkach i testach.
- Autor
- nowsprinting ↗
- Repozytorium
- unity-coding-skills ↗
- Licencja
- Unlicense
- Ostatnia zmiana repozytorium
- 18.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 6
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 18.10.2026, bez odwołań do wycofanych modeli i API.
Unlicense, otwarta.
Co robi i kiedy
Stosuje konwencje projektu Unity przy każdej zmianie kodu, także przy drobnych poprawkach i testach.
Oryginalny opis (EN)
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.
Jak działa
- Rules
- Resources
Podgląd 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`
Pliki w paczce (6)
- SKILL.md 3 KB
- resources/coding-guideline.md 6 KB
- resources/diagnostics-review-feedback.md 3 KB
- resources/unity-event-functions.md 7 KB
- resources/unity-modern-guidelines.md 10 KB
- resources/unity-references.md 2 KB
Wersje
W bazie nie ma innych skilli o nazwie code-writing-guide.
Migawka bazy z 28.10.2026 · wersja paczki 8fc57545cc4d (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100test-writing-guide
Podaje zasady pisania kodu testów w projektach Unity dla plików w katalogu Tests, także przy drobnych poprawkach. - 100unity-yaml-editing-guide
Podpowiada, jak edytować pliki YAML Unity bez edytora: wartości ScriptableObject, właściwości materiałów i konfiguracje. - 95csharp-style
Stosuje konwencje C# przy pisaniu, przeglądzie i refaktoryzacji plików .cs, w tym dokumentację XML i wzorce Unity. - 100test-driven-development
Stosuje zasady TDD przy nowych funkcjach, poprawkach i refaktoryzacji: najpierw testy, które nie przechodzą, potem implementacja i porządkowanie kodu. - 94use-modern-go
Stosuje wytyczne Modern Go Guidelines przy pisaniu i refaktoryzacji kodu w Go, zgodnie z wersją języka. - 100verification-loop
Prowadzi ciągłą weryfikację po każdej zmianie: uruchamia testy, sprawdza buildy i waliduje zachowanie przy implementacji, poprawkach i refaktoryzacji.