Skip to content
Skill

Clean room redesign

Plans a clean-room rewrite of existing behavior, from requirements through phased

Clean room redesign is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
39
Last commit
License
MIT
Listing updated

Similar skills

About Clean room redesign

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.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (3 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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.

Claude Code docs on skills

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

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.

Codex docs on skills

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

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.

Cursor docs on skills

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

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.

Gemini CLI docs on skills

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

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.

VS Code docs on skills

Get the folder:

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.

The SKILL.md format

What it does

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

Clean room redesign 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.

More from richardgill/nix

  1. Lets your agent manage Todoist tasks through the todoist command-line tool

    • Open source
    • 39 GitHub stars
    • Productivity
  2. Creates git worktrees in tmux sessions and starts an AI agent on a prompt

    • Open source
    • 39 GitHub stars
    • Developer tools
  3. Delegates work to supervised Pi agents running in tmux sessions and worktrees

    • Open source
    • 39 GitHub stars
    • Developer tools
  4. Lets your agent run web searches, fetch page content and quick answers via Kagi CLI

    • Open source
    • 39 GitHub stars
    • Web search and scraping
  5. Lets an agent handle Gmail tasks through the gws command-line tool

    • Open source
    • 39 GitHub stars
    • Communication
  6. Lets your agent work with Google Calendar through the gws command-line tool

    • Open source
    • 39 GitHub stars
    • Productivity