# planning-codebase-restructuring

planning-codebase-restructuring is a Claude Code skill that maps a codebase and prepares a restructuring plan without changing files. It produces an evidence-backed report for a later implementation pass.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 100 installs · ★ 3 repo stars
- Author: b-mendoza
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/b-mendoza/agent-skills/tree/HEAD/skills/planning-codebase-restructuring/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/planning-codebase-restructuring

## What it does

planning-codebase-restructuring maps the current architecture in read-only mode, examines domain language with DDD and Screaming Architecture, quarantines external references, and prepares a migration plan. Five subagents contribute to the workflow: an architecture cartographer, domain analyst, restructuring strategist, reference assessor, and plan reviewer.

The skill takes a repository path or URL, a target scope, business goals, and constraints. It can write the final report to `ARTIFACT_PATH`; a repository URL may also trigger a shallow temporary clone outside the target tree. Tests, builds, package installs, formatters, generators, file moves, refactors, and public-contract changes are outside its operation.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add b-mendoza/agent-skills --skill planning-codebase-restructuring -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/planning-codebase-restructuring/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/planning-codebase-restructuring/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add b-mendoza/agent-skills --skill planning-codebase-restructuring -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/planning-codebase-restructuring/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add b-mendoza/agent-skills --skill planning-codebase-restructuring -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/planning-codebase-restructuring/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install b-mendoza/agent-skills skills/planning-codebase-restructuring
```

2. **Manually: put the files in place**
- File: `.github/skills/planning-codebase-restructuring/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add b-mendoza/agent-skills --skill planning-codebase-restructuring -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/b-mendoza/agent-skills --path skills/planning-codebase-restructuring
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/planning-codebase-restructuring/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add b-mendoza/agent-skills --skill planning-codebase-restructuring -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/b-mendoza/agent-skills/tree/HEAD/skills/planning-codebase-restructuring/SKILL.md

## When to use it
- draft a restructuring plan for a codebase
- map domain boundaries and business capabilities
- compare the current structure with DDD and Screaming Architecture
- assess an external architecture reference
- prepare a report for a later implementation run

## Example prompts
- Create a restructuring plan for `CODEBASE_PATH_OR_REPOSITORY_URL`, covering `TARGET_SCOPE` and `BUSINESS_GOALS_AND_PAIN_POINTS`.
- Map the current architecture through read-only inspection, check `KNOWN_DOMAIN_LANGUAGE`, and save the result to `ARTIFACT_PATH`.
- Assess `REFERENCE_URL` against `CONSTRAINTS` and produce a report using `SUCCESS_CRITERIA`.

## Similar
- [untangle-codebase](https://affpapa.org/en/nevibecode/skills/untangle-codebase.md) — skill · 3500 installs
- [explore-codebase](https://affpapa.org/en/nevibecode/skills/explore-codebase.md) — skill · 1200 installs
- [ac-reviewing-codebase](https://affpapa.org/en/nevibecode/skills/ac-reviewing-codebase.md) — skill · 1000 installs
- [codebase-analyzer](https://affpapa.org/en/nevibecode/skills/codebase-analyzer.md) — skill · 868 installs
- [codebase-documenter](https://affpapa.org/en/nevibecode/skills/mhattingpete-codebase-documenter.md) — skill · 595 installs
- [codebase-architecture](https://affpapa.org/en/nevibecode/skills/codebase-architecture.md) — skill · 593 installs

From the same set: [b-mendoza/agent-skills](https://affpapa.org/en/nevibecode/by/b-mendoza/agent-skills.md) — 12 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
