# Clean room redesign

> Clean room redesign is an open-source agent skill for developer tools. Plans a clean-room rewrite of existing behavior, from requirements through phased. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/richardgill/nix/tree/main/built/ai-agents/pi/skills/clean-room-redesign
- **Repository:** https://github.com/richardgill/nix
- **GitHub stars:** 39
- **License:** MIT
- **Skill name:** clean-room-redesign
- **Collection:** https://github.com/richardgill/nix
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through replacing a system by rebuilding it from observed behavior rather than from its existing code. Before any design work, the agent pins down the entry point, the rewrite boundary, interfaces that must stay fixed, permitted exceptions to the rewrite, and what is explicitly out of scope. It reads existing code only to extract what the system does, then records functional requirements and confirmed decisions in a working document, dropping superseded decisions rather than keeping compatibility paths.

The workflow is built around separation of concerns. The agent discusses one concept at a time, distinguishes required behavior from incidental complexity, and recommends the simplest viable option. A fresh agent is then asked to produce a design from the requirements alone, with explicit instructions not to read the repository, history, tests or generated files. The parent agent checks that delegated design against the requirements, the boundary and the failure and cleanup behavior before saving it. The design must include a file tree with responsibilities, exported signatures, outside-in call flows, a small test plan and open decisions.

Implementation is split into sequential phases handled by fresh agents, each with an exact scope, deletion instructions and required checks. After each phase the parent reviews the diff, searches for leftover obsolete code, and runs targeted tests. The skill ends with full local CI, manual browser testing and a final comparison of design against implementation. It is a Markdown-only instruction file with no bundled scripts.

## When your agent uses it

> Plans and oversees a clean-room rewrite from existing behavior. Use for greenfield redesigns and aggressive legacy replacements.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/richardgill/nix/tree/HEAD/built/ai-agents/pi/skills/clean-room-redesign)
- [License: MIT](https://github.com/richardgill/nix/tree/HEAD/built/ai-agents/pi/skills/clean-room-redesign)

## Features

- **Rewrite boundary setup:** Fixes the entry point, rewrite boundary, locked interfaces and exclusions before any design starts.
- **Behavior-only requirements:** Extracts observable behavior from existing code while leaving out current files and implementation patterns.
- **Delegated clean-room design:** Has a fresh agent write the design from requirements alone, then checks the output critically.
- **Design artifacts:** Requires a file tree with responsibilities, exported signatures, call flows and a small test plan.
- **Phased implementation:** Runs implementation in sequential phases with exact scope, deletion rules and targeted checks after each.
- **Final verification:** Ends with full local CI, manual browser testing and a design-to-implementation comparison.

## Good for

- Plan a greenfield rewrite of a legacy module from its current behavior
- Replace an old subsystem aggressively without carrying over compatibility paths
- Write a clean-room design document with file tree and call flows
- Split a rewrite into phases with agents and check each diff against the design

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/clean-room-redesign` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/clean-room-redesign &&
cp -R "$tmp/built/ai-agents/pi/skills/clean-room-redesign" ~/.claude/skills/clean-room-redesign &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/clean-room-redesign` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/clean-room-redesign` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/clean-room-redesign &&
cp -R "$tmp/built/ai-agents/pi/skills/clean-room-redesign" ~/.agents/skills/clean-room-redesign &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/clean-room-redesign` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/clean-room-redesign` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/clean-room-redesign &&
cp -R "$tmp/built/ai-agents/pi/skills/clean-room-redesign" ~/.cursor/skills/clean-room-redesign &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/clean-room-redesign` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/richardgill/nix.git --path built/ai-agents/pi/skills/clean-room-redesign
```

Or copy the folder to `~/.gemini/skills/clean-room-redesign` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/clean-room-redesign`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/clean-room-redesign &&
cp -R "$tmp/built/ai-agents/pi/skills/clean-room-redesign" ~/.copilot/skills/clean-room-redesign &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/clean-room-redesign` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/richardgill/nix.git
```

Then copy `nix/built/ai-agents/pi/skills/clean-room-redesign` into your agent's skills folder as `clean-room-redesign`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does the skill need any scripts or tools to run?

The skill ships as a single SKILL.md file with no scripts. It has no allowed-tools restriction set.

### Where does Clean room redesign save its documents?

Requirements and confirmed decisions go to ./overlay/branch/current-functional-requirements.md, and the reviewed design goes to ./overlay/branch/clean-room-design.md.

### When does Clean room redesign trigger?

It is meant for greenfield redesigns and aggressive legacy replacements, according to its description.

### How do I install Clean room redesign in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/clean-room-redesign to use it in all your projects, or to .claude/skills/clean-room-redesign in one project.

### Does Clean room redesign run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Clean room redesign?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Clean room redesign?

The closest alternatives to Clean room redesign are Principle redesign from first principles, Clean code, Refactor seams, Spec driven develop and Principle subtract before you add.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Principle redesign from first principles](https://ai-powered.com/skills/principle-redesign-from-first-principles): Principle redesign from first principles is an open-source agent skill for developer tools.
- [Clean code](https://ai-powered.com/skills/clean-code): Clean code is an open-source agent skill for developer tools.
- [Refactor seams](https://ai-powered.com/skills/refactor-seams): Refactor seams is an open-source agent skill for developer tools.
- [Spec driven develop](https://ai-powered.com/skills/spec-driven-develop): Spec driven develop is an open-source agent skill for developer tools.
- [Principle subtract before you add](https://ai-powered.com/skills/principle-subtract-before-you-add): Principle subtract before you add is an open-source agent skill for developer tools.
- [Safe change](https://ai-powered.com/skills/safe-change): Safe change is an open-source agent skill for developer tools.
- [Code simplification](https://ai-powered.com/skills/code-simplification): Code simplification is an open-source agent skill for developer tools.
- [Refactor](https://ai-powered.com/skills/refactor): Refactor is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/clean-room-redesign
