find-orphaned-meta

Scan Unity Assets and Packages directories for orphaned .meta files.

500|44|Updated Jun 15, 2025
One-click install
npx skills add https://github.com/hatayama/unity-cli-loop --skill find-orphaned-meta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-orphaned-meta
Source: https://github.com/hatayama/unity-cli-loop/tree/main/.claude/skills/find-orphaned-meta
Command: npx skills add https://github.com/hatayama/unity-cli-loop --skill find-orphaned-meta

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Detect and clean up orphaned .meta files left behind after assets or folders are deleted in a Unity project, which cause Unity editor warnings and repository clutter.

Core Features & Use Cases

  • Detects .meta files inside Assets and Packages whose corresponding asset or folder no longer exists.
  • Reports findings as a newline-separated list to aid review and decision making.
  • Provides a simple, user-confirmed deletion workflow and is useful after branch switches, merges, rebases, or manual file removals to restore repository hygiene.

Quick Start

Run the find-orphaned-meta detection script at .claude/skills/find-orphaned-meta/scripts/find-orphaned-meta.sh to list orphaned .meta files and then confirm deletion when prompted.

Frequently Asked Questions about find-orphaned-meta

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

FAQPage Schema
How do I find orphaned .meta files in a Unity project after deleting assets?

To find orphaned .meta files, run the find-orphaned-meta shell script to scan the Assets and Packages directories, producing a newline-separated list of .meta paths whose corresponding assets or folders no longer exist.

Why does Unity show warnings about missing assets after a branch switch or merge?

Unity shows warnings because orphaned .meta files are left behind when assets or folders are deleted during branch switches, merges, or manual edits, causing the editor to look for missing references.

Can I automatically delete orphaned .meta files in my Unity repository?

You can delete orphaned .meta files using the included shell script, which supports optional interactive deletion that only proceeds after you explicitly confirm the removal of the listed files.

Does the orphaned .meta cleanup script work on both Assets and Packages directories?

Yes, the cleanup script scans both the Assets and Packages directories in your Unity repository to detect and report any .meta files that have lost their corresponding asset or folder.

What is the best way to clean up stale Unity .meta files without removing valid assets?

The best way is to use a detection script that lists orphaned .meta files first, allowing you to review the newline-separated paths and confirm deletion interactively to ensure valid assets remain untouched.

Do I need any special dependencies to run a shell script for removing orphaned .meta files?

No special dependencies are required; the Skill relies on a basic shell script with no external dependencies, allowing you to diagnose and clean up orphaned .meta files directly in your Unity repository.