AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

Untangle Codebase

A full-sweep refactoring skill that catalogs hidden coupling, needless dependencies and surplus code, then redesigns the system from first principles.

Dev & CodingAdvanced★ 463⑂ 51AI score 7/10Last updated: Nov 6, 2026

What it does

  • Walks the entire codebase asking one question: should these pieces change together?
  • Catalogs every wrong answer in three buckets: hidden links (must change together but nothing shows it), needless links (tied together but change for different reasons), and surplus (pass-through wrappers, dead code, speculative extension points).
  • Records every special case — an if for one value, a parameter for one caller, a swallowed exception, a retry/sleep, a disabled test — and treats each as a requirement the design never accounted for.
  • Redesigns from first principles, hunting for the single fix behind several problems instead of patching symptoms, and records it as a decision log (fix → the problems it solves).
  • Optional passes: strip comments that merely restate the code, and remove tests that couldn't catch a real bug.
  • Verifies with subagents in repeated rounds until nothing worth fixing remains.

Who it's for

  • Developers inheriting a tangled legacy project they're afraid to touch
  • Teams restructuring a repo so AI agents read less and break less per change
  • Anyone tired of touching five files to ship one small feature

Examples

  • Payment seams: checkout/submit.ts imports payments/stripe.ts directly while refunds is littered with if (order.provider === "paypal") → collapse into one PaymentProvider interface.
  • Action duplication: toolbar, menu, keymap, command palette and undo history each keep their own action list → one command list with name, handler and undo.
  • Timing hacks: a dialog that sleeps 100ms hoping focus lands, plus a global skipRefocus flag → replaced by focus restoration inside the shared Dialog.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/aiskillstore/marketplace/HEAD/pending/caldoai/untangle-codebase/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI Skill Mart.
Copy the pending/caldoai/untangle-codebase folder from the GitHub repo aiskillstore/marketplace into my ~/.claude/skills/untangle-codebase/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/aiskillstore/marketplace.git && mkdir -p ~/.claude/skills && cp -r marketplace/pending/caldoai/untangle-codebase ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open your terminal.
  2. Clone the skill repository: git clone https://github.com/aiskillstore/marketplace.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy the skill in: cp -r marketplace/pending/caldoai/untangle-codebase ~/.claude/skills/
  5. Start Claude Code from inside the project you want to clean up.
  6. Important: create a working branch first (git checkout -b untangle) and make sure your test suite passes — this skill makes sweeping edits.
  7. Model auto-invocation is disabled, so trigger it yourself with /untangle-codebase (or ask Claude to use the untangle-codebase skill), optionally appending an area to focus on, e.g. the payments module.