Repo Clean
Clean a repository of unused files and folders with evidence and owner approval, delivering a numbered list of candidates for deletion and the owner's selected deletions.
Editor's Note
A git repository is required. Read the repository's instruction files (e.g., `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING`, the README) for its checks, CI commands, and rules on what belongs in the repository. A rule there, such as "plans are not committed," can move an unlinked document from NEEDS-DECISION to REMOVE. The session authorizes the deletion, which needs the owner's pick of numbers.
When to Use It
- Cleaning a repository of test output, coverage reports, and build leftovers
- Finding unused files and folders safe for deletion
- Processing a list of paths provided by the user for deletion from the working tree
SKILL.md
SkillsHunter provides this listing for informational purposes only. Review the skill’s source, license, and required permissions before use. You are responsible for deciding whether to install or run it. Terms of Use
Clean a repository of files nothing uses, with proof and the owner's pick
Internal method ID: andino-repo-clean (alias: repo-clean).
Andino Workflow Member Skill Operates under Andino Workflow: proportional investigation, evidence-based decisions, one durable checkpoint and clean handoff. Do not invoke the workflow recursively. Loading this resource changes neither tools nor permissions.
Purpose
Repositories collect files nobody reads any more: test and coverage output, caches, build leftovers, old plans and specs, trial notes, one-off reports. Removing them is easy; removing only them is not. A filename search misses a template read through a path built at runtime, a data file shipped by a package manifest and a page that only the docs-site nav links, and it calls a folder "in use" when a test names it but never opens it. This skill works on whole files and folders. It finds what uses each candidate, shows the owner a numbered list with the evidence for every row, deletes exactly the numbers the owner picks, and reports in chat. The deliverable is that list, the owner's pick, those deletions, and nothing new in the repository.
Breaking the letter of a rule here is breaking its spirit. "I kept the intent" is not a way around any rule below.
Trigger and non-trigger
Use when:
- someone asks to clean a repository of leftovers: test or coverage output, build artifacts, caches, logs, old plans, specs, trial notes, temporary reports;
- someone asks which files are unused, stale or safe to delete;
- someone gives you a list of paths to delete from the working tree.
Do not select for:
- Merged branches, stale worktrees or other Git refs:
git-skills. - Dead code, unused functions or imports inside files:
code-simplification. - Retiring an API, a feature, a dependency or a file that people outside the repository read:
deprecation-and-migration. - Freeing disk space outside the repository (global caches, container images): not this skill.
Select a resource, not a second lifecycle
Load only the resource the current step names. It runs inside this procedure and current authority; it starts no second plan.
| Current need | Resource | Skip when |
|---|---|---|
| Status commands, consumer mechanisms, the trial removal, file-open tracing, evidence levels, regenerability | evidence | Never before step 2 |
| The list format, the question, applying the pick, the report and commit text | list and apply | Never before step 5 |
| One cleanup end to end | worked example | The steps are already clear |
Prerequisites
- A git repository. Without one, nothing can be recovered after a deletion: stop and say so.
- Read the repository's instruction files (
AGENTS.md,CLAUDE.md,CONTRIBUTING, the README) for its checks, its CI and its own rules on what belongs in the repository. A rule there, such as "plans are not committed", can move an unlinked document from NEEDS-DECISION to REMOVE. - Note what the session authorizes. A deletion needs the owner's pick of numbers; a commit or a push needs its own approval.
Procedure
Seven steps, in order. Each ends with a Done when line.
- Set the scope and the exclusions. Find the repository root, its checks and the commands CI
runs. Build the exclusion set before you look at candidates:
.env*files, anything that looks like a credential or a key, tracked files with uncommitted changes, a submodule or any folder with its own.git, symlinks, and paths outside the repository. Excluded paths are never listed, moved or deleted. When the user names paths, those are the only candidates: skip discovery, but still apply the exclusions, check each path by behaviour where step 4 can, and re-check in step 6. Done when the root, the checks, the CI commands, the repository's own rules and the exclusion set are written down. - Take the inventory. Run
git ls-files,git status --porcelain --ignoredandgit clean -ndX(a dry run that only lists); the status commands cover the rest. Give each candidate a status: tracked, untracked and ignored, or untracked and not ignored. For a path that is ignored and tracked at once,git ls-fileswins: it is tracked. Add the file count and size. Done when every candidate has a status, a file count and a size. - Search for consumers by mechanism. For each candidate, search every mechanism in
evidence: CI configuration, package manifests,
paths built at runtime, globs, tool configuration, entry-document links and the docs-site nav.
A grep for the filename is one search, not proof: it cannot see a glob or an assembled path.
Apply the official documentation rule: a document linked from an entry document (README,
AGENTS.md,CLAUDE.md, CONTEXT, CONTRIBUTING, a docs index) or the docs-site nav, a standard governance file (LICENSE, NOTICE, SECURITY, CHANGELOG, CODEOWNERS, ADRs) or a file shipped in the package is official and stays. An unlinked document goes to NEEDS-DECISION unless the repository's own rule says that kind of file does not belong. Use knip or vulture when they are already installed; never install them. Done when each candidate lists the mechanisms searched and every consumer found, with its file and line. - Check by behaviour. For tracked candidates, run a trial removal in a throwaway worktree outside the repository: remove the candidates there, run the repository's checks and the commands CI runs that can run locally, then remove the worktree (recipe). If a check fails, split the batch until you find the file it needs; that file is KEEP, and you never edit a check to make a removal pass. Where a trace is cheap, record which files the checks open. Give each tracked candidate one evidence level: "trial removal green with ", "never opened in a trace", or "static search only". A passing trial removal never proves non-use alone: a consumer by mechanism (a package manifest, the docs-site nav, readers outside the repository) keeps the file whatever the trial says. An untracked candidate is not in a fresh worktree, so its evidence is regenerability: it comes back only when a named command in the repository produces it (a build script, a test runner option in its config); without one it is personal data and not recoverable. Done when every tracked candidate has an evidence level, every untracked one has its named command or "no named command", and the throwaway worktree is gone.
- Try to refute, then show the list. For every row you would mark REMOVE, look once more for
the consumer a trial cannot see, and move the row when you find one. Then print the numbered
list in the list and apply format, add
.gitignoreproposals only for paths a named command regenerates, and ask one question: "Which numbers should I delete?" Stop there. Done when the list is shown, nothing is deleted or moved, and the question is asked. - Delete only the picked numbers. Re-check each picked path right before deleting it: its
status, uncommitted changes, and any consumer added since the list. Skip a path that changed
and say why. Delete tracked paths with
git rmand untracked paths with a plain delete. Never move, copy, compress or back up a candidate. Done when exactly the picked paths are gone, apart from skipped ones with their reason. - Verify and report in chat. Rerun the checks. Run
git status --porcelain --ignored, look at the parent folder, and confirm you created no file in either. Report in chat what was deleted, how each path comes back (a tracked path from git history; an untracked path from its named command, or not recoverable), what was skipped and the check results. Offer the note for the team as commit-message or pull-request text. Done when the report is in chat, the checks ran after the deletion, and nothing was committed or pushed without approval.
Rules for every cleanup
Ask before deleting
Nothing is deleted until its number is picked. A request that names no paths ("just delete it", "no need to ask") is a request for a fast list, not approval: show the list sooner, then ask. A request that names paths approves those paths and no others. When the same request also asks that nothing be lost for good, and a named path is untracked with no named command that regenerates it, those two instructions conflict: delete the other named paths, say which ones cannot come back, and ask before deleting those.
Delete, never archive
Always delete, never archive. Tracked files come back from git history; untracked files the owner
picked are approved as gone. No cleanup report, note, state file or archive goes into the
repository or next to it: no docs/archive/, no cleanup summary, no tarball beside the
repository, no copy in a temp folder. The note for the team goes in chat, or into commit or
pull-request text the owner approves. Two excuses fail here every time:
a backup next to the repository is an archive, and an uncommitted note is still a report.
Untracked files
An untracked file that is not ignored gets one row per path and is marked not recoverable unless a
named command regenerates it. Ignored caches that a named command regenerates (__pycache__/,
.pytest_cache/, node_modules/) may share one row per pattern. "Can be regenerated" without a
named command that the repository's config confirms is a guess.
Never listed
.env* files, credentials and keys, tracked files with uncommitted changes, and a submodule or
nested repository are never listed and never touched, whatever the request says.
Evidence, not names
A filename, a folder name, a date or "looks unused" is not evidence. Every row carries the mechanisms searched and its evidence. A test that names a path may never open it: read what the test does with the path.
Stay in scope
Whole files and folders only. Never edit code inside a file, never touch branches or worktrees other than your own throwaway one, never install tools, and never commit or push without the owner's approval.
Shortcuts that break a cleanup
| Shortcut | What to do instead |
|---|---|
| "The owner said just delete it, no questions." | The request names no paths. Show the list fast and ask which numbers. |
| "Without a backup the untracked files are lost for good, so I made one." | A backup next to the repository is an archive. If the owner also asked that nothing be lost, ask about those paths; otherwise they picked them as gone, so say so in the report. |
| "The project wants notes in the PR, so I left the note uncommitted in the repository." | An uncommitted note is still a report. Put it in chat or in the PR text. |
| "It can be regenerated by running the tests." | Name the command and check that the repository's config makes it produce that path. |
| "The test names this folder, so it is used." | Read whether the test opens it. A name in a list is not a read. |
| "Grep finds no reference, so it is unused." | A grep cannot see a glob, an assembled path, a manifest or the docs nav. Search by mechanism. |
| "The checks pass without it." | A passing trial removal never proves non-use alone. Check packaging, the docs nav and outside readers. |
| "These untracked files are all output; one yes covers the group." | One row per path for untracked files that are not ignored. |
| "The check only fails on a hard-coded path; I'll update the check." | Never edit a check to make a removal pass. The file is KEEP. |
| "I'll commit the cleanup while I'm at it." | A commit needs its own approval. Offer the commit text. |
Red flags
- A delete, move or
git rmbefore the owner picked numbers. - A tar, zip, copy or "backup" of a candidate anywhere.
- A new file in the repository or its parent folder after the cleanup.
- A row without evidence, or one whose only evidence is its name or age.
- "Can be regenerated" with no named command.
- A check edited during the trial removal.
.env*, a credential, a file with uncommitted changes or a submodule in the list.- A commit or push the owner did not approve.
Ownership and permission boundary
Andino coordinates selection, shared progress and final status from evidence; this skill owns its
procedure, resources and checks, which coordinator brevity never truncates. Loading it grants no
authority: it deletes only the paths the owner picked, creates no file in the repository, and
authorizes no commit, push, merge, installation or external message. Branches and worktrees
belong to git-skills, code inside files to code-simplification, and public APIs and features
to deprecation-and-migration.
Output
Before the pick: the list in the list and apply format and one question. After the deletion, this report in chat:
Deleted: <path> (tracked, back from git history); <path> (untracked, regenerated by <command>); <path> (untracked, not recoverable)
Skipped: <path - what changed>, or "none"
Checks after deletion: <command - result>
Kept: <path - the consumer or failing check that keeps it>, or "as in the list"
Proposed .gitignore lines: <pattern - the command that regenerates it>, or "none"
Team note: <commit-message or PR text, offered, not committed>
Verification
Before you call the cleanup done, confirm:
- the exclusion set was built before the list, and nothing in it was listed or touched;
- every row names the mechanisms searched;
- every tracked row has one evidence level, and only rows with a trial removal or a trace are REMOVE;
- every untracked row is its own row with its named command or "not recoverable", or an ignored cache with a named command;
- nothing was deleted before the owner picked numbers, and only those paths were deleted;
- each picked path was re-checked right before its deletion;
- no new file exists in the repository or its parent folder;
- the checks ran after the deletion and the report is in chat;
- nothing was committed or pushed without approval.
These checks are properties of one cleanup. How a given model follows this skill needs a real run to show.
Worked example and anti-pattern
The worked example cleans a small Node service: a build folder
regenerated by npm run build, coverage output, a committed load-test note, fixtures read through
a directory listing and a page that only the docs sidebar links, with the list, a pick of two
numbers, the re-check and the report.
Anti-pattern: the agent picks files by name (*PLAN*.md, *REPORT*.md), moves them into
docs/archive/, writes a cleanup summary beside them, and reports "safe, no references found"
from a filename grep.
Fallback
- Not a git repository: stop before listing; nothing could be recovered.
- No checks and no CI commands that run locally: every tracked row is "static search only" and goes to NEEDS-DECISION, never REMOVE.
- The host cannot create a worktree or run the checks without installing something: install nothing, say which evidence is missing, and mark those rows "static search only".
- The owner cannot be reached: show the list and stop; delete nothing.
Local resources
- Evidence
- List and apply
- Worked example
- Notices and credits: references/license.md.
Operational example (offline)
This fixture checks the order of decisions for one row: exclusions first, then consumers, then the untracked rules, then the evidence level. It does not measure how well an agent searches.
import os
CREDENTIAL_HINTS = ("credential", "secret", "token", "id_rsa", ".pem", ".key")
def row_kind(path, tracked, dirty, ignored, nested_repo, consumers, evidence, regenerator):
name = path.rstrip("/").rsplit("/", 1)[-1].lower()
if name.startswith(".env") or any(hint in name for hint in CREDENTIAL_HINTS):
return "exclude"
if dirty or nested_repo:
return "exclude"
if consumers:
return "keep"
if not tracked:
return "group" if ignored and regenerator else "decide"
if evidence == "static search only":
return "decide"
return "remove"
if __name__ == "__main__":
cases = {
"env_file": ((".env.local", False, False, True, False, [], "", None), "exclude"),
"dirty": (("CHANGES-draft.md", True, True, False, False, [], "trial", None), "exclude"),
"nested_repo": (("vendor/lib/", True, False, False, True, [], "", None), "exclude"),
"packaged": (("data/rates.csv", True, False, False, False, ["MANIFEST.in:2"], "trial", None), "keep"),
"cache": ((".pytest_cache/", False, False, True, False, [], "", "pytest"), "group"),
"notes": (("my-notes.md", False, False, False, False, [], "", None), "decide"),
"no_checks": (("docs/old-plan.md", True, False, False, False, [], "static search only", None), "decide"),
"stale_plan": (("docs/old-plan.md", True, False, False, False, [], "trial", None), "remove"),
}
for case, (args, expected) in cases.items():
assert row_kind(*args) == expected, case
raise SystemExit(1 if os.environ.get("ANDINO_NEGATIVE") == "1" else 0)
Provenance
Adapted from buildwithclaude's cleanup skill (davepoon/buildwithclaude
plugins/all-skills/skills/cleanup, commit b3c5e88) under the MIT license: one read-only scan,
numbered REMOVE, NEEDS-DECISION and KEEP groups, a single confirmation, deleting only the picked
rows, and re-checking each row just before acting. Ideas, not text, come from Qwen Code's
find-simplifications (QwenLM/qwen-code, commit 2312b90, Apache-2.0): name every consumer by its
mechanism, a search blind to that mechanism proves nothing, and survey from a throwaway worktree;
and from Trail of Bits' git-cleanup (trailofbits/skills, commit 123037e, CC-BY-SA-4.0): try to
disprove each delete recommendation, and "looks stale" is not evidence. Cortex's repo-cleanup
(NickCrew/claude-cortex, commit 46a6ada, MIT) is the counter-example: candidates chosen by
filename, moved into an archive folder, with a summary written into the repository. The evidence
levels, per-path approval for untracked files, the rule against any artifact in or beside the
repository, the official-documentation rule and the excuse table, drawn from a 2026-11-29
baseline run, are Andino additions. Notices and credits are in
references/license.md.
View original Markdown
---
name: andino-repo-clean
description: Use when asked to clean a repository of leftover whole files or folders (test output, coverage and build leftovers, caches, old plans, specs, trial notes, temporary reports), or to find which files nothing uses and are safe to delete. Operates under Andino Workflow governance.
---
# Clean a repository of files nothing uses, with proof and the owner's pick
Internal method ID: `andino-repo-clean` (alias: `repo-clean`).
> **Andino Workflow Member Skill**
> Operates under Andino Workflow: proportional investigation, evidence-based
> decisions, one durable checkpoint and clean handoff. Do not invoke the workflow
> recursively. Loading this resource changes neither tools nor permissions.
## Purpose
Repositories collect files nobody reads any more: test and coverage output, caches, build
leftovers, old plans and specs, trial notes, one-off reports. Removing them is easy; removing
only them is not. A filename search misses a template read through a path built at runtime, a
data file shipped by a package manifest and a page that only the docs-site nav links, and it
calls a folder "in use" when a test names it but never opens it. This skill works on whole files
and folders. It finds what uses each candidate, shows the owner a numbered list with the evidence
for every row, deletes exactly the numbers the owner picks, and reports in chat. The deliverable
is that list, the owner's pick, those deletions, and nothing new in the repository.
Breaking the letter of a rule here is breaking its spirit. "I kept the intent" is not a way
around any rule below.
## Trigger and non-trigger
Use when:
- someone asks to clean a repository of leftovers: test or coverage output, build artifacts,
caches, logs, old plans, specs, trial notes, temporary reports;
- someone asks which files are unused, stale or safe to delete;
- someone gives you a list of paths to delete from the working tree.
Do not select for:
- Merged branches, stale worktrees or other Git refs: `git-skills`.
- Dead code, unused functions or imports inside files: `code-simplification`.
- Retiring an API, a feature, a dependency or a file that people outside the repository read:
`deprecation-and-migration`.
- Freeing disk space outside the repository (global caches, container images): not this skill.
## Select a resource, not a second lifecycle
Load only the resource the current step names. It runs inside this procedure and current
authority; it starts no second plan.
| Current need | Resource | Skip when |
| :--- | :--- | :--- |
| Status commands, consumer mechanisms, the trial removal, file-open tracing, evidence levels, regenerability | [evidence](resources/evidence.md) | Never before step 2 |
| The list format, the question, applying the pick, the report and commit text | [list and apply](resources/list-and-apply.md) | Never before step 5 |
| One cleanup end to end | [worked example](resources/worked-example.md) | The steps are already clear |
## Prerequisites
- A git repository. Without one, nothing can be recovered after a deletion: stop and say so.
- Read the repository's instruction files (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING`, the README)
for its checks, its CI and its own rules on what belongs in the repository. A rule there, such
as "plans are not committed", can move an unlinked document from NEEDS-DECISION to REMOVE.
- Note what the session authorizes. A deletion needs the owner's pick of numbers; a commit or a
push needs its own approval.
## Procedure
Seven steps, in order. Each ends with a **Done when** line.
1. **Set the scope and the exclusions.** Find the repository root, its checks and the commands CI
runs. Build the exclusion set before you look at candidates: `.env*` files, anything that looks
like a credential or a key, tracked files with uncommitted changes, a submodule or any folder
with its own `.git`, symlinks, and paths outside the repository. Excluded paths are never
listed, moved or deleted. When the user names paths, those are the only candidates: skip
discovery, but still apply the exclusions, check each path by behaviour where step 4 can, and
re-check in step 6. Done when the root, the checks, the CI commands, the repository's own rules
and the exclusion set are written down.
2. **Take the inventory.** Run `git ls-files`, `git status --porcelain --ignored` and
`git clean -ndX` (a dry run that only lists); the [status commands](resources/evidence.md#status-commands)
cover the rest. Give each candidate a status: tracked, untracked and ignored, or untracked and
not ignored. For a path that is ignored and tracked at once, `git ls-files` wins: it is tracked.
Add the file count and size. Done when every candidate has a status, a file count and a size.
3. **Search for consumers by mechanism.** For each candidate, search every mechanism in
[evidence](resources/evidence.md#consumer-mechanisms): CI configuration, package manifests,
paths built at runtime, globs, tool configuration, entry-document links and the docs-site nav.
A grep for the filename is one search, not proof: it cannot see a glob or an assembled path.
Apply the official documentation rule: a document linked from an entry document (README,
`AGENTS.md`, `CLAUDE.md`, CONTEXT, CONTRIBUTING, a docs index) or the docs-site nav, a standard
governance file (LICENSE, NOTICE, SECURITY, CHANGELOG, CODEOWNERS, ADRs) or a file shipped in
the package is official and stays. An unlinked document goes to NEEDS-DECISION unless the
repository's own rule says that kind of file does not belong. Use knip or vulture when they are
already installed; never install them. Done when each candidate lists the mechanisms searched
and every consumer found, with its file and line.
4. **Check by behaviour.** For tracked candidates, run a trial removal in a throwaway worktree
outside the repository: remove the candidates there, run the repository's checks and
the commands CI runs that can run locally, then remove the worktree ([recipe](resources/evidence.md#trial-removal)).
If a check fails, split the batch until you find the file it needs; that file is KEEP, and you
never edit a check to make a removal pass. Where a trace is cheap, record which files the
checks open. Give each tracked candidate one evidence level: "trial removal green with
<checks>", "never opened in a trace", or "static search only". A passing trial removal never
proves non-use alone: a consumer by mechanism (a package manifest, the docs-site nav, readers
outside the repository) keeps the file whatever the trial says. An untracked candidate is not
in a fresh worktree, so its evidence is regenerability: it comes back only when a named command
in the repository produces it (a build script, a test runner option in its config); without one
it is personal data and not recoverable. Done when every tracked candidate has an evidence
level, every untracked one has its named command or "no named command", and the throwaway
worktree is gone.
5. **Try to refute, then show the list.** For every row you would mark REMOVE, look once more for
the consumer a trial cannot see, and move the row when you find one. Then print the numbered
list in the [list and apply](resources/list-and-apply.md#the-list) format, add `.gitignore`
proposals only for paths a named command regenerates, and ask one question: "Which numbers
should I delete?" Stop there. Done when the list is shown, nothing is deleted or moved, and the
question is asked.
6. **Delete only the picked numbers.** Re-check each picked path right before deleting it: its
status, uncommitted changes, and any consumer added since the list. Skip a path that changed
and say why. Delete tracked paths with `git rm` and untracked paths with a plain delete. Never
move, copy, compress or back up a candidate. Done when exactly the picked paths are gone,
apart from skipped ones with their reason.
7. **Verify and report in chat.** Rerun the checks. Run `git status --porcelain --ignored`, look
at the parent folder, and confirm you created no file in either. Report in chat what was
deleted, how each path comes back (a tracked path from git history; an untracked path from its
named command, or not recoverable), what was skipped and the check results. Offer the note for
the team as commit-message or pull-request text. Done when the report is in chat, the checks
ran after the deletion, and nothing was committed or pushed without approval.
## Rules for every cleanup
### Ask before deleting
Nothing is deleted until its number is picked. A request that names no paths ("just delete it",
"no need to ask") is a request for a fast list, not approval: show the list sooner, then ask. A
request that names paths approves those paths and no others. When the same request also asks
that nothing be lost for good, and a named path is untracked with no named command that
regenerates it, those two instructions conflict: delete the other named paths, say which ones
cannot come back, and ask before deleting those.
### Delete, never archive
Always delete, never archive. Tracked files come back from git history; untracked files the owner
picked are approved as gone. No cleanup report, note, state file or archive goes into the
repository or next to it: no `docs/archive/`, no cleanup summary, no tarball beside the
repository, no copy in a temp folder. The note for the team goes in chat, or into commit or
pull-request text the owner approves. Two excuses fail here every time:
a backup next to the repository is an archive, and an uncommitted note is still a report.
### Untracked files
An untracked file that is not ignored gets one row per path and is marked not recoverable unless a
named command regenerates it. Ignored caches that a named command regenerates (`__pycache__/`,
`.pytest_cache/`, `node_modules/`) may share one row per pattern. "Can be regenerated" without a
named command that the repository's config confirms is a guess.
### Never listed
`.env*` files, credentials and keys, tracked files with uncommitted changes, and a submodule or
nested repository are never listed and never touched, whatever the request says.
### Evidence, not names
A filename, a folder name, a date or "looks unused" is not evidence. Every row carries the
mechanisms searched and its evidence. A test that names a path may never open it: read what the
test does with the path.
### Stay in scope
Whole files and folders only. Never edit code inside a file, never touch branches or worktrees
other than your own throwaway one, never install tools, and never commit or push without the
owner's approval.
## Shortcuts that break a cleanup
| Shortcut | What to do instead |
| --- | --- |
| "The owner said just delete it, no questions." | The request names no paths. Show the list fast and ask which numbers. |
| "Without a backup the untracked files are lost for good, so I made one." | A backup next to the repository is an archive. If the owner also asked that nothing be lost, ask about those paths; otherwise they picked them as gone, so say so in the report. |
| "The project wants notes in the PR, so I left the note uncommitted in the repository." | An uncommitted note is still a report. Put it in chat or in the PR text. |
| "It can be regenerated by running the tests." | Name the command and check that the repository's config makes it produce that path. |
| "The test names this folder, so it is used." | Read whether the test opens it. A name in a list is not a read. |
| "Grep finds no reference, so it is unused." | A grep cannot see a glob, an assembled path, a manifest or the docs nav. Search by mechanism. |
| "The checks pass without it." | A passing trial removal never proves non-use alone. Check packaging, the docs nav and outside readers. |
| "These untracked files are all output; one yes covers the group." | One row per path for untracked files that are not ignored. |
| "The check only fails on a hard-coded path; I'll update the check." | Never edit a check to make a removal pass. The file is KEEP. |
| "I'll commit the cleanup while I'm at it." | A commit needs its own approval. Offer the commit text. |
## Red flags
- A delete, move or `git rm` before the owner picked numbers.
- A tar, zip, copy or "backup" of a candidate anywhere.
- A new file in the repository or its parent folder after the cleanup.
- A row without evidence, or one whose only evidence is its name or age.
- "Can be regenerated" with no named command.
- A check edited during the trial removal.
- `.env*`, a credential, a file with uncommitted changes or a submodule in the list.
- A commit or push the owner did not approve.
## Ownership and permission boundary
Andino coordinates selection, shared progress and final status from evidence; this skill owns its
procedure, resources and checks, which coordinator brevity never truncates. Loading it grants no
authority: it deletes only the paths the owner picked, creates no file in the repository, and
authorizes no commit, push, merge, installation or external message. Branches and worktrees
belong to `git-skills`, code inside files to `code-simplification`, and public APIs and features
to `deprecation-and-migration`.
## Output
Before the pick: the list in the [list and apply](resources/list-and-apply.md) format and one
question. After the deletion, this report in chat:
```text
Deleted: <path> (tracked, back from git history); <path> (untracked, regenerated by <command>); <path> (untracked, not recoverable)
Skipped: <path - what changed>, or "none"
Checks after deletion: <command - result>
Kept: <path - the consumer or failing check that keeps it>, or "as in the list"
Proposed .gitignore lines: <pattern - the command that regenerates it>, or "none"
Team note: <commit-message or PR text, offered, not committed>
```
## Verification
Before you call the cleanup done, confirm:
- [ ] the exclusion set was built before the list, and nothing in it was listed or touched;
- [ ] every row names the mechanisms searched;
- [ ] every tracked row has one evidence level, and only rows with a trial removal or a trace are
REMOVE;
- [ ] every untracked row is its own row with its named command or "not recoverable", or an
ignored cache with a named command;
- [ ] nothing was deleted before the owner picked numbers, and only those paths were deleted;
- [ ] each picked path was re-checked right before its deletion;
- [ ] no new file exists in the repository or its parent folder;
- [ ] the checks ran after the deletion and the report is in chat;
- [ ] nothing was committed or pushed without approval.
These checks are properties of one cleanup. How a given model follows this skill needs a real
run to show.
## Worked example and anti-pattern
[The worked example](resources/worked-example.md) cleans a small Node service: a build folder
regenerated by `npm run build`, coverage output, a committed load-test note, fixtures read through
a directory listing and a page that only the docs sidebar links, with the list, a pick of two
numbers, the re-check and the report.
Anti-pattern: the agent picks files by name (`*PLAN*.md`, `*REPORT*.md`), moves them into
`docs/archive/`, writes a cleanup summary beside them, and reports "safe, no references found"
from a filename grep.
## Fallback
- Not a git repository: stop before listing; nothing could be recovered.
- No checks and no CI commands that run locally: every tracked row is "static search only" and
goes to NEEDS-DECISION, never REMOVE.
- The host cannot create a worktree or run the checks without installing something: install
nothing, say which evidence is missing, and mark those rows "static search only".
- The owner cannot be reached: show the list and stop; delete nothing.
## Local resources
- [Evidence](resources/evidence.md)
- [List and apply](resources/list-and-apply.md)
- [Worked example](resources/worked-example.md)
- Notices and credits: [references/license.md](references/license.md).
## Operational example (offline)
This fixture checks the order of decisions for one row: exclusions first, then consumers, then
the untracked rules, then the evidence level. It does not measure how well an agent searches.
```python andino-operational-example
import os
CREDENTIAL_HINTS = ("credential", "secret", "token", "id_rsa", ".pem", ".key")
def row_kind(path, tracked, dirty, ignored, nested_repo, consumers, evidence, regenerator):
name = path.rstrip("/").rsplit("/", 1)[-1].lower()
if name.startswith(".env") or any(hint in name for hint in CREDENTIAL_HINTS):
return "exclude"
if dirty or nested_repo:
return "exclude"
if consumers:
return "keep"
if not tracked:
return "group" if ignored and regenerator else "decide"
if evidence == "static search only":
return "decide"
return "remove"
if __name__ == "__main__":
cases = {
"env_file": ((".env.local", False, False, True, False, [], "", None), "exclude"),
"dirty": (("CHANGES-draft.md", True, True, False, False, [], "trial", None), "exclude"),
"nested_repo": (("vendor/lib/", True, False, False, True, [], "", None), "exclude"),
"packaged": (("data/rates.csv", True, False, False, False, ["MANIFEST.in:2"], "trial", None), "keep"),
"cache": ((".pytest_cache/", False, False, True, False, [], "", "pytest"), "group"),
"notes": (("my-notes.md", False, False, False, False, [], "", None), "decide"),
"no_checks": (("docs/old-plan.md", True, False, False, False, [], "static search only", None), "decide"),
"stale_plan": (("docs/old-plan.md", True, False, False, False, [], "trial", None), "remove"),
}
for case, (args, expected) in cases.items():
assert row_kind(*args) == expected, case
raise SystemExit(1 if os.environ.get("ANDINO_NEGATIVE") == "1" else 0)
```
## Provenance
Adapted from buildwithclaude's `cleanup` skill (davepoon/buildwithclaude
`plugins/all-skills/skills/cleanup`, commit b3c5e88) under the MIT license: one read-only scan,
numbered REMOVE, NEEDS-DECISION and KEEP groups, a single confirmation, deleting only the picked
rows, and re-checking each row just before acting. Ideas, not text, come from Qwen Code's
`find-simplifications` (QwenLM/qwen-code, commit 2312b90, Apache-2.0): name every consumer by its
mechanism, a search blind to that mechanism proves nothing, and survey from a throwaway worktree;
and from Trail of Bits' `git-cleanup` (trailofbits/skills, commit 123037e, CC-BY-SA-4.0): try to
disprove each delete recommendation, and "looks stale" is not evidence. Cortex's `repo-cleanup`
(NickCrew/claude-cortex, commit 46a6ada, MIT) is the counter-example: candidates chosen by
filename, moved into an archive folder, with a summary written into the repository. The evidence
levels, per-path approval for untracked files, the rule against any artifact in or beside the
repository, the official-documentation rule and the excuse table, drawn from a 2026-11-29
baseline run, are Andino additions. Notices and credits are in
[references/license.md](references/license.md).
Community Reviews & Field Notes
Tried this skill on your own project? Share the model you used and the results you got.