Skip to content

Add hybrid-duplication-audit skill - #129

Open
timt-unity3d wants to merge 2 commits into
mainfrom
skills/hybrid-duplication-audit
Open

Add hybrid-duplication-audit skill#129
timt-unity3d wants to merge 2 commits into
mainfrom
skills/hybrid-duplication-audit

Conversation

@timt-unity3d

Copy link
Copy Markdown
Collaborator

Summary

  • Adds Skills/hybrid-duplication-audit, a Claude Code skill that audits asset duplication across the AssetBundle / ContentDirectory boundary in a hybrid Addressables 4.x build (some groups build to .bundle files, others build through BuildPipeline.BuildContentDirectory).
  • The skill runs one analyze invocation combining the Addressables build layout report with the content directory build output, then matches source-asset paths across addressables_build_explicit_assets / addressables_build_data_from_other_assets and content_layout_source_assets to find what's genuinely duplicated.
  • Matching by asset path (rather than object CRC) catches cases a plain CRC diff misses — for example the same shader built with a different variant set on each side, which is also why Addressables' own DuplicatedAssetCount can read 0 even when real cross-boundary duplication exists.
  • Adds short cross-links in README.md, AGENTS.md, and Documentation/analyzer.md for discoverability, following this repo's existing manual-index convention.

Test plan

  • Built UnityDataTool from this branch and ran Skills/hybrid-duplication-audit/scripts/Compare-HybridDuplication.ps1 against a real hybrid Addressables project, confirming it reproduces a hand-verified duplication total (three shared shaders, 214,824 bytes) exactly.
  • Ran the script against a content-directory-only (non-hybrid) build and confirmed it reports "this is not a hybrid build" cleanly rather than a misleading result.
  • Verified -KeepDatabase preserves the generated database and its tables are as documented.
  • Reviewer sanity-check: run the script against your own hybrid Addressables project.

Audits asset duplication across the AssetBundle / ContentDirectory
boundary in a hybrid Addressables 4.x build. Runs one `analyze`
combining the Addressables build layout report with the content
directory build output, then matches source-asset paths across both
- catching cases a CRC-based diff misses, such as a shader built with
a different variant set on each side (which is also why Addressables'
own DuplicatedAssetCount can read 0 even when real duplication
exists).
Linux/macOS equivalent of Compare-HybridDuplication.ps1 - same
defaults, same queries, same output. Verified against this session's
build data: reproduces the PowerShell version's result exactly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant