# Unity Asset Guid Meta Audit

> Use when auditing Unity asset GUID and meta consistency, duplicate GUIDs, missing meta files, stale references, or import and prefab reference failures without editing assets.

- Skill: `hoatv2211/unity-asset-guid-meta-audit` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add hoatv2211/unity-asset-guid-meta-audit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hoatv2211/unity-asset-guid-meta-audit/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- License: MIT
- Author: hoatv2211 (https://skillmd.com/u/hoatv2211)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hoatv2211/unity-asset-guid-meta-audit

---

# Unity Asset GUID Meta Audit

## Overview
Build a read-only map of Unity assets, `.meta` files, GUIDs, and serialized references before any import, regeneration, or asset edit.

## When to use
Use for duplicate GUID warnings, missing `.meta` files, broken prefab or scene references, stale GUIDs, merge damage, or unexplained import failures.

## When NOT to use
Do not use for draw order, clipping, runtime UI state, or broad asset reimport. Route those cases to the narrower Unity workflow.

## Required inputs and context discovery
Collect Unity version, project root, asset paths, meta paths, serialized reference sources, generated/vendor exclusions, version-control state, and no-touch asset rules.

## Safety and risk level
Read-only only. Never create, delete, copy, or regenerate `.meta` files during diagnosis. Any repair requires exact ownership, backup, and `safe-project-mutation`.

## Workflow
1. Inventory assets and their adjacent `.meta` files without opening or saving Unity.
   Completion criterion: every inspected asset is classified as paired, missing-meta, generated, vendor, or excluded.
2. Normalize GUID ownership into a deterministic map.
   Completion criterion: duplicate GUIDs cite every owning path.
3. Extract serialized GUID references from scoped text assets.
   Completion criterion: stale references cite source path and missing GUID.
4. Trace the editable source for generated or copied assets.
   Completion criterion: no generated destination is proposed as the repair source.
5. Produce a source-first repair plan and verification fixture.
   Completion criterion: proposed changes are reversible or remain BLOCKED.

## Evidence and output contract
Produce `unity-guid-meta-audit.json` with asset/meta pairs, duplicate GUIDs, missing meta, stale references, exclusions, limitations, and source-first recommendations.

## Handoff contract
Record Unity version, inspected roots, duplicate/stale GUIDs, protected paths, generated ownership, and the next safe repair experiment.

## Pitfalls and anti-rationalization
- Never generate a new `.meta` merely because one is missing.
- A text search result is not proof Unity imported the asset.
- Do not rewrite GUIDs across the project to silence one error.
- Missing Editor access is BLOCKED for live import confirmation.

## Verification checklist
- [ ] Asset and meta inventories are scoped.
- [ ] Duplicate GUIDs cite all paths.
- [ ] Stale references cite their sources.
- [ ] Generated/vendor paths remain untouched.
- [ ] Repair work is routed through safe mutation.

## References and scripts
Use the bundled [scripts/unity_guid_audit.py](scripts/unity_guid_audit.py) on normalized manifests and project-local Unity serialization rules.

