---
{
  "name": "improve-codebase-architecture",
  "description": "Refactor and improve codebase architecture by identifying and resolving structural issues. Use when the codebase has structural problems or modules are too coupled.",
  "credit": "Matt Peacock (mattpocock/skills)"
}
---

# Improve Codebase Architecture

Refactor and improve codebase architecture by identifying and resolving structural issues.

## Process

1. **Assess current state** — What's working, what's not?
2. **Identify pain points** — Where does the architecture hurt?
3. **Propose changes** — What would improve the structure?
4. **Prefactor** — Make the change easy, then make the easy change.
5. **Execute** — Apply changes incrementally.
6. **Verify** — Tests still pass, behavior unchanged.

## Rules

- Change structure without changing behavior.
- One refactor at a time.
- Keep tests green throughout.
- Document why the change was made.

## Credit

This skill is based on the work of **Matt Peacock** ([@mattpocock](https://github.com/mattpocock)). Original source: [mattpocock/skills](https://github.com/mattpocock/skills). Licensed under MIT.
