Claude Code
curl -fsSL https://raw.githubusercontent.com/vibe-md/vibe.md/7cb0620fbd80f9829155d8866328b58cd18d5aa7/scripts/install.sh \
| bash -s -- --skill code-hygiene \
--agent claude-code --ref 7cb0620fbd80f9829155d8866328b58cd18d5aa7Keeps AI-written code real, used, and written once. Checks for an existing helper before creating a new one, verifies every third-party API against the installed version before using it, and cleans up code the change left orphaned. Use when adding functions, hooks, components, or utilities; when calling or upgrading a third-party package or editing framework config; after finishing a feature or abandoning an approach; or when an error says something is undefined, not a function, not exported, or an unknown option.
Code Hygiene keeps what your agent writes real, used and written once. Before it creates a new helper, it searches your project for one that already exists. Before it uses a third-party API, it checks that the API exists in the version you have installed. When the work is done, it lists the code the change left unused and asks before removing anything.
AI agents write before they search, so you end up with a third formatDate or a second Button. They code from memory of an older library, so you get hooks, props and config keys that don't exist in your version. And when they change direction, the abandoned files and packages stay behind. The project gets bigger, harder to read and more likely to break.
Search before creating
Your agent looks for an existing function, hook or component, by name and by behavior, and checks the packages you already have. It reuses or extends what exists instead of writing a copy.
Verify every third-party API
Each import, prop, option and config key is checked against the installed version, using its type definitions and changelog, not the agent's memory.
Sweep what the task orphaned
When the work is finished, it lists the files, exports, imports and packages that nothing uses anymore. It proposes the removals and waits for your approval.
A short hygiene report
Each task ends with what was reused, which APIs were verified, what was cleaned up, and which checks passed. You can see exactly what was done.
One command
Open Terminal in your project folder, then run this command. No ZIP, moving files, or prompt needed.
curl -fsSL https://raw.githubusercontent.com/vibe-md/vibe.md/7cb0620fbd80f9829155d8866328b58cd18d5aa7/scripts/install.sh \
| bash -s -- --skill code-hygiene \
--agent claude-code --ref 7cb0620fbd80f9829155d8866328b58cd18d5aa7Works on macOS, Linux, and Windows through WSL or Git Bash. The installer checks destinations and stops if existing files conflict.
Type these to your agent in plain language. Here's what to expect.
you › Add a debounced search input to the products page.
Expected workflow
you › Let's drop the custom carousel and use FlashList.
Expected workflow
The skill follows the order of a normal task: search before writing, verify while writing, and sweep after writing. When an error says something is not a function, not exported or an unknown option, your agent treats it as a missing API and checks the installed version first.
It works in any language, and the examples target JavaScript and TypeScript projects. It can use knip and depcheck to find unused code, and it asks before installing either.
Read what your agent is about to run before approving it. These can lose work: