# Architecture rescue

> Architecture rescue is an open-source agent skill for developer tools. Finds shallow modules and missing seams in tangled code before any redesign. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ivy00johns/Skill-Madness/tree/main/skills/workflows/architecture-rescue
- **Repository:** https://github.com/ivy00johns/skill-madness
- **GitHub stars:** 12
- **License:** MIT
- **Skill name:** architecture-rescue
- **Collection:** https://github.com/ivy00johns/Skill-Madness
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

Architecture rescue helps an agent diagnose a codebase that has become hard to change or test. It walks the source tree, reads the largest and most-imported modules, and looks for places where a thin module should be thicker, a seam should be drawn, or an abstraction is leaking. The result is a numbered list of candidates, each with file references, the problem, a plain-English fix, and notes on locality and leverage.

The skill applies two heuristics as it works. A deletion test asks whether removing a module would make complexity vanish, which marks a pass-through, or whether complexity would reappear across many callers, which marks a module that earns its place. A two-adapter rule treats a second implementation of the same behavior as evidence of a real seam that should become an explicit interface.

The skill is deliberately limited to diagnosis. It hands the candidate list to a grilling session and only proposes an interface afterwards, comparing two different designs. It can also call companion skills to walk the design tree and to record new domain terms in a project context file. It is written for Claude Code and uses read, search and write tools.

## When your agent uses it

> Find deepening opportunities in a codebase (shallow modules, missing seams, leaky abstractions) and present them as numbered candidates for a grilling session before any interface is proposed. Use when the code feels tangled or hard to test. Trigger on "improve architecture", "rescue this codebase", "find refactoring opportunities", "ball of mud", "shallow modules".

## What it can access

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

- [Instructions only, no scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/workflows/architecture-rescue)
- [Asks for: Read, Grep, Glob, Write](https://github.com/ivy00johns/Skill-Madness/blob/HEAD/skills/workflows/architecture-rescue/SKILL.md)
- [License: MIT](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/workflows/architecture-rescue)

## Features

- **Deepening opportunity search:** Scans a codebase for shallow modules, missing seams and leaky abstractions.
- **Deletion test:** Checks whether removing a module makes complexity vanish or reappear across callers.
- **Two-adapter seam detection:** Spots duplicated implementations that suggest a hidden interface worth naming.
- **Numbered candidate report:** Lists each candidate with file ranges, problem, locality and leverage notes.
- **Staged design workflow:** Defers interface design until after a grilling session and compares two options.

## Good for

- Find out why a legacy service is hard to unit test
- Identify shallow wrapper modules that add no value
- Locate places where a storage or API seam should be introduced
- Prepare a refactoring agenda for a messy codebase before changing code

## Install

### Claude Code

This skill ships in the `skill-madness` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness
```

Or copy only this skill to `~/.claude/skills/architecture-rescue`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/architecture-rescue &&
cp -R "$tmp/skills/workflows/architecture-rescue" ~/.claude/skills/architecture-rescue &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/architecture-rescue` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/architecture-rescue` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/architecture-rescue &&
cp -R "$tmp/skills/workflows/architecture-rescue" ~/.agents/skills/architecture-rescue &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/architecture-rescue` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/architecture-rescue` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/architecture-rescue &&
cp -R "$tmp/skills/workflows/architecture-rescue" ~/.cursor/skills/architecture-rescue &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/architecture-rescue` 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/ivy00johns/Skill-Madness.git --path skills/workflows/architecture-rescue
```

Or copy the folder to `~/.gemini/skills/architecture-rescue` yourself.

### VS Code

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/architecture-rescue &&
cp -R "$tmp/skills/workflows/architecture-rescue" ~/.copilot/skills/architecture-rescue &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/architecture-rescue` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git
```

Then copy `Skill-Madness/skills/workflows/architecture-rescue` into your agent's skills folder as `architecture-rescue`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does the skill trigger?

It triggers on phrases such as improve architecture, rescue this codebase, find refactoring opportunities, ball of mud and shallow modules, and when the code feels tangled or hard to test.

### Does Architecture rescue change my code?

Its described output is a numbered list of candidates. It does not propose interfaces until a grilling session has happened, and its allowed tools include Write.

### Does Architecture rescue need scripts or extra tools?

It ships no scripts. It uses Read, Grep, Glob and Write, and it references companion skills named grill-me, maintain-context and diagnose-loop.

### How do I install Architecture rescue in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/architecture-rescue to use it in all your projects, or to .claude/skills/architecture-rescue in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

### Does Architecture rescue 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 Architecture rescue?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Architecture rescue?

The closest alternatives to Architecture rescue are Improve arch, Improve codebase architecture, Deepening review, Architecture review and Improve architecture.

## Where this comes from

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

## Alternatives

- [Improve arch](https://ai-powered.com/skills/improve-arch): Improve arch is an open-source agent skill for developer tools.
- [Improve codebase architecture](https://ai-powered.com/skills/improve-codebase-architecture): Improve codebase architecture is an open-source agent skill for developer tools.
- [Deepening review](https://ai-powered.com/skills/deepening-review): Deepening review is an open-source agent skill for developer tools.
- [Architecture review](https://ai-powered.com/skills/architecture-review): Architecture review is an open-source agent skill for developer tools.
- [Improve architecture](https://ai-powered.com/skills/improve-architecture): Improve architecture is an open-source agent skill for developer tools.
- [Architecture foundation](https://ai-powered.com/skills/architecture-foundation): Architecture foundation is an open-source agent skill for developer tools.
- [Oracle codebase design](https://ai-powered.com/skills/oracle-codebase-design): Oracle codebase design is an open-source agent skill for developer tools.
- [Codebase design](https://ai-powered.com/skills/codebase-design): Codebase design is an open-source agent skill for design and media.

---
Source: https://ai-powered.com/skills/architecture-rescue
