improve-codebase-architecture

Scan a codebase for module deepening opportunities and present them as a visual HTML report.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, making them hard to test and navigate. This Skill surfaces that architectural friction and proposes concrete deepening refactors grounded in a shared design vocabulary. ## Core Features & Use Cases - Hot-spot-driven exploration: Scopes the scan using git history and user direction, then explores the codebase for shallow modules, seam leakage, and poor testability. - Visual HTML report: Renders each candidate refactor as a self-contained HTML file with Tailwind and Mermaid before/after diagrams, recommendation-strength badges, and ADR conflict callouts. - Guided decision loop: After the user picks a candidate, runs a grilling workflow to walk constraints, dependencies, and the shape of the deepened module, with optional ADR recording. - Use Case: A team notices their order intake logic is scattered across six thin wrappers. Run this Skill to get a visual report of deepening candidates, pick one, and work through the refactor decision tree. ## Quick Start Ask the agent to review this codebase for architecture improvements and show the deepening candidates as an HTML report.

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 shallow modules in my codebase?

Run this Skill to explore the codebase for modules whose interface is nearly as complex as their implementation. It applies the deletion test to candidates and presents each finding with a before/after diagram in an HTML report.

How to generate a visual architecture review report?

The Skill writes a self-contained HTML file to the OS temp directory using Tailwind and Mermaid from CDNs, then opens it in your browser. Each candidate refactor gets a card with files, problem, solution, benefits, and side-by-side diagrams.

Does the architecture review respect existing ADRs?

Yes, it reads ADRs in docs/adr/ before proposing changes and avoids re-litigating recorded decisions. Candidates that contradict an ADR are only surfaced with a clear warning callout when the friction justifies reopening the decision.

What vocabulary does the architecture review use?

It uses a fixed glossary from the codebase-design skill: module, interface, implementation, depth, seam, adapter, leverage, and locality. Domain terms come from the project's CONTEXT.md file so suggestions use the team's own language.

What happens after I pick a refactoring candidate?

The Skill runs a grilling loop that walks the decision tree with you: constraints, dependencies, the shape of the deepened module, and which tests survive. It can also offer to record rejected candidates as ADRs when the reason is load-bearing.