Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
81d9253
chore(skills): scaffold directory structure for overhaul
claude Apr 20, 2026
dfd91f8
docs(skills): add canonical _shared/ references (naming, version gate…
claude Apr 20, 2026
abc4e6b
docs(skills): flesh out _checklists/ with imperative action items
claude Apr 20, 2026
916f9a5
docs(skills): rewrite editor + assetdb + undo + serialization skills …
claude Apr 20, 2026
6ef5348
docs(skills): rewrite UPM architect + reviewer skills in English
claude Apr 20, 2026
21f6f44
docs(skills): rewrite migration-planner + repo-auditor with narrower …
claude Apr 20, 2026
ed6c7f6
feat(skills): add unity-ci-validation, unity-package-bootstrap, and p…
claude Apr 20, 2026
ba05972
refactor: migrate namespace LightmapUvTool -> SashaRX.UnityMeshLab (.…
claude Apr 20, 2026
80db744
refactor(asmdef): update name and rootNamespace to SashaRX.UnityMeshL…
claude Apr 20, 2026
ae6cf95
refactor(asmdef): rename LightmapUvTool.Editor.asmdef -> SashaRX.Unit…
claude Apr 20, 2026
7e7eab9
docs: update AGENTS/CLAUDE/repo-conventions for SashaRX.UnityMeshLab …
claude Apr 20, 2026
1fa9ed3
feat(skills): populate _template/package-template/ with canonical pla…
claude Apr 20, 2026
32abbc4
chore: add .prettierignore to protect skill YAML frontmatter
claude Apr 20, 2026
ce2e351
docs(agents): shrink AGENTS.md to skills-directory pointer
claude Apr 20, 2026
f48573f
docs(skills): directive phrasing on 3 critical skills
claude Apr 20, 2026
f7b37e8
refactor!: rename package id com.sasharx.lightmap-uv-tool -> com.sash…
claude Apr 20, 2026
2dc054d
docs(skills): repo-conventions reflects resolved 1.0.0 state
claude Apr 20, 2026
2310d74
ci: add GameCI test workflow and tag-triggered release workflow
claude Apr 20, 2026
b9165d5
ci(test): add license-presence gate so workflow skips cleanly when se…
claude Apr 20, 2026
f45ad6a
docs(skills): document Unity Personal CI reality (manual activation d…
claude Apr 24, 2026
8fa8fb8
ci(release): use awk index() for changelog header match (was always-e…
claude Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: migration-and-refactor-planner
description: Используй при планировании многошаговых рефакторингов — декомпозиция монолитных файлов, смена минимальной версии Unity, переименование namespace, добавление Tests~/Documentation~/Samples~.
---

# Migration & Refactor Planner

Плейбуки: декомпозиция монолитов (по блоку за коммит), добавление тестов (Tests/Editor + asmdef + smoke), извлечение в UPM (структура + namespace + git URL), смена версии Unity, ренейм namespace. Каждый шаг = отдельный коммит.
8 changes: 8 additions & 0 deletions .claude/skills/_archive/repo-auditor.pre-overhaul.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: repo-auditor
description: Используй при запросе аудита, сканирования или отчёта о здоровье Unity UPM-пакета. Только отчёт, без правок.
---

# Repo Auditor

Сканируй репо и выдавай таблицу OK/WARN/FAIL по: package.json, asmdef, структура, namespace, размеры файлов, README/CHANGELOG, LICENSE, CI, антипаттерны. Не пиши фиксы.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: unity-assetdatabase-tools
description: Используй при написании AssetPostprocessor, батчинге AssetDatabase-операций с StartAssetEditing, управлении импортом или генерации HideAndDontSave-ассетов.
---

# AssetDatabase Tools

Батчинг: StartAssetEditing в try/finally. AssetPostprocessor: GetPostprocessOrder явно + bypass HashSet. Progress bar: DisplayCancelableProgressBar + ClearProgressBar в finally. ЗАПРЕЩЕНО: StartAssetEditing без try/finally, Refresh внутри цикла, Resources.Load в Editor, FindAssets без t: фильтра.
8 changes: 8 additions & 0 deletions .claude/skills/_archive/unity-editor-tooling.pre-overhaul.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: unity-editor-tooling
description: Используй при создании EditorWindow, MenuItem, [InitializeOnLoad], [OnOpenAsset], AssetModificationProcessor или других точек входа Unity Editor.
---

# Unity Editor Tooling

Точки входа: EditorWindow (GetWindow/CreateInstance), AssetModificationProcessor (OnWillSaveAssets, IsOpenForEdit), [OnOpenAsset], [InitializeOnLoad]. Запреты: ручной JSON, UnityWebRequest без timeout, статическое состояние без контракта, тяжёлые операции в OnGUI, Editor API в Runtime asmdef.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: unity-package-architect
description: Используй при проектировании или исправлении package.json, asmdef, структуры Editor/Runtime/Tests~/Samples~/Documentation~/Native~, или ограничений версии Unity.
---

# Unity Package Architect

Эталон: package.json (com.company.name, semver, LTS unity, нет нестандартных полей), asmdef (Company.Pkg.Editor, includePlatforms:["Editor"]), Editor/Runtime/Tests~/Documentation~/Samples~/Native~. Нейминг: Company.PackageName. Для монорепо: git URL + ?path=subfolder.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: unity-package-reviewer
description: Используй при ревью диффа, PR или существующего файла на нарушения правил Unity-пакета. Указывает конкретный скилл, чьё правило нарушено.
---

# Unity Package Reviewer

CRITICAL: .mesh, DestroyImmediate без Undo, мутация prefab без scope, StartAssetEditing без try/finally, мутация без Undo, target cast, Editor в Runtime. HIGH: ручной JSON, нет timeout, забытый ApplyModifiedProperties, нет bypass, >50КБ, хардкод. LOW: нет #if, нет progress bar, namespace без префикса.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: unity-serialized-workflow
description: Используй при работе с SerializedObject/SerializedProperty, создании CustomEditor/PropertyDrawer или сравнении сериализованных значений.
---

# Unity Serialized Workflow

Цикл: Update() → FindProperty → ApplyModifiedProperties(). ЗАПРЕЩЕНО: мутация target cast. BeginProperty/EndProperty в PropertyDrawer обязательны. Read-only доступ через new SerializedObject(obj).FindProperty(path).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: unity-undo-prefab-safety
description: Используй при мутации prefab-ассетов, записи Undo-групп, редактировании prefab-оверрайдов или клонировании asset-backed мешей перед модификацией.
---

# Undo и Prefab Safety

Undo-группы: SetCurrentGroupName → GetCurrentGroup → CollapseUndoOperations. RAII: UndoGroupScope. Prefab: EditPrefabContentsScope. Temp-instance: InstantiatePrefab → try {SaveAsPrefabAsset} finally {DestroyImmediate}. Оверрайды: Get/SetPropertyModifications. Mesh: только .sharedMesh + клон. ЗАПРЕЩЕНО: .mesh, LoadAssetAtPath→мутация→SaveAssets, DestroyImmediate без Undo.
44 changes: 32 additions & 12 deletions .claude/skills/_checklists/batch-safety.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
# Чеклист: безопасность батч-операций
# Checklist: AssetDatabase batch safety

Проверяй если код обрабатывает множество ассетов.
Run through every item before merging code that calls `AssetDatabase.StartAssetEditing`, creates more than ten assets at once, or writes an `AssetPostprocessor`. Each bullet includes a verification command.

- [ ] `AssetDatabase.StartAssetEditing()` обёрнут в `try/finally { StopAssetEditing(); Refresh(); }`
- [ ] Progress bar для >10 ассетов: `EditorUtility.DisplayCancelableProgressBar()`
- [ ] `ClearProgressBar()` в `finally`-блоке
- [ ] Нет `AssetDatabase.Refresh()` внутри цикла — только после батча
- [ ] `AssetPostprocessor` имеет bypass-множество (`HashSet<string>`) против рекурсии
- [ ] `GetPostprocessOrder()` указан явно (не дефолтный 0)
- [ ] Нет `AssetDatabase.ImportAsset()` внутри постпроцессора без bypass-защиты
## Pre-batch

## Эталонные реализации
- [ ] A fresh `git status` shows no unrelated working-tree drift. Verify: `git status --porcelain`.
- [ ] Every code path that opens a batch has a paired close in a `finally`. Verify: `grep -n "StartAssetEditing" path/to/file.cs` and confirm the same file contains the matching `StopAssetEditing` inside a `finally` block within the same method.
- [ ] On Unity 6 or newer, prefer `using (new AssetDatabase.AssetEditingScope())` over manual Start/Stop. Verify: `grep -n "StartAssetEditing\|AssetEditingScope" .` and confirm the disposable form is used where `#if UNITY_6000_0_OR_NEWER` applies.
- [ ] Queries against `AssetDatabase.LoadAssetAtPath`, `FindAssets`, or `GUIDToAssetPath` happen *before* opening the batch. Verify manually by reading the method top-to-bottom.

- **Батчинг с try/finally:** prefabdoctor/Editor/Core/ProjectScanActions.cs — `BatchCreateWrappers()`, `BatchRemoveMissingScripts()`
- **AssetPostprocessor с bypass:** unitymeshlab/Editor/Uv2AssetPostprocessor.cs
## Mid-batch

- [ ] No `AssetDatabase.Refresh()` appears inside the loop. Verify: `grep -n "Refresh()" path/to/file.cs` and confirm calls are outside the loop or removed entirely.
- [ ] Progress bar (`EditorUtility.DisplayCancelableProgressBar`) is shown for any loop that iterates over more than ten assets. Verify by reading the loop body.
- [ ] The user's cancel signal (`EditorUtility.DisplayCancelableProgressBar` return value) aborts the batch cleanly, still calling `StopAssetEditing` in `finally`.

## Post-batch

- [ ] `StopAssetEditing` is the first statement of the `finally` block; `ClearProgressBar` is second. Verify by reading.
- [ ] A single `AssetDatabase.Refresh()` call occurs after the batch if new assets were written. Verify: `grep -c Refresh path/to/file.cs`.
- [ ] Any generated asset path is reported via `UvtLog.Info` (or the package's logger) so the user can locate it. Verify: `grep -n "Log\|Debug.Log" path/to/file.cs`.

## AssetPostprocessor-specific

- [ ] The postprocessor declares a static `HashSet<string>` recursion guard populated in `try` and cleared in `finally`. Verify: `grep -n "HashSet<string>" path/to/*Postprocessor.cs`.
- [ ] `GetPostprocessOrder()` returns an explicit integer, not the default `0`. Verify: `grep -n "GetPostprocessOrder" path/to/*Postprocessor.cs`.
- [ ] `GetVersion()` returns an integer that increments whenever the postprocessor's behavior changes. Verify by reading and comparing to the previous git SHA.
- [ ] No `AssetDatabase.ImportAsset` is called from inside the postprocessor without passing the path through the recursion guard.
- [ ] On Unity 2021.2+, the `OnPostprocessAllAssets` overload accepts `bool didDomainReload`. Verify: `grep -n "OnPostprocessAllAssets" path/to/*Postprocessor.cs`.

## Further reading

- `unity-assetdatabase-tools/SKILL.md`
- `_shared/anti-patterns.md` (items 7–10)
- `_shared/version-gates.md` (AssetEditingScope recipe)
102 changes: 65 additions & 37 deletions .claude/skills/_checklists/package-release.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,65 @@
# Чеклист: релиз пакета

Проверяй перед каждым релизом / git tag.

## Метаданные
- [ ] `package.json`: version обновлён (semver — MAJOR.MINOR.PATCH)
- [ ] `package.json`: `unity` = минимальная поддерживаемая LTS
- [ ] `package.json`: `repository.url` совпадает с реальным URL репозитория
- [ ] `package.json`: нет нестандартных полей (`type`, `main`, `module`)
- [ ] `package.json`: `dependencies` актуальны (не забыты, не лишние)

## Документация
- [ ] `CHANGELOG.md` обновлён (формат Keep a Changelog — Added/Changed/Fixed/Removed)
- [ ] `README.md` актуален (установка, использование, требования)
- [ ] `LICENSE` присутствует и совпадает с `license` в package.json

## Код
- [ ] asmdef: `name` соответствует `Company.PackageName.Editor`, `includePlatforms` корректен
- [ ] Namespace единообразен с авторским префиксом (`Company.PackageName`)
- [ ] Нет файлов >100 КБ без обоснования (кандидаты на декомпозицию)
- [ ] Нет захардкоженных путей (`Assets/...`), URL, magic strings
- [ ] Нет `Resources.Load` в Editor-коде
- [ ] Все мутации Unity Object обёрнуты в Undo

## Тесты
- [ ] `Tests/Editor/` существует с минимум smoke-тестами
- [ ] Тесты проходят (`Window → General → Test Runner → Run All`)

## Сборка
- [ ] Компиляция без ошибок в минимальной версии Unity из package.json
- [ ] Компиляция без ошибок в последней LTS
- [ ] `#if UNITY_*` гейты корректны — фолбэки работают

## Публикация
- [ ] git tag совпадает с версией в package.json (напр. `v1.0.0`)
- [ ] Установка через git URL работает
- [ ] Установка через диск работает
# Checklist: UPM package release

Run through every item before tagging a release. Each bullet includes a verification command.

## SemVer decision

Choose exactly one bump based on the highest-impact change in the release:

| Bump | Trigger |
|---|---|
| PATCH | Bug fixes, documentation, internal refactors. No public API change. |
| MINOR | New public API, new asmdef, new sample, additive versionDefines. No breaking change. |
| MAJOR | Any removed or renamed public type/member, Unity minimum bump, namespace change, asmdef name change. |

- [ ] The SemVer bump matches the highest-impact change. Verify: `git log --oneline <previous-tag>..HEAD` and read every entry.
- [ ] `package.json` `version` has been updated and committed. Verify: `jq -r .version package.json`.

## CHANGELOG

- [ ] `CHANGELOG.md` follows Keep-a-Changelog format with sections `Added` / `Changed` / `Deprecated` / `Removed` / `Fixed` / `Security`. Verify: `head -30 CHANGELOG.md`.
- [ ] Every commit since the previous tag has a CHANGELOG entry, or is explicitly excluded as internal. Verify: diff `git log <previous-tag>..HEAD --oneline` against `CHANGELOG.md`.
- [ ] The new version header matches `package.json` `version` exactly. Verify: `grep -n "^## \[" CHANGELOG.md | head -1`.

## package.json

- [ ] `name` is `com.sasharx.<package>` and matches the repository folder name. Verify: `jq -r .name package.json`.
- [ ] `unity` field matches the declared minimum; `unityRelease` is set if a specific patch is required. Verify: `jq -r '.unity, .unityRelease' package.json`.
- [ ] `repository.url` points to the canonical `https://github.com/SashaRX/<Repo>.git` URL. Verify: `jq -r .repository.url package.json` and compare to `git remote get-url origin`.
- [ ] `dependencies` entries resolve in the latest Unity Package Manager. Verify: open in Unity and watch `Window > Package Manager` for resolve errors.
- [ ] `samples` array entries correspond one-to-one to folders under `Samples~/`. Verify: `jq -r '.samples[].path' package.json | sed 's|^Samples~/||'` matches `ls Samples~`.
- [ ] No non-standard fields (`type`, `main`, `module`) are present. Verify: `jq 'keys' package.json`.

## Asmdef audit

- [ ] Runtime asmdef has empty `includePlatforms` and empty `excludePlatforms`. Verify: `jq '.includePlatforms, .excludePlatforms' Runtime/*.asmdef`.
- [ ] Editor asmdef has `includePlatforms: ["Editor"]`. Verify: `jq '.includePlatforms' Editor/*.asmdef`.
- [ ] Test asmdef has `defineConstraints: ["UNITY_INCLUDE_TESTS"]`. Verify: `jq '.defineConstraints' Tests/**/*.asmdef`.
- [ ] No Runtime asmdef references an Editor asmdef. Verify: `jq '.references' Runtime/*.asmdef` and confirm none end in `.Editor`.
- [ ] `rootNamespace` of every asmdef matches the namespace used in the files under it. Verify by reading.

## Documentation and license

- [ ] `README.md` install-via-git-URL section points at the current default branch or tag. Verify: `grep -n "git\+https" README.md`.
- [ ] `LICENSE` exists at the package root and its SPDX identifier matches `license` in `package.json`. Verify: `jq -r .license package.json` and `head -3 LICENSE`.
- [ ] `Documentation~/` renders (index.md or TableOfContents present). Verify: `ls Documentation~` if present.

## Build and tests

- [ ] Compile passes on the declared minimum Unity version. Verify: CI result on the matrix minimum job.
- [ ] Compile passes on the current LTS. Verify: CI result.
- [ ] Every `#if UNITY_*` gate has an `#else` branch that compiles. Verify: `grep -rn "^#if UNITY_" Editor Runtime` and read each site.
- [ ] EditMode tests pass. Verify: CI result, or `Window > General > Test Runner > Run All` in the editor.

## Tag and publish

- [ ] The git tag name matches `v<version>` exactly (e.g., `v1.2.3`). Verify: `git tag -l | tail`.
- [ ] The tag points at HEAD of the default branch after CHANGELOG + version bump commits. Verify: `git log --oneline <tag> | head -1`.
- [ ] Installation via `https://github.com/SashaRX/<Repo>.git` resolves the tagged version in a consumer project's `Packages/manifest.json`. Verify in a scratch Unity project.

## Further reading

- `unity-package-reviewer/SKILL.md`
- `unity-package-architect/SKILL.md`
- `_shared/naming-conventions.md`
- `_shared/anti-patterns.md` (items 16–20)
Loading
Loading