sickn33/agentic-awesome-skills/vibe-code-cleanup
Claude Code and agent skill by sickn33/agentic-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Safe production cleanup and hardening for vibe-coded fullstack apps (Next.js, React, Node.js, etc.). Removes dead imports, unused files, and broken references without breaking routes or APIs.
Install
npx vskill@latest install sickn33/agentic-awesome-skills/vibe-code-cleanupSKILL.md
Vibe-Code Cleanup — Production Refactor Skill
A safe, incremental cleanup workflow for AI-generated / vibe-coded fullstack apps. The goal is to make the codebase production-ready without breaking anything that already works.
When to Use
- Use when a rapidly built app works but has broken imports, duplicated logic, dead code, unclear environment variables, or fragile release hygiene.
- Use before launch or handoff to convert exploratory code into a maintainable production baseline.
- Use when cleanup must preserve existing behavior and avoid broad rewrites of routes, APIs, auth, data models, or integrations.
Core Philosophy
Surgery, not demolition. Remove only what is provably dead. Preserve everything else.
Never:
- Rewrite working systems for cosmetic reasons
- Rename routes, slugs, or API endpoints that may be indexed or cached
- Change tool inputs/outputs, API contracts, DB schema, or auth flow
- Delete files you haven't verified are unused
- Make broad sweeping changes in a single commit
Always:
- Make small, targeted, reversible changes
- Validate after every meaningful batch of changes
- Prefer shared helpers over copy-pasted blocks
- Keep backward compatibility
Step 1 — Reconnaissance (read before touching)
Before changing anything, map the codebase:
Document what you find. Do NOT change yet.
Step 2 — Fix Broken Imports First
Broken imports cause build failures and should be fixed before anything else.
Fix rule: Fix the import reference. Do NOT delete the referenced file unless you've confirmed it's unused everywhere.
Step 3 — Identify Dead Code (verify before removing)
These checks identify candidates, not proof of dead code. Also inspect dynamic imports, framework conventions, runtime strings, package exports and external consumers before removal. A file/export is a candidate only if:
- No other file imports it (grep-confirmed)
- It's not referenced in config, sitemap, or route manifest
- It's not a public-facing URL (page.js, route.js)
Step 4 — Consolidate Repeated Logic into Helpers
Look for repeated patterns (metadata blocks, API fetch wrappers, error handlers) that appear in 3+ places.
Good consolidation targets:
- Page-level SEO metadata (Open Graph, Twitter cards, canonical)
- Fetch wrappers with error handling
- Repeated utility functions (slugify, formatDate, truncate)
Bad consolidation targets (leave alone):
- One-off business logic
- Route handlers with different contracts
- Anything touching DB schema or auth
Pattern for shared metadata helper (Next.js):
Step 5 — Environment Variable Audit
Flag any env vars used in code but missing from .env.example. Never add secrets to version control.
Step 6 — Validate After Every Batch
Run this after every meaningful batch of cleanup changes:
If build or typecheck breaks → revert the last batch before continuing.
Step 7 — Commit Strategy
Each commit should be a single logical unit:
Never bundle UI changes + logic changes + file deletions in one commit. Smaller commits = easier rollback.
What NOT to Clean Up
Treat these as off-limits unless there's a verified bug:
| Area | Why | |
|---|---|---|
| Route slugs / page paths | May be indexed by Google | |
| API route contracts | Callers depend on exact shape | |
| DB schema / Prisma models | Migration required | |
| Auth flow logic | Security-sensitive | |
| Third-party integration configs | Keys/webhooks are environment-specific | |
| Working tool pages | User-facing functionality |
Cleanup Checklist
- [ ] TypeScript errors fixed
- [ ] No broken imports
- [ ] Dead code removed (grep-verified)
- [ ] Shared helpers created for repeated patterns (3+ uses)
- [ ] No hardcoded secrets or local-only URLs
- [ ] All env vars documented in
.env.example - [ ] Build passes
- [ ] Tests pass (or no tests exist)
- [ ] Lint passes
- [ ] Each commit is scoped and explainable
Limitations
- Does not infer product intent from code alone; confirm behavior before deleting routes, components, API contracts, or data models.
- Cleanup should be applied in small reviewed batches because broad refactors can hide regressions.
- Avoid changing auth, billing, persistence, or third-party integration behavior without explicit requirements and tests.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/vibe-code-cleanup/SKILL.md
Popularity
- Repository stars
- 47,054
- Repository forks
- 6,853
- 7-day trend score
- 54
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/agentic-awesome-skills/vibe-code-cleanup)