C

Cleanup Vibes Command

Transforms messy, vibecoded projects into clean, structured, deployment-ready codebases. Ideal for solo developers or teams inheriting prototype code that needs professional-grade refactoring before production.

CommandCommunitycode reviewv1.0.0MIT
0 views0 copies

Command

/cleanup-vibes

Description

Refactors vibecoded or prototype-quality projects into clean, structured, production-ready codebases. Analyzes the entire project for common vibescode anti-patterns and systematically fixes them.

Behavior

  1. Scan Phase — Analyze the project structure and identify:

    • Inconsistent naming conventions (files, variables, functions)
    • Missing or incorrect TypeScript types (excessive any, missing interfaces)
    • Dead imports and unused dependencies
    • Hardcoded values that should be environment variables
    • Missing error handling and edge cases
    • Copy-pasted code that should be abstracted
    • Console.log statements left in production code
    • Inline styles that should be extracted
    • Missing input validation
  2. Plan Phase — Generate a structured remediation plan:

    ## Cleanup Plan
    - [ ] Extract hardcoded values to .env / config
    - [ ] Add TypeScript interfaces for all data shapes
    - [ ] Create shared utility functions for repeated logic
    - [ ] Add error boundaries and try/catch blocks
    - [ ] Normalize file and folder naming
    - [ ] Remove dead code and unused imports
    - [ ] Add input validation layer
    
  3. Execute Phase — Apply fixes file-by-file:

    • Create a git branch cleanup/vibes-refactor before making changes
    • Fix one category at a time (naming, then types, then error handling, etc.)
    • Run linter/formatter after each category
    • Commit after each category with descriptive message
  4. Verify Phase — Validate nothing broke:

    • Run existing tests (if any)
    • Run TypeScript compiler with --noEmit
    • Run linter
    • Verify the app builds successfully

Output Format

## Cleanup Report ### Files Modified: 23 ### Issues Fixed: 47 | Category | Count | Examples | |----------|-------|----------| | Hardcoded values | 8 | API URLs, magic numbers | | Missing types | 12 | Request handlers, API responses | | Dead code | 6 | Unused imports, commented blocks | | Error handling | 9 | Unhandled promises, missing try/catch | | Code duplication | 5 | Extracted to shared utils | | Naming issues | 7 | Normalized to camelCase/PascalCase | ### Breaking Changes: None ### New Dependencies: None

Rules

  • ALWAYS create a git branch before making changes
  • NEVER delete functionality — only restructure and improve
  • Preserve all existing behavior exactly
  • If tests exist, they must still pass after cleanup
  • Ask before renaming exported functions/components that may be used externally
  • Do not add new dependencies unless absolutely necessary

Examples

# Run on entire project /cleanup-vibes # Run on specific directory /cleanup-vibes src/components # Dry run — show plan without executing /cleanup-vibes --dry-run
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates