unused-file-cleanup
Skill0 starsChanged 9 days agoApache-2.0View on GitHub
Find tracked files, scripts, and modules in the Solo Empire root repository that nothing references, verify each candidate, and propose or apply an approved, scoped cleanup. Use when asked to find or remove unused, dead, orphaned, or stale files (for example "หาไฟล์ที่ไม่ได้ใช้", "ลบไฟล์ที่ไม่ได้ใช้", "dead code", "orphan files").
In this repository27 other files it gives its agents.
- ai-agentsSkill
- ai-agent-workflowsSkill
- ai-native-estimationSkill
- ai-product-deliverySkill
- book-dev-engineering-loopSkill
- business-analysisSkill
- client-discovery-and-proposalsSkill
- content-distributionSkill
- data-engineeringSkill
- flow-videoSkill
- game-engineeringSkill
- govern-ai-skillsSkill
- graphic-designSkill
- lead-research-and-crmSkill
- main-only-developmentSkill
- product-managementSkill
- product-ownerSkill
- project-managementSkill
- qa-testingSkill
- security-and-privacySkill
- skill-templateSkill
- solo-empire-operatorSkill
- solution-architectureSkill
- subagent-orchestrationSkill
- system-docpackSkill
- ux-reviewSkill
- xr-engineeringSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Check scheduled or external callers: Taskfiles under infra/tasks/, .github/workflows/, cron/systemd/Task Scheduler definitions, Docker and …
- Distinctive: line 47
Never delete without an explicit yes in chat for that set of files.
≈ “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
Unused File Cleanup
Overview
task cleanup:unused runs a read-only scan that lists tracked files whose
filename (or module stem for code) appears in no other tracked text file. The
scan never deletes, moves, or stages anything. A candidate is only a lead:
every removal needs verification and explicit approval.
Workflow
- Run
task cleanup:unused -- --kind codefirst (scripts and modules), thentask cleanup:unused -- <path-prefix>for a focused area. Use--jsonwhen the result feeds another step. - Verify each candidate before classifying it:
rg -n "<stem>"across the repo, including dynamic forms (glob patterns, string-built paths,run-python3wrappers,importlib, CLI names).- Check scheduled or external callers: Taskfiles under
infra/tasks/,.github/workflows/, cron/systemd/Task Scheduler definitions, Docker and compose files, andpackage.jsonscripts. git log --oneline -3 -- <path>for intent; a recent commit usually means work in progress.
- Classify every candidate as
keep,archive, ordelete, with a one-line reason, and present the table to the user. - Apply only the rows the user approves:
git rm <path>per file (nevergit add .), orgit mvintoinfra/scripts/archive/one-off/for archive. Update any doc or catalog that listed the file. - Run the checks for the touched area (
task test,task typecheck,task docs:check), then commit only the scoped paths.
Decision rules
- Referenced only by dynamic paths, a scheduler, or an external system →
keep. - Product or content asset (
catalog/,media/, client deliverables, templates,.docx) →keep; these are consumed by people, not code. - One-off fix or migration script already applied →
archiveordelete. - Duplicate of a newer file (
*_v2,*-old,copy) →deleteafter confirming the newer file is the one referenced. - Last commit within 14 days → ask before any action.
- Anything under
data/,artifacts/,diary/, nested repositories, or generated sub-agent files → out of scope; the scan already excludes them. - Never delete without an explicit yes in chat for that set of files.
Resources
infra/scripts/utils/unused_files.py— the read-only scanner (contractsolo-empire.unused-files.v1); run throughtask cleanup:unused.
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.

