improve-codebase-architecture

Identify architectural friction and refactoring opportunities in a codebase.

5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tiancaiamao/ai --skill improve-codebase-architecture-tiancaiamao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/tiancaiamao/ai/tree/main/skills/improve-codebase-architecture
Command: npx skills add https://github.com/tiancaiamao/ai --skill improve-codebase-architecture-tiancaiamao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you spot architectural friction in a codebase and turn shallow, hard-to-change modules into deeper ones with better leverage, locality, and testability.

Core Features & Use Cases

  • Architecture review: Finds tightly coupled modules, pass-through layers, and seams that do not yet earn their keep.
  • Refactoring guidance: Suggests concrete deepening opportunities for consolidating behavior, improving interfaces, and reducing scattered complexity.
  • Testability improvements: Reorients tests around meaningful module boundaries so behavior is verified through stable interfaces instead of internal details.
  • AI-navigability: Helps make a repository easier for both humans and agents to understand by grounding recommendations in glossary terms, existing decisions, and the deletion test.

Quick Start

Ask the skill to review a repository and list the highest-leverage architecture improvements.

Frequently Asked Questions about improve-codebase-architecture

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

FAQPage Schema
How do I find architectural friction and refactoring opportunities in my codebase?

Identify architectural friction by scanning for tightly coupled modules, pass-through layers, and shallow seams. Use the deletion test and seam classification to pinpoint high-leverage refactoring opportunities that consolidate behavior and improve modularity.

What is the deletion test for evaluating module architecture and testability?

The deletion test evaluates module architecture by assessing whether a module earns its keep. It identifies shallow, pass-through layers lacking leverage, guiding refactoring opportunities that deepen modules and reorient tests around stable interfaces.

How can I improve codebase testability through module boundary refactoring?

Improve codebase testability by reorienting tests around meaningful module boundaries. Analyze seams to consolidate behavior and verify functionality through stable interfaces instead of internal implementation details, reducing scattered complexity.

What is the best way to make a repository easier for AI agents to navigate?

Make a repository easier for AI agents to navigate by grounding architectural recommendations in existing project context files, glossary terms, and prior decisions. Identify deepening opportunities that reduce friction and improve locality.

When should I consolidate modules to reduce scattered complexity in a codebase?

Consolidate modules to reduce scattered complexity when seam classification reveals pass-through layers and tightly coupled components lacking leverage. Apply the deletion test to confirm shallow modules do not earn their keep before refactoring.

Can I use existing project context files to guide codebase architecture reviews?

Use existing project context files to guide architecture reviews by grounding recommendations in glossary terms and established decisions. This localized approach ensures refactoring suggestions align with your repository's current structure and AI-navigability requirements.