component-flattening-analysis

Detect misplaced root namespace classes and generate component flattening strategies.

Updated May 1, 2026
One-click install
npx skills add https://github.com/Roger-Quinelato/BBSIA-Copia --skill component-flattening-analysis-roger-quinelato
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-flattening-analysis
Source: https://github.com/Roger-Quinelato/BBSIA-Copia/tree/main/.claude/skills/component-flattening-analysis
Command: npx skills add https://github.com/Roger-Quinelato/BBSIA-Copia --skill component-flattening-analysis-roger-quinelato

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill detects classes that are improperly placed in root namespaces and ensures that components only exist as leaf nodes within directory or namespace structures.

Core Features & Use Cases

  • Identify orphaned classes in root namespaces that should be part of components
  • Analyze component hierarchy to detect nesting and hierarchy violations
  • Suggest flattening strategies such as consolidation, splitting, or shared code extraction
  • Create detailed refactoring plans for component restructuring
  • Assist developers in maintaining clean, modular codebases with proper component boundaries

Quick Start

Use the component-flattening-analysis skill to examine your codebase for hierarchy violations and receive a detailed plan to fix them.

Frequently Asked Questions about component-flattening-analysis

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

FAQPage Schema
How do I detect misplaced classes sitting in root namespaces?

You can flatten component hierarchy by analyzing directory and namespace relationships to detect orphaned classes at root levels. This skill provides actionable strategies like consolidation, splitting, or shared code extraction to fix misplaced classes.

What is component flattening in code refactoring?

Component flattening is a refactoring technique that restructures module hierarchy to ensure components exist only as leaf nodes. It eliminates hierarchy violations by reorganizing misplaced root namespace classes into properly nested component boundaries.

How do I fix hierarchy violations in a large codebase?

You fix hierarchy violations by detecting orphaned classes at root levels and applying actionable flattening strategies. Techniques include consolidation, splitting, or shared code extraction to maintain consistent component boundaries within large codebases.

What's the best way to refactor component structure for modular code?

The best way to refactor component structure is to analyze namespace relationships and generate a detailed restructuring plan. This ensures components act exclusively as leaf nodes and removes misplaced classes from root directories.

When do I need to analyze directory and namespace relationships?

You need to analyze directory and namespace relationships when maintaining consistent component boundaries within large codebases. This analysis detects nesting violations and orphaned classes that require flattening strategies to improve module structure.