unity-cleaner

Detect unused assets, duplicates, missing references, and empty folders in Unity projects.

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-cleaner-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-cleaner
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/cleaner
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-cleaner-pcone-mm

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 cause runtime errors. This Skill audits a Unity project and reports exactly what can be cleaned, with a safe two-step confirmation flow before anything is deleted. ## Core Features & Use Cases - Unused & Duplicate Detection: Find assets not referenced by anything and files duplicated by MD5 content hash, including total wasted megabytes. - Reference Auditing & Repair: Locate missing scripts and null references across GameObjects, then remove broken script components in place. - Safe Deletion Workflow: Deleting assets requires a preview call that returns a confirmToken (5-minute TTL), followed by a confirmation call, so nothing is removed by accident. - Use Case: Before a release, run the duplicate finder on textures, list the largest assets over 1 MB, fix missing scripts, and preview deletion of unused materials to shrink the project safely. ## Quick Start Ask the assistant to scan my Unity project for unused materials, duplicate textures, and missing script references, then show me a deletion preview before removing anything.

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?

Call 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, wasted bytes per group, and total wasted megabytes across the project.

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 returns a token valid for 5 minutes; only a second call with that token performs the deletion.

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 an includeInactive flag to cover inactive objects.

Why does cleaner_delete_assets return MODE_FORBIDDEN?

Deletion operations are auto-forbidden in Approval and Auto operating modes. They only run under Bypass mode or through a user-managed Allowlist entry, and still require the confirmToken preview step.