Skip to main content
command CX Codex

cleanup-vibes — Claude Code command: what it does, how to install

cleanup-vibes turns a vibecoded repo into something deployable: pulls hardcoded keys into .env, sorts files into folders, writes the README.

no license ★ 1,357 updated 2026-03-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/cleanup-vibes.md
Open on GitHub

What cleanup-vibes does

The command reads the project root first. A package.json, pyproject.toml or requirements.txt tells it whether this is TypeScript, Python, or a split stack with a Python backend next to a TS frontend. Framework detection follows, so a Next.js tree gets a different target layout than Express.

Secret hunting runs as three sub-agents in parallel through the Task tool. One greps for keys and tokens, one for baked-in API base URLs, webhooks and database connection strings, one for ports, environment-specific values and feature flags. Hits go into a sectioned .env, a matching .env.example with placeholders appears beside it, and source files get process.env or os.environ.get instead of literals.

Matching is pattern-based: sk-, Bearer, postgres:// and similar prefixes. A key with no recognisable shape survives the pass, so read the diff afterwards. Scattered files move into src/, components/, lib/ and the rest, and import paths are rewritten to match.

What it helps with

  • pull hardcoded API keys and tokens out of source files
  • generate a .env.example other people can copy
  • sort a flat pile of files into a project-type layout
  • fix import paths after files move
  • write a README covering env vars and dev commands

Example prompts for the agent

  • Run /cleanup-vibes on this repo and show me what moved.
  • Use /cleanup-vibes to lift the hardcoded keys into .env, then list every variable it created.
  • Run /cleanup-vibes, then rewrite the README so it matches the new folder layout.

How to install cleanup-vibes

Manually: put the files in place

.claude/commands/cleanup-vibes.md

Call it with /cleanup-vibes. For all projects use ~/.claude/commands/

Questions about cleanup-vibes

How do I install cleanup-vibes in Claude Code?

Copy the command file to .claude/commands/cleanup-vibes.md in your project, then call it as /cleanup-vibes.

What does cleanup-vibes do?

It detects the stack, moves embedded secrets and endpoints into .env, writes .env.example, reorganises folders and drafts a README.

Which project types does it handle?

TypeScript/JavaScript, Python, and a hybrid of Python backend plus TS frontend. Each gets its own folder layout.

Similar slash commands

All slash commands for Code review and refactoring →

From the same set112

The whole set →
WORKFLOW_EXAMPLES WORKFLOW_EXAMPLES — a workflow guide for coordinating Claude Command Suite agents across feature work, bug fixes, code audits, integrations, and releases. CX Codex ★ 1,357repo stars cloud-architect cloud-architect designs cloud infrastructure on AWS, Azure or GCP: Terraform modules, network layout, cost estimate. Useful when you plan a migration or need to trim a bill. CX Codex ★ 1,357repo stars memory-curator memory-curator manages semantic memory trees, merges related nodes, and creates checkpoints to prevent knowledge loss. CX Codex ★ 1,357repo stars typescript-pro The typescript-pro subagent designs and refactors TypeScript applications for Node.js and browsers. Use it for advanced types, architecture, testing, and large code changes. CX Codex ★ 1,357repo stars sync-pr-to-task sync-pr-to-task connects GitHub pull requests to Linear issues, mapping review statuses and comments bidirectionally. CX Codex +1 ★ 1,357repo stars nextjs-pro nextjs-pro — a Next.js subagent for architecture, rendering choices, SEO, testing, and performance work across an existing or new application. CX Codex ★ 1,357repo stars retrospective-analyzer retrospective-analyzer pulls sprint numbers from Linear and Git, finds problems that repeat across retros, and drafts action items with owners and dates. CX Codex +1 ★ 1,357repo stars boundary-guardian boundary-guardian monitors reasoning boundaries and detects semantic drift to stop AI hallucinations before invalid statements occur. CX Codex ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open