agentleFS
batihandevbatihandev/unity-mcp-skills/skills/cleaner/SKILL.md

unity-cleaner

Skill7 starsChanged 7 months agoMITView on GitHub

Use when users want to find unused assets, duplicate files, or clean up the project.

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
  1. Distinctive:

    Delete all empty folders.

    line 127
  2. Distinctive:

    Remove missing script components from GameObjects.

    line 138

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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_remove do not exist → use asset_delete / asset_delete_batch to actually remove.
  • cleaner_fix does not exist → use cleaner_fix_missing_scripts specifically for missing script references.
  • cleaner_scan / cleaner_find_unused do 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 → asset module's asset_delete / asset_delete_batch.
  • For project validation → validation module.

Skills Overview

SkillDescription
cleaner_find_unused_assetsFind assets not referenced by others
cleaner_find_duplicatesFind duplicate files by content hash
cleaner_find_missing_referencesFind missing scripts/asset references
cleaner_delete_assetsDelete assets (two-step confirmation required)
cleaner_get_asset_usageFind what references a specific asset
cleaner_find_empty_foldersFind empty folders in the project
cleaner_find_large_assetsFind largest assets by file size
cleaner_delete_empty_foldersDelete all empty folders
cleaner_fix_missing_scriptsRemove missing script components from GameObjects
cleaner_get_dependency_treeGet dependency tree for an asset

Skills

cleaner_find_unused_assets

Find potentially unused assets of a specific type.

ParameterTypeRequiredDefaultDescription
assetTypestringNo"Material"Asset type filter
searchPathstringNo"Assets"Search path
limitintNo100Max 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.

ParameterTypeRequiredDefaultDescription
assetTypestringNo"Texture2D"Asset type
searchPathstringNo"Assets"Search path
limitintNo50Max 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.

ParameterTypeRequiredDefaultDescription
includeInactiveboolNotrueInclude 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.

ParameterTypeRequiredDescription
pathsstring[]YesAsset 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.

ParameterTypeRequiredDescription
assetPathstringYesAsset path
limitintNoMax 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.

ParameterTypeRequiredDefaultDescription
searchPathstringNo"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.

ParameterTypeRequiredDefaultDescription
searchPathstringNo"Assets"Search path
limitintNo20Max results
minSizeByteslongNo0Minimum 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.

ParameterTypeRequiredDefaultDescription
searchPathstringNo"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.

ParameterTypeRequiredDefaultDescription
includeInactiveboolNotrueInclude inactive objects

Returns: { success, removedComponents }

Recipe: ../../recipes/cleaner/cleaner_fix_missing_scripts.md

cleaner_get_dependency_tree

Get dependency tree for an asset.

ParameterTypeRequiredDefaultDescription
assetPathstringYes-Asset path
recursiveboolNotrueRecursively 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

  1. cleaner_find_unused_assets — identify candidates.
  2. cleaner_get_asset_usage — verify each candidate has no active references.
  3. cleaner_delete_assets — preview total size + per-asset report.
  4. asset_delete_batch — actually delete the vetted set.
  5. cleaner_find_empty_folders → cleaner_delete_empty_folders — clean up leftover folders.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.