Agent skill

Unity Cleaner

by Besty0728 in Besty0728/Unity-Skills

“Clean up and audit a Unity project”

— description from SKILL.md by Besty0728
MITAuto-check passedGame Development

Install Unity Cleaner

skills CLI
$ npx skills add Besty0728/Unity-Skills --skill unity-cleaner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Besty0728/Unity-Skills unity-cleaner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Besty0728/Unity-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'SkillsForUnity/unity-skills~/skills/cleaner' .claude/skills/unity-cleaner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unity-cleaner
GitHub stars
1.8k
Token cost
~2.8k tokens
SKILL.md length
758 words
Files
1
Skills in repo
82
Repo updated
First seen
Licence
MIT

At a glance

  • SKILL.md covers Triggers, Guardrails, Skills Overview and Skills, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

About this skill

Unity Cleaner is a skill in Besty0728/Unity-Skills (1.8k stars). Its SKILL.md is about 2.8k tokens. Licence: MIT.

What it can do on your machine

Read from SKILL.md and the folder at commit ec8aa7c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unity Cleaner loads about 2.8k tokens when it runs. Until then it costs about 12 tokens; SKILL.md has 758 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~12
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Besty0728/Unity-Skills at commit ec8aa7c, republished under its MIT licence (© Besty0728). 758 words, ~2,791 tokens.

Download SKILL.mdSave it as .claude/skills/unity-cleaner/SKILL.md (or your agent's skills folder).
name
unity-cleaner
description
Clean up and audit a Unity project

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Reducing project bloat
  • Hunting duplicate or orphaned assets
  • Auditing before a release
  • 给项目瘦身、排查重复或孤立资源、发布前审计

Unity Cleaner Skills

Safety: cleaner_delete_assets uses a two-step confirmToken handshake. Call without confirmToken to preview; call again with the returned token (5-minute TTL) to actually delete. There is no dryRun parameter.

Guardrails

Operating Mode (v1.9 three-tier):

  • Approval (default): all analyze/query skills (cleaner_find_unused_assets, cleaner_find_duplicates, cleaner_find_missing_references, cleaner_get_asset_usage, cleaner_find_empty_folders, cleaner_find_large_assets, cleaner_get_dependency_tree) are SemiAuto — run directly.
  • Auto / Bypass: SemiAuto and FullAuto run directly.
  • Auto-forbidden in this module: cleaner_delete_assets, cleaner_delete_empty_folders (both carry SkillOperation.Delete). In Approval/Auto these return MODE_FORBIDDEN — they are reachable only under Bypass mode or via a user-managed Allowlist entry; the grant flow does not unlock them.
  • cleaner_fix_missing_scripts is an Execute | Modify operation (it replaces missing component references with null in place, no asset deletion), so it does not trigger the NeverInSemi gate. In Auto / Bypass it runs directly; in Approval it still requires the standard grant handshake before execution.
  • cleaner_delete_assets additionally uses a two-step confirmToken handshake even when the mode gate allows it — preview first (no token), then confirm with the returned token (5-minute TTL).

DO NOT (common hallucinations):

  • cleaner_delete / cleaner_remove do not exist → cleaner skills only find/report; use asset_delete 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 → use asset module's asset_delete / asset_delete_batch
  • For project validation → use 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 via two-step confirmToken (preview → confirm)
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, potentiallyUnusedCount, assets: [{path, name, type, sizeBytes}]}

python
# Find unused materials
result = call_skill("cleaner_find_unused_assets", assetType="Material")

# Find unused textures in a specific folder
result = call_skill("cleaner_find_unused_assets", 
    assetType="Texture2D", searchPath="Assets/Textures")
cleaner_find_duplicates

Find duplicate files by MD5 hash.

ParameterTypeRequiredDefaultDescription
assetTypestringNo"Texture2D"Asset type
searchPathstringNo"Assets"Search path
limitintNo50Max groups

Returns: {success, duplicateGroupCount, totalWastedBytes, totalWastedMB, groups: [{count, sizeBytes, wastedBytes, files}], skipped: [{path, reason}]} — skipped lists files that could not be read for hashing, so they are not silently missing from the groups.

python
# Find duplicate textures
result = call_skill("cleaner_find_duplicates", assetType="Texture2D")
print(f"Wasted space: {result['totalWastedMB']:.2f} MB")
Show full SKILL.md (298 more words)Show less
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, ...}]}

python
# Scan for all missing references
result = call_skill("cleaner_find_missing_references")
print(f"Missing scripts: {result['missingScripts']}")
print(f"Missing references: {result['missingReferences']}")
cleaner_delete_assets

Delete specified assets with two-step confirmation.

⚠️ Safety First: Deletion requires TWO calls - first preview, then confirm.

Step 1 - Preview (no confirmToken):

ParameterTypeRequiredDescription
pathsstring[]No*Asset paths to delete

*Required for this preview step; omitted in Step 2, which deletes exactly the paths already captured by confirmToken.

Returns: {action: "preview", confirmToken, assetsToDelete, message}

Step 2 - Confirm (with confirmToken):

ParameterTypeRequiredDescription
confirmTokenstringYesToken from preview step

Returns: {action: "deleted", deletedCount, results}

python
# Step 1: Preview what will be deleted
preview = call_skill("cleaner_delete_assets", 
    paths=["Assets/Unused/mat1.mat", "Assets/Unused/mat2.mat"])
print(preview['message'])  # Shows: "⚠️ PREVIEW ONLY - 2 assets will be deleted..."
print(preview['assetsToDelete'])  # Full list with sizes

# Step 2: Confirm deletion using token (expires in 5 minutes)
if input("Proceed? (y/n): ") == 'y':
    result = call_skill("cleaner_delete_assets", 
        confirmToken=preview['confirmToken'])
    print(result['message'])  # "Successfully deleted 2 assets"
cleaner_get_asset_usage

Find what objects reference a specific asset.

ParameterTypeRequiredDescription
assetPathstringYesAsset path
limitintNoMax results (default 50)

Returns: {success, asset, usedByCount, usedBy: [{path, name, type}]}

python
# Check what uses a texture
result = call_skill("cleaner_get_asset_usage",
    assetPath="Assets/Textures/player.png")
cleaner_find_empty_folders

Find empty folders in the project.

ParameterTypeRequiredDefaultDescription
searchPathstringNo"Assets"Search path

Returns: { success, count, folders }

python
# Find empty folders
result = call_skill("cleaner_find_empty_folders")
print(f"Found {result['count']} empty folders")
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 }] }

python
# Find top 10 largest assets over 1 MB
result = call_skill("cleaner_find_large_assets", limit=10, minSizeBytes=1048576)
for a in result['assets']:
    print(f"{a['sizeMB']:.2f} MB - {a['path']}")
cleaner_delete_empty_folders

Delete all empty folders.

ParameterTypeRequiredDefaultDescription
searchPathstringNo"Assets"Search path

Returns: { success, deleted, total }

python
# Delete all empty folders
result = call_skill("cleaner_delete_empty_folders")
print(f"Deleted {result['deleted']} of {result['total']} empty folders")
cleaner_fix_missing_scripts

Remove missing script components from GameObjects.

ParameterTypeRequiredDefaultDescription
includeInactiveboolNotrueInclude inactive objects

Returns: { success, removedComponents }

python
# Remove all missing script components
result = call_skill("cleaner_fix_missing_scripts")
print(f"Removed {result['removedComponents']} missing script components")
cleaner_get_dependency_tree

Get dependency tree for an asset.

ParameterTypeRequiredDefaultDescription
assetPathstringYes-Asset path
recursiveboolNotrueRecursively resolve dependencies

Returns: { success, assetPath, dependencyCount, dependencies: [{ path, type }] }

python
# Get full dependency tree for a prefab
result = call_skill("cleaner_get_dependency_tree",
    assetPath="Assets/Prefabs/Player.prefab")
print(f"Dependencies: {result['dependencyCount']}")

Example Workflow: Clean Project

python
import unity_skills

# 1. Find all missing references and fix them
missing = unity_skills.call_skill("cleaner_find_missing_references")
for issue in missing['issues']:
    if issue['type'] == 'MissingScript':
        print(f"⚠️ Missing script on: {issue['path']}")

# 2. Find duplicate textures
dupes = unity_skills.call_skill("cleaner_find_duplicates", assetType="Texture2D")
if dupes['totalWastedMB'] > 10:
    print(f"🗑️ {dupes['totalWastedMB']:.1f} MB wasted on duplicates")

# 3. Find unused materials
unused = unity_skills.call_skill("cleaner_find_unused_assets", assetType="Material")
print(f"📦 {unused['potentiallyUnusedCount']} potentially unused materials")

# 4. Preview cleanup
paths_to_delete = [a['path'] for a in unused['assets'][:5]]
preview = unity_skills.call_skill("cleaner_delete_assets", 
    paths=paths_to_delete)
print(f"Would free: {preview['totalMB']:.2f} MB")
# To actually delete, call again with preview['confirmToken'] within 5 minutes.

Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

© Besty0728, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in SkillsForUnity/unity-skills~/skills/cleaner of Besty0728/Unity-Skills.

Open the folder on GitHubat commit ec8aa7c

Compare with similar skills

Unity Cleaner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unity Cleaner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unity Cleaner this skillBesty0728/Unity-Skills1.8k—~2.8kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k2 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 2 repos~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 10 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Uloop Execute Dynamic Code

    CyberAgentGameEntertainment/NovaShader

    Execute C with Unity APIs when existing uloop tools cannot inspect or edit enough.

    1.6k GitHub starsUsed in 1 repo~1.9k tokens
    Game DevelopmentAuto-check passed

More from Besty0728/Unity-Skills

All 82 skills in this repo
  • Unity Skills

    Besty0728/Unity-Skills

    Automate the Unity Editor through a local REST API — scripts, scenes, prefabs, assets, materials, lighting, tests and hundreds of other Editor operations.

    1.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Unity Animator

    Besty0728/Unity-Skills

    Edit Unity Animator Controllers and drive runtime parameters

    1.8k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Unity Architecture

    Besty0728/Unity-Skills

    Advise on Unity gameplay and system architecture. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Unity Batch

    Besty0728/Unity-Skills

    Unified batch and async-job orchestration. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Unity Behavior

    Besty0728/Unity-Skills

    Drive Unity Behavior behavior graphs and blackboard variables

    1.8k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Unity Console

    Besty0728/Unity-Skills

    Capture and query the Unity Editor console. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Questions about Unity Cleaner

How do I install Unity Cleaner in Claude Code?

Run `npx skills add Besty0728/Unity-Skills --skill unity-cleaner -a claude-code`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/cleaner in Besty0728/Unity-Skills) into .claude/skills/unity-cleaner in your project. Claude Code loads it when a task matches its description.

How do I install Unity Cleaner in Codex?

Run `npx skills add Besty0728/Unity-Skills --skill unity-cleaner -a codex`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/cleaner in Besty0728/Unity-Skills) into .agents/skills/unity-cleaner in your project. Codex loads it when a task matches its description.

Can I use Unity Cleaner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Besty0728/Unity-Skills --skill unity-cleaner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unity-cleaner, .gemini/skills/unity-cleaner, .github/skills/unity-cleaner and .opencode/skills/unity-cleaner in your project.

What does Unity Cleaner need to run?

SKILL.md names no scripts, command-line tools or credentials: Unity Cleaner is instructions for the agent only.

Does Unity Cleaner access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Unity Cleaner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unity Cleaner use?

Unity Cleaner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unity Cleaner use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Unity Cleaner?

Skills that share tags, products or a category with Unity Cleaner: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unity Cleaner?

Besty0728 (a GitHub user) maintains it in Besty0728/Unity-Skills, which has 1,815 GitHub stars. The repository holds 82 skills in this directory. The repository was last updated on October 7, 2026.

Source: Besty0728/Unity-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.