원클릭으로
repo-cleanup
// Use for systematic repository cleanup: dead code removal, doc pruning, legacy cleanup
// Use for systematic repository cleanup: dead code removal, doc pruning, legacy cleanup
Three-layer bootstrap flow, dotbot patterns, and deployment order for Win dotfiles. Use when editing bootstrap.ps1, install.conf.yaml, or Setup-Dotfiles.ps1.
Use when working on PowerShell scripts, registry tweaks, or dotfile deployment in the Win repo. Covers conventions, Common.ps1 helpers, and path rules.
Use when validating changes in the Win repo. Per-change-type checks for PowerShell, dotbot, autounattend.xml, and guidance files.
Use to run the mandatory end-of-session workflow — file issues, run quality gates, push to remote, verify clean state, hand off context.
Use when orchestrating complex tasks across specialized agents with proper context handoff
Use when configuring or troubleshooting MCP servers for OpenCode/Kilo environments
| name | repo-cleanup |
| description | Use for systematic repository cleanup: dead code removal, doc pruning, legacy cleanup |
| compatibility | opencode |
Use this skill when asked to clean up a repository, organize folders, remove legacy code, prune documentation, or perform a full repo janitor pass. Prioritizes safety and reversibility.
Before deleting anything, identify what is executable/distributable code and what is guidance/docs.
| Category | Examples | Action |
|---|---|---|
| Code | .ps1, .bat, .ahk, .py, .js | Keep; refactor if needed |
| Config | .json, .yaml, .reg, .xml | Keep; validate format |
| Tests | *.Tests.ps1, test/ | Keep; move to canonical location |
| Docs | *.md, README, CHANGELOG | Review for duplication/staleness |
| Scripts | one-off helpers, scratch files | Evaluate; archive or delete |
| Build artifacts | dist/, node_modules/, .next/ | Delete; add to .gitignore |
Create a temporary inventory list before making changes.
Enforce the repo's canonical layout. For Ven0m0/Win:
Scripts/ — executable PowerShell automationScripts/Common.ps1 — shared helpers onlyScripts/auto/ — unattended install XML only (no flat scripts)user/.dotfiles/config/ — tracked dotfilestests/ — Pester tests (not inside Scripts/).kilo/skills/ — agent skills as <name>/SKILL.md.kilo/agents/ — agent definitions.kilo/commands/ — command reference markdown.github/ — CI, instructions, skills, copilot promptsMove misplaced files to their canonical homes. Update any internal references.
Identify candidates for removal:
grep / lspFindReferences)if ($false) { ... })Safety rule: if a script has no tests and no clear caller, mark it with a deprecation comment first. Delete only after confirming no external dependencies.
Clean up the automation surface:
Scripts/Common.ps1 if they are reusable#Requires statementsScripts/ has a clear purpose documented in comment-based helpDocs should be authoritative, not duplicative:
AGENTS.md is the single source of truth for AI guidance.github/copilot-instructions.md minimal; move broad rules to AGENTS.mdcomprehensive, ultimate, revolutionary)Normalize markdown style:
# to ###)ctxlint on .github/ guidance if availablegrep, localSearchCode).github/workflows/ for references# Create a checkpoint branch
git checkout -b cleanup/$(date +%Y%m%d)
git filter-branch on main)git-filter-repo on a feature branch, then force-push only after team reviewchore: remove legacy debloat script rather than cleanupgit tag before-cleanup-$(date +%Y%m%d)
git status shows only intended changesinstall.conf.yaml or AGENTS.mdScripts/**/*.ps1 still pass Invoke-ScriptAnalyzerbootstrap.ps1, Setup-Dotfiles.ps1) still execute without errorinstall.conf.yaml paths resolveScripts/auto/autounattend.xml loads as valid XMLInvoke-PesterBefore committing, review the full diff:
git diff --stat
git diff --name-only
Ensure no accidental deletions of tracked configs or active scripts.
AGENTS.md, README.md, or install.conf.yamlarchive/ folder instead of deletingwindows-dotfiles — repo-specific layout rules for Ven0m0/Winvalidation.md — running the correct checks after cleanup