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).
70
63%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./packages/skills-catalog/skills/(architecture)/component-flattening-analysis/SKILL.mdQuality
Discovery
100%Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.
This is an excellent skill description that hits all the marks. It provides specific concrete actions, includes natural trigger terms users would say, explicitly addresses both what and when, and proactively disambiguates from related skills with 'Do NOT use' guidance. The description is concise yet comprehensive.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Lists multiple specific concrete actions: 'detects misplaced classes', 'fixes component hierarchy problems', 'finds code that should belong inside a component but sits at the root level'. These are clear, actionable capabilities. | 3 / 3 |
Completeness | Clearly answers both 'what' (detects misplaced classes, fixes component hierarchy problems) and 'when' (explicit 'Use when' clause with multiple trigger phrases). Also includes explicit 'Do NOT use' guidance for disambiguation, which is excellent. | 3 / 3 |
Trigger Term Quality | Includes natural trigger terms users would say: 'clean up component structure', 'find orphaned classes', 'fix module hierarchy', 'flatten nested components', 'misplaced code', 'namespaces'. Good coverage of variations a user might naturally use. | 3 / 3 |
Distinctiveness Conflict Risk | Highly distinctive with a clear niche (component hierarchy and misplaced classes). The explicit 'Do NOT use' clauses referencing specific alternative skills (coupling-analysis, domain-identification-grouping) actively reduce conflict risk. | 3 / 3 |
Total | 12 / 12 Passed |
Implementation
27%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
This skill is extremely verbose and repetitive, restating the same three flattening strategies and orphaned class concept across nearly every section. While it provides some useful concrete examples (directory structures, JavaScript detection code), the sheer volume of redundant content undermines its utility as a skill file. The content would benefit enormously from being condensed to ~25% of its current size and splitting detailed reference material into separate files.
Suggestions
Reduce content by 70-80%: eliminate repeated explanations of orphaned classes, root namespaces, and flattening strategies — state each concept once with one example, then reference it.
Split detailed content into separate files: move fitness functions to FITNESS.md, implementation notes per language to IMPLEMENTATION.md, and common patterns to PATTERNS.md, with clear one-level references from the main skill.
Replace the 'Usage Examples' section (which just lists vague steps) with actual executable examples showing real commands or code that Claude should run during analysis.
Add explicit validation checkpoints in the workflow: specify how to verify imports are correct after moving files, how to detect broken references, and what constitutes a successful flattening.
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | Extremely verbose at ~500+ lines. Massive repetition across phases, examples, output formats, patterns, and notes — the same concepts (orphaned classes, flattening strategies, consolidate/split/shared) are restated 5-6 times in slightly different forms. Claude doesn't need explanations of what a leaf node or root namespace is repeated this many times. | 1 / 3 |
Actionability | Provides some concrete code examples (JavaScript detection functions, fitness functions) and specific directory structure examples, but much of the content describes what 'the skill will do' in vague numbered lists rather than giving executable instructions. The usage examples are just descriptions of steps, not actual commands or code to run. | 2 / 3 |
Workflow Clarity | The 5-phase process is clearly sequenced and the checklist at the end is helpful, but validation checkpoints are weak — Phase 5 mentions 'run tests' and 'verify changes' without specifying how to validate that the flattening was correct. For destructive refactoring operations (moving files, updating imports), the feedback loops are implicit rather than explicit. | 2 / 3 |
Progressive Disclosure | Monolithic wall of text with no references to external files. All content — core concepts, analysis process, output formats, implementation notes, fitness functions, best practices, common patterns — is inlined in a single massive document. Much of this (e.g., fitness functions, implementation notes per language, common patterns) should be split into separate referenced files. | 1 / 3 |
Total | 6 / 12 Passed |
Validation
90%Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.
Validation — 10 / 11 Passed
Validation for skill structure
| Criteria | Description | Result |
|---|---|---|
skill_md_line_count | SKILL.md is long (694 lines); consider splitting into references/ and linking | Warning |
Total | 10 / 11 Passed | |
81e7e0d
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.