improve-architecture

Score codebase modules by depth, leverage, and locality for refactoring.

1|Updated May 18, 2026
One-click install
npx skills add https://github.com/linenoize/topia --skill improve-architecture-linenoize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-architecture
Source: https://github.com/linenoize/topia/tree/main/skills/improve-architecture
Command: npx skills add https://github.com/linenoize/topia --skill improve-architecture-linenoize

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill finds architectural friction in a codebase and identifies modules that are too shallow, too fragmented, or ready to be consolidated or deleted.

Core Features & Use Cases

It scores candidate modules using depth, leverage, locality, and a deletion test so you can compare refactor opportunities in a disciplined way. It is useful for reviewing clustered helpers, wrapper-heavy code, scattered logic, and refactoring proposals where testability and maintainability matter. It produces structured proposals that downstream refactoring workflows can consume without re-reading the codebase.

Quick Start

Ask for an architecture review of a target module or folder and request scored refactor candidates with clear recommendations.

Frequently Asked Questions about improve-architecture

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

FAQPage Schema
How do I identify which modules to refactor for better architecture?

Architecture refactoring prioritization identifies modules with structural friction by scoring depth, leverage, and locality. It evaluates shallow wrappers and clustered helpers to determine which modules require deepening or deletion to improve maintainability.

What is the best way to detect shallow wrappers in a codebase?

Detecting shallow wrappers requires applying a deletion-test verdict and dependency classification to evaluate module leverage. This process identifies fragmented logic and scores whether a module provides enough depth to justify its existence or should be consolidated.

How do I score codebase modules to improve testability and maintainability?

Scoring modules for testability involves assigning numeric values to depth, leverage, and locality metrics. This disciplined comparison highlights architectural friction and scattered logic, producing clear recommendations for refactoring candidates.

Can I automate architecture reviews for clustered helper modules?

Architecture reviews for clustered helpers are automated by evaluating dependency classifications and applying a deletion test. This generates structured proposals that downstream refactoring workflows can consume directly without re-reading the codebase.

When should I consolidate or delete modules during a refactoring review?

Modules should be consolidated or deleted when they fail the deletion-test verdict and exhibit low locality and leverage scores. This indicates severe architectural friction where the module adds complexity without sufficient depth to justify maintenance.

How does module depth analysis handle scattered logic in refactoring proposals?

Module depth analysis handles scattered logic by classifying dependencies and scoring locality to find consolidation opportunities. It targets architectural friction in refactoring proposals, ensuring structured output improves testability for downstream workflows.