improve-codebase-architecture

Identify refactoring opportunities by finding shallow modules and architectural friction.

Updated May 25, 2026
One-click install
npx skills add https://github.com/AcendWay/ai-skills-library --skill improve-codebase-architecture-acendway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/AcendWay/ai-skills-library/tree/main/skill-folders/improve-codebase-architecture
Command: npx skills add https://github.com/AcendWay/ai-skills-library --skill improve-codebase-architecture-acendway

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you identify architectural friction in a codebase and convert shallow, tightly-coupled modules into deep modules with clearer interfaces and stronger testability.

Core Features & Use Cases

  • Find deepening opportunities by reading existing project context (CONTEXT.md and ADRs) and exploring codebase friction.
  • Use depth-focused refactoring guidance grounded in the skill’s shared vocabulary: Module, Interface, Seam, Adapter, Leverage, and Locality.
  • Drive a safe grilling loop with the user to define candidate changes, dependencies, seam placement, and how tests should target the interface.
  • Optionally explore alternative interfaces for a chosen deepened module using a “Design It Twice” parallel sub-agent pattern.

Quick Start

Use the improve-codebase-architecture skill to explore your repository and propose a list of deepening candidates based on where complexity fails the deletion test and where seams/adapters are missing or poorly placed.

Frequently Asked Questions about improve-codebase-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify shallow modules for codebase refactoring?

To identify shallow modules during codebase refactoring, you can analyze where complexity fails the deletion test and where seams or adapters are missing. This Skill explores your project context and codebase to present deepening candidates without proposing new interfaces upfront.

What is a deep module in software architecture?

A deep module in software architecture provides a clean, minimal interface while hiding substantial implementation complexity. This Skill evaluates your codebase to find tightly-coupled logic that fails this principle and helps convert shallow modules into deep, testable structures.

How do I improve codebase testability using seams and adapters?

Improve codebase testability by evaluating seam placement and adapter usage to ensure tests target the interface rather than internal logic. This Skill guides a loop to define candidate changes, dependencies, and how tests should interact with the deepened module.

Can I use architectural friction analysis on existing project documentation?

Yes, architectural friction analysis requires reading existing project documentation like CONTEXT.md and ADR entries. The Skill uses these files to understand your current architecture before exploring the codebase to find deepening opportunities.

When should I not use an automated refactoring candidate generator?

You should not use an automated refactoring candidate generator when your project lacks foundational context files like CONTEXT.md or ADRs. The Skill requires this documentation to accurately identify architectural friction and propose deepening candidates.