improve-code-architecture

Scan React/Next/TypeScript codebases for architectural rot and render ranked refactor opportunities as a visual HTML report.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Mature React/Next/TypeScript codebases gradually accumulate architectural rot — god-components, shallow hooks, tangled server/client boundaries — that makes them hard to work in, but teams struggle to identify which refactors are real deepenings versus cosmetic churn. This Skill scans the whole codebase, separates genuine improvements from tidy-looking busywork, and presents the findings as a visual report you can act on. ## Core Features & Use Cases - Rot scan with deletion test: Explores the codebase for recurring React/Next rot signals (god-components, shallow wrappers, boundary tangles, duplicated logic) and gates every candidate through a deletion test that asks whether removing the module concentrates or merely relocates complexity. - Visual HTML report: On large codebases, renders a self-contained HTML report in the temp directory with one card per candidate — strength badge, before/after Mermaid and SVG diagrams, and a ranked top recommendation. - Drill and scoping: Once you pick a candidate, it scopes the fix by stating the deepening as a problem, designing the new interface twice under opposing constraints, and naming the test that now hits one seam. - Use Case: A salon booking app's BookingFlow.tsx has grown to 640 lines with 12 useState hooks. The scan flags it, rejects the cosmetic split into sub-components, and recommends extracting a deep useBookingMachine() state module as the top pick. ## Quick Start Ask the AI to scan this React codebase for architectural rot and show me the refactor opportunities worth doing.

Frequently Asked Questions about improve-code-architecture

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

FAQPage Schema
How do I find refactor opportunities in a large React codebase?

Run a whole-tree scan that looks for rot signals like god-components, shallow hooks, duplicated logic across routes, and Next.js server/client boundary tangles. Each candidate is gated by a deletion test that checks whether removing the module concentrates complexity or just relocates it, then ranked in a visual HTML report.

What is the deletion test for refactoring?

The deletion test asks whether deleting a module would concentrate complexity into one place or merely relocate it. Concentrating means a real deepening worth doing; relocating means cosmetic churn like splitting a component into tidy sub-components that prop-drill the same state.

When should I not run an architecture review on my codebase?

Skip it on young or small apps where nothing has deepened yet, since there is no rot to find and the scan would invent refactors to look busy. Also skip prototypes, which are judged on feel rather than architecture, and single diffs or bugs, which belong to code review and debugging workflows.

Does this work with Next.js App Router projects?

Yes, the scan explicitly covers Next.js boundary problems such as 'use client' directives sprawled up the tree, data fetched client-side where a server component would work, and interleaved server/client logic. It discovers the framework seams, including App Router versus Pages Router, during intake.

Why does splitting a big component into smaller ones sometimes make things worse?

Splitting a god-component into sub-components often just prop-drills the same state across more files, turning one fat module into several shallow ones. Locality gets worse because a state bug now spans six files instead of one, which is why the deletion test rejects such splits as cosmetic.