unity-cleaner
Skill7 starsChanged 7 months agoMITView on GitHub
Use when users want to find unused assets, duplicate files, or clean up the project.
In this repository34 other files it gives its agents.
- unity-mcp-skillsSkill
- unity-animatorSkill
- unity-assetSkill
- unity-cameraSkill
- unity-cinemachineSkill
- unity-componentSkill
- unity-consoleSkill
- unity-editorSkill
- unity-eventSkill
- unity-gameobjectSkill
- unity-importerSkill
- unity-lightSkill
- unity-materialSkill
- unity-navmeshSkill
- unity-optimizationSkill
- unity-packageSkill
- unity-perceptionSkill
- unity-physicsSkill
- unity-prefabSkill
- unity-probuilderSkill
- unity-projectSkill
- unity-sceneSkill
- unity-scriptableobjectSkill
- unity-scriptSkill
- unity-shaderSkill
- unity-smartSkill
- unity-terrainSkill
- unity-testSkill
- unity-timelineSkill
- unity-toolingSkill
- unity-uiSkill
- unity-uitoolkitSkill
- unity-validationSkill
- unity-xrSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 127
Delete all empty folders.
- Distinctive: line 138
Remove missing script components from GameObjects.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Unity Cleaner Skills
Overview
Cleaner skills are read-only analysis except for cleaner_delete_empty_folders and cleaner_fix_missing_scripts. To delete assets, route to the asset module (asset_delete / asset_delete_batch); cleaner_delete_assets returns a preview only.
Common Mistakes
DO NOT (common hallucinations):
cleaner_delete/cleaner_removedo not exist → useasset_delete/asset_delete_batchto actually remove.cleaner_fixdoes not exist → usecleaner_fix_missing_scriptsspecifically for missing script references.cleaner_scan/cleaner_find_unuseddo not exist → use specific skills:cleaner_find_unused_assets,cleaner_find_duplicates,cleaner_find_missing_references,cleaner_find_empty_folders,cleaner_find_large_assets.
Routing:
- To delete found assets →
assetmodule'sasset_delete/asset_delete_batch. - For project validation →
validationmodule.
Skills Overview
| Skill | Description |
cleaner_find_unused_assets | Find assets not referenced by others |
cleaner_find_duplicates | Find duplicate files by content hash |
cleaner_find_missing_references | Find missing scripts/asset references |
cleaner_delete_assets | Delete assets (two-step confirmation required) |
cleaner_get_asset_usage | Find what references a specific asset |
cleaner_find_empty_folders | Find empty folders in the project |
cleaner_find_large_assets | Find largest assets by file size |
cleaner_delete_empty_folders | Delete all empty folders |
cleaner_fix_missing_scripts | Remove missing script components from GameObjects |
cleaner_get_dependency_tree | Get dependency tree for an asset |
Skills
cleaner_find_unused_assets
Find potentially unused assets of a specific type.
| Parameter | Type | Required | Default | Description |
assetType | string | No | "Material" | Asset type filter |
searchPath | string | No | "Assets" | Search path |
limit | int | No | 100 | Max results |
Returns: {success, assetType, searchPath, potentiallyUnusedCount, note, assets: [{path, name, type, sizeBytes}]}
Recipe: ../../recipes/cleaner/cleaner_find_unused_assets.md
cleaner_find_duplicates
Find duplicate files by MD5 hash.
| Parameter | Type | Required | Default | Description |
assetType | string | No | "Texture2D" | Asset type |
searchPath | string | No | "Assets" | Search path |
limit | int | No | 50 | Max groups |
Returns: {success, assetType, count, wastedBytes, groups: [{count, sizeBytes, wastedBytes, files}]}
Recipe: ../../recipes/cleaner/cleaner_find_duplicates.md
cleaner_find_missing_references
Find components with missing scripts or null references.
| Parameter | Type | Required | Default | Description |
includeInactive | bool | No | true | Include inactive objects |
Returns: {success, issueCount, missingScripts, missingReferences, issues: [{type, gameObject, path, ...}]}
Recipe: ../../recipes/cleaner/cleaner_find_missing_references.md
cleaner_delete_assets
Preview a deletion against a list of asset paths. Returns size totals without mutating anything; route to asset_delete / asset_delete_batch to actually remove.
| Parameter | Type | Required | Description |
paths | string[] | Yes | Asset paths to preview |
Returns: {success, mode: "preview", previewCount, totalBytes, totalMB, assets: [{path, exists, sizeBytes, sizeMB}]}
Recipe: ../../recipes/cleaner/cleaner_delete_assets.md
cleaner_get_asset_usage
Find what objects reference a specific asset.
| Parameter | Type | Required | Description |
assetPath | string | Yes | Asset path |
limit | int | No | Max results (default 50) |
Returns: {success, asset: {path, name, type}, usedByCount, usedBy: [{path, name, type}]}
Recipe: ../../recipes/cleaner/cleaner_get_asset_usage.md
cleaner_find_empty_folders
Find empty folders in the project.
| Parameter | Type | Required | Default | Description |
searchPath | string | No | "Assets" | Search path |
Returns: { success, count, folders }
Recipe: ../../recipes/cleaner/cleaner_find_empty_folders.md
cleaner_find_large_assets
Find largest assets by file size.
| Parameter | Type | Required | Default | Description |
searchPath | string | No | "Assets" | Search path |
limit | int | No | 20 | Max results |
minSizeBytes | long | No | 0 | Minimum file size in bytes |
Returns: { success, count, assets: [{ path, sizeBytes, sizeMB }] }
Recipe: ../../recipes/cleaner/cleaner_find_large_assets.md
cleaner_delete_empty_folders
Delete all empty folders.
| Parameter | Type | Required | Default | Description |
searchPath | string | No | "Assets" | Search path |
Returns: { success, deleted, total }
Recipe: ../../recipes/cleaner/cleaner_delete_empty_folders.md
cleaner_fix_missing_scripts
Remove missing script components from GameObjects.
| Parameter | Type | Required | Default | Description |
includeInactive | bool | No | true | Include inactive objects |
Returns: { success, removedComponents }
Recipe: ../../recipes/cleaner/cleaner_fix_missing_scripts.md
cleaner_get_dependency_tree
Get dependency tree for an asset.
| Parameter | Type | Required | Default | Description |
assetPath | string | Yes | - | Asset path |
recursive | bool | No | true | Recursively resolve dependencies |
Returns: { success, assetPath, dependencyCount, dependencies: [{ path, type }] } or { error } if asset not found.
Recipe: ../../recipes/cleaner/cleaner_get_dependency_tree.md
Example Workflow: Clean Project
cleaner_find_unused_assets— identify candidates.cleaner_get_asset_usage— verify each candidate has no active references.cleaner_delete_assets— preview total size + per-asset report.asset_delete_batch— actually delete the vetted set.cleaner_find_empty_folders→cleaner_delete_empty_folders— clean up leftover folders.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

