component-flattening-analysis

Detect orphaned classes in root namespaces and recommend component flattening strategies.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/rafael-hc/AoPonto-FoodService --skill component-flattening-analysis-rafael-hc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-flattening-analysis
Source: https://github.com/rafael-hc/AoPonto-FoodService/tree/main/.agents/skills/component-flattening-analysis
Command: npx skills add https://github.com/rafael-hc/AoPonto-FoodService --skill component-flattening-analysis-rafael-hc

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill tackles messy component hierarchies by identifying and fixing misplaced code (orphaned classes) in root namespaces, ensuring a clean and logical code structure.

Core Features & Use Cases

  • Orphaned Class Detection: Finds source files incorrectly placed in root namespaces.
  • Flattening Strategy Analysis: Recommends whether to consolidate, split, or extract shared code.
  • Use Case: You have a large utils directory with many files that should logically belong to specific components. This Skill helps you identify those files and provides a plan to move them into their correct component namespaces.

Quick Start

Analyze the component structure for hierarchy issues and provide recommendations.

Frequently Asked Questions about component-flattening-analysis

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

FAQPage Schema
How do I find orphaned classes in root namespaces to clean up component structure?

To clean up component structure, you can analyze your codebase to detect orphaned classes incorrectly placed in root namespaces. This process identifies misplaced source files and provides a plan to move them into their correct component namespaces.

What is the best way to flatten nested components and fix module hierarchy?

The best way to fix module hierarchy is by analyzing the component structure to ensure components exist solely as leaf nodes. This eliminates deep nesting by providing specific strategies to consolidate, split, or extract shared code.

How do I refactor a large utils directory with files that should belong to specific components?

To refactor a large utils directory, you analyze the files to identify those that logically belong to specific components. This provides a clear refactoring plan to move the misplaced files into their correct component namespaces.

When do I need to use a flattening strategy for component hierarchies?

You need a flattening strategy when your component structure becomes messy and contains orphaned classes in root namespaces. It is required when you want to improve code organization and maintainability by ensuring components exist solely as leaf nodes.

What refactoring strategies are recommended for eliminating clutter in component structure?

To eliminate clutter in component structure, the recommended refactoring strategies are consolidating, splitting, or extracting shared code. These approaches help resolve misplaced code and ensure a clean, logical namespace hierarchy.