unity-cleaner

Scan Unity projects for unused, duplicate, and orphaned assets.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/lrbjk/FenShen_Remake_V0 --skill unity-cleaner-lrbjk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-cleaner
Source: https://github.com/lrbjk/FenShen_Remake_V0/tree/main/.codex/skills/unity-skills/skills/cleaner
Command: npx skills add https://github.com/lrbjk/FenShen_Remake_V0 --skill unity-cleaner-lrbjk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity projects often accumulate unused, duplicate, or broken assets and references that bloat project size, slow iteration, and cause runtime or build issues; this Skill helps locate and assess those problems before destructive actions are taken.

Core Features & Use Cases

  • Identification of unused assets: Scan by asset type and path to list potentially unreferenced files for review.
  • Duplicate detection and size analysis: Group files by content hash to reveal wasted storage and largest assets impacting build size.
  • Reference and dependency inspection: Find missing script/component references, show asset usage and dependency trees, and remove missing script components safely.
  • Safe deletion workflow: Two-step preview-and-confirm deletion with dry-run default and dedicated asset deletion routing to prevent accidental data loss.
  • Use Case: Before a release, run a full scan to find missing scripts, large or duplicate textures, preview deletions, and produce a JSON report for CI-based validation.

Quick Start

Run a scan of the Assets folder to list unused Material assets and preview the top five deletions.

Frequently Asked Questions about unity-cleaner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and remove unused assets in a Unity project?

Unity asset cleanup involves scanning project directories by type and path to list unreferenced files. A safe deletion workflow uses a dry-run default and a two-step preview-confirm process to prevent accidental data loss.

What is the best way to detect duplicate Unity assets and analyze their size?

Detecting duplicate Unity assets is done by grouping files based on their content hash. This reveals wasted storage and identifies the largest assets impacting your overall build size for optimization.

How can I find missing script references and clean up empty folders before a Unity build?

Finding missing script references involves inspecting asset dependencies to locate broken component links. You can safely remove these missing scripts and empty folders during pre-build optimization to prevent runtime issues.

Does the Unity asset cleanup process support automated CI validation?

Yes, the Unity asset cleanup process supports automated validation by outputting JSON-formatted results. These reports detail unused, duplicate, and orphaned assets, making them suitable for CI-based validation pipelines.

Can I filter Unity dependency tree analysis by specific asset types?

Yes, you can filter Unity dependency tree analysis and usage inspections by specific asset types and directory paths. This narrows the scan scope to target particular file categories like Materials or textures.