component-flattening-analysis
Detects misplaced classes and fixes component hierarchy problems — finds code that should belong inside a component but sits at the root level. Use when asking "clean up component structure", "find orphaned classes", "fix module hierarchy", "flatten nested components", or analyzing why namespaces have misplaced code. Do NOT use for dependency analysis (use coupling-analysis) or domain grouping (use domain-identification-grouping).
npx skills add tech-leads-club/agent-skills --skill component-flattening-analysis --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Component Flattening Analysis This skill identifies component hierarchy issues and ensures components exist only as leaf nodes in directory/namespace structures, removing orphaned classes from root namespaces. ## How to Use ### Quick Start Request analysis of your codebase: - **"Find orphaned classes in root namespaces"** - **"Flatten component hierarchies"** - **"Identify components that need flattening"** - **"Analyze component structure for hierarchy issues"** ### Usage Examples **Example 1: Find Orphaned Classes** ``` User: "Find orphaned classes in root namespaces" The skill will: 1. Scan component namespaces for hierarchy issues 2. Identify orphaned classes in root namespaces 3. Detect components built on top of other components 4. Suggest flattening strategies 5. Create refactoring plan ``` **Example 2: Flatten Components** ``` User: "Flatten component hierarchies in this codebase" The skill will: 1. Identify components with hierarchy issues 2. Analyze orphaned classes 3. Suggest consolidation or splitting strategies 4. Create refactoring plan 5. Estimate effort ``` **Example 3: Component Structure Analysis** ``` User: "Analyze component structure for hierarchy issues" The
- How to Use
- Quick Start
- Usage Examples
- Step-by-Step Process
- When to Use
- Core Concepts
- Component Definition
- Root Namespace
- Orphaned Classes
- Flattening Strategies
- Analysis Process
- Phase 1: Map Component Structure
- Phase 2: Identify Orphaned Classes
- Phase 3: Analyze Flattening Options
What does the component-flattening-analysis skill do?
Detects misplaced classes and fixes component hierarchy problems — finds code that should belong inside a component but sits at the root level. Use when asking "clean up component structure", "find orphaned classes", "fix module hierarchy", "flatten nested components", or analyzing why namespaces have misplaced code. Do NOT use for dependency analysis (use coupling-analysis) or domain grouping (use domain-identification-grouping).
How do I install it?
Run `npx skills add tech-leads-club/agent-skills --skill component-flattening-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From tech-leads-club/agent-skills, a repository with 4,983 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
