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
.claude/commands/cleanup-vibes.mdWhat 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.exampleother 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-vibeson this repo and show me what moved. - Use
/cleanup-vibesto 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.mdCall it with /cleanup-vibes. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/cleanup-vibes.mdCall it with /prompts:cleanup-vibes. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/cleanup-vibes.prompt.mdManually: put the files in place
.gemini/commands/cleanup-vibes.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
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.