repo-cleanup

repo-cleanup is a skill for Claude Code from parisgroup-ai/imersao-ia-setup. It costs 145 tokens per session (5,231 once invoked), scanned C, original, MIT.

A repository-cleaning workflow for finding old or unused files such as abandoned scripts, stale test artifacts, backup files, and obsolete migrations. A repository is the project folder tracked by version control such as Git.

In plain words
What is it for?
Use it to inspect legacy files across JavaScript, TypeScript, Python, Rust, Go, PHP, or mixed repositories. It checks imports, scripts, dynamic references, and CI configuration before suggesting cleanup.
Why use it?
It reduces the risk of deleting something still used by searching for references before proposing removal and asking for confirmation before deletion.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the imersao plugin — 74 skills, 7 commands shipped together

Good fit Use it to inspect legacy files across JavaScript, TypeScript, Python, Rust, Go, PHP, or mixed repositories. It checks imports, scripts, dynamic references, and CI configuration before suggesting cleanup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/parisgroup-ai/imersao-ia-setup/repo-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add parisgroup-ai/imersao-ia-setup --skill repo-cleanup
Clone the repo
git clone --depth 1 https://github.com/parisgroup-ai/imersao-ia-setup

Made for: Claude Code.

Or install imersao, the plugin that ships this one along with the rest of its 74 skills, 7 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for repo-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/parisgroup-ai/imersao-ia-setup/repo-cleanup/github.svg)](https://agentmods.dev/skills/parisgroup-ai/imersao-ia-setup/repo-cleanup)
Your own site
<a href="https://agentmods.dev/skills/parisgroup-ai/imersao-ia-setup/repo-cleanup"><img src="https://agentmods.dev/badge/skills/parisgroup-ai/imersao-ia-setup/repo-cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for repo-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/parisgroup-ai/imersao-ia-setup/repo-cleanup"><img src="https://agentmods.dev/badge/skills/parisgroup-ai/imersao-ia-setup/repo-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,231 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00145 $0.05231
Opus 5.5 $0.00058 $0.02092
Sonnet 5.5 $0.00029 $0.01046
Haiku 4.5 $0.00015 $0.00523

Measured 21d ago against content hash 02323a762003, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

repo-cleanup scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Nunca `rm -rf` diretamente em pastas rastreadas
plugins/imersao/skills/repo-cleanup/SKILL.md · 411 lines

How it starts

The opening of the file, as written. The whole thing — 411 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repo Cleanup Skill

Remove lixo acumulado em repositórios de forma segura e interativa. Detecta artefatos legados, apresenta em batches por categoria, e só deleta após confirmação explícita.

Core Principle

Repositórios acumulam lixo silenciosamente. O .gitignore protege o que nunca deveria entrar, mas arquivos já commitados (screenshots de teste antigos, docs de features removidas, scripts abandonados) só saem com intervenção manual. Essa skill faz a arqueologia, você aprova.

Segurança primeiro: in_degree=0 mente. Re-export chains, dynamic imports, CI YAML references, scripts npm run — tudo escapa de uma busca ingênua. Sempre verificar referências antes de propor deleção — busque em todo o repo com grep/ripgrep (basename, caminho da pasta e imports dinâmicos).

Code Search Order (busca por referências)

Antes de propor git rm em qualquer arquivo de código, módulo, ou pasta legada, procure referências no repositório inteiro com grep/ripgrep:

Pergunta Como verificar
"<file> tem importadores?" grep -rn "modulo" --include='*.ts' --include='*.tsx' (teste basename E caminho relativo)
"Quem usa <symbol> exportado?" grep -rn "<symbol>" no repo inteiro
"Asset /public/foo.png é referenciado?" grep -rn "foo.png" (assets carregam por string, não import)
Docs órfãs (.md sem links em outros .md) grep -rn "nome-do-doc" (links são plain-text)
Scripts em package.json/CI YAML grep -rn "nome-do-script" (configs são plain-text)

Atenção com imports indiretos: git rm em arquivo com re-export chain ou dynamic import quebra runtime sem aviso (CI passa, prod cai). grep por basename perde import X from './foo' quando o arquivo se chama foo/index.ts — então busque também pelo caminho da pasta e por imports dinâmicos (import(, require(). Na dúvida, não delete: liste para revisão manual.

Fluxo Geral

0. BASELINE              → lista de arquivos TRACKED pelo git (fonte única de verdade)
1. DETECTAR stack        → adapta heurísticas ao projeto
2. SCAN por categoria    → coleta candidatos (operando SEMPRE sobre o baseline)
3. VERIFICAR references  → grep cruzado antes de marcar lixo
4. APRESENTAR em batches → user aprova/rejeita/refina por categoria
5. EXECUTAR deleções     → git rm em commits separados por categoria
6. RELATÓRIO final       → resumo do que foi removido + bytes liberados

Read the full file on GitHub · 411 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 21d ago First seen · 411 lines · 145 tokens per session scan C 02323a762003

Subscribe to this mod's changes

repo-cleanup is a skill published in the GitHub repository parisgroup-ai/imersao-ia-setup (1 stars, last pushed 20d ago), licensed MIT. It adds 145 tokens to every session and 5,231 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-06.

Related

Other skills, from other repositories

pr-create

Generate a PR description and create a GitHub pull request. Invoke when user wants to create a pull request, says "create a PR", "submit a PR", "open a pull request", or uses /pr-create. Requires user confirmation before creating the PR (irreversible GitHub action). Writes terse descriptions and supports ticket…

kanopi/cms-cultivator · 70 tokens

commit-message-generator

Automatically generate conventional commit messages when user has staged changes and mentions committing. Analyzes git diff and status to create properly formatted commit messages following conventional commits specification. AI attribution comes from the tool's own trailer (Claude Code's Co-Authored-By); the skill…

kanopi/cms-cultivator · 87 tokens

pr-release

Generate changelog entries, a deployment checklist, and update a release PR description. Invoke when user asks to prepare a release, generate a changelog, create a deployment checklist, or uses /pr-release. Requires user confirmation before updating the PR (modifies publicly visible content). Supports version numbers…

kanopi/cms-cultivator · 71 tokens

drupalorg-contribution-helper

Quick help with drupal.org contribution workflows including git commands, branch naming, issue fork setup, and merge request creation. Invoke when user asks "how do I contribute to drupal.org?", "drupal.org git workflow", "issue fork", "drupal merge request", or needs help with git.drupalcode.org commands.

kanopi/cms-cultivator · 73 tokens

drupal-contribute

Full drupal.org contribution workflow — create an issue and set up a merge request together. Invoke when user wants to contribute to a Drupal module, says "contribute to drupal.org", "create a drupal.org issue and MR", or uses /drupal-contribute. Requires user interaction at two manual steps (CAPTCHA-protected issue…

kanopi/cms-cultivator · 101 tokens

worktree-manager

Create, list, and tear down git worktrees following Kanopi's branch naming conventions so developers and agents can work multiple tickets in parallel without clobbering each other's working tree. Creates a new branch, or attaches a worktree to a branch that already exists locally or on origin. Handles DDEV isolation…

kanopi/cms-cultivator · 224 tokens