unity-cleaner

Audit Unity projects for unused assets, duplicates, missing references, and empty folders.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-cleaner-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-cleaner
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/cleaner
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-cleaner-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity projects accumulate bloat over time: unused materials, duplicate textures, missing script references, and empty folders that inflate builds and slow iteration. This Skill audits a Unity project to surface these issues and safely removes them with confirmation-gated deletion. ## Core Features & Use Cases - Unused & Duplicate Detection: Find assets not referenced by anything and locate duplicate files by MD5 content hash, reporting wasted space in megabytes. - Missing Reference Repair: Scan scenes for missing scripts and null references, then strip broken components from GameObjects in place. - Safe Deletion Workflow: Deleting assets requires a two-step confirmToken handshake — preview first, then confirm within a 5-minute token TTL — preventing accidental data loss. - Use Case: Before a release, run a full audit: find duplicate textures wasting 50 MB, list unused materials, fix missing scripts, and preview deletion of orphaned assets before committing the cleanup. ## Quick Start Ask the assistant to scan my Unity project for unused materials and duplicate textures, then show me how much space I could reclaim.

Frequently Asked Questions about unity-cleaner

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

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

Use cleaner_find_unused_assets with an assetType filter such as Material or Texture2D and an optional searchPath. It returns assets not referenced by others, including path, type, and size in bytes.

How to find duplicate files in Unity by content?

Use cleaner_find_duplicates, which groups files by MD5 content hash rather than filename. It reports duplicate groups, total wasted bytes, and wasted megabytes so you can decide what to remove.

Can I safely delete Unity assets without losing work?

Yes, cleaner_delete_assets uses a two-step confirmToken handshake: the first call previews what will be deleted, and the second call with the returned token performs deletion. Tokens expire after 5 minutes.

How do I fix missing script references on GameObjects?

Run cleaner_find_missing_references to list missing scripts and null references, then call cleaner_fix_missing_scripts to remove the broken components in place. It supports including inactive objects via the includeInactive flag.

Why does cleaner_delete_assets return MODE_FORBIDDEN?

Delete operations carry SkillOperation.Delete and are blocked in Approval and Auto operating modes. They only run under Bypass mode or through a user-managed Allowlist entry, and still require the confirmToken handshake.