← ClaudeAtlas

code-consolidationlisted

This skill should be used when the user asks to "find duplicated code", "map responsibilities", "consolidate code", "find code sprawl", "analyze duplication", "create consolidation plan", or mentions "código duplicado", "responsabilidades espalhadas", "consolidar". Analyzes codebases to identify scattered responsibilities that should be centralized.
parisgroup-ai/imersao-ia-setup · ★ 1 · AI & Automation · score 80
Install: claude install-skill parisgroup-ai/imersao-ia-setup
# Code Consolidation Mapper Analyze codebases to identify responsibilities scattered across multiple files that should be consolidated into single sources of truth. ## Purpose Map fragmented code responsibilities and generate actionable consolidation plans. Detect: - Duplicate type definitions - Scattered utility functions - Repeated configuration patterns - Fragmented error hierarchies - Inconsistent factory implementations ## When to Use - Before major refactoring efforts - When onboarding to brownfield codebases - During architecture reviews - When code smells indicate duplication - Planning consolidation sprints ## Analysis Process ### Phase 1: Pattern Detection Scan for common duplication patterns using targeted searches: ```bash # Type definitions scattered grep -rn "export (type|interface) " --include="*.ts" | sort | uniq -d # Similar function names in different files grep -rn "export function \w+" --include="*.ts" | awk -F: '{print $3}' | sort | uniq -c | sort -rn # Duplicate class definitions grep -rn "class \w+Error" --include="*.ts" --include="*.py" # Configuration objects with same structure grep -rn "STATUS_CONFIG\|VARIANT_CONFIG" --include="*.ts" # Factory patterns repeated grep -rn "create.*Factory\|.*Factory\(" --include="*.ts" ``` ### Phase 2: Responsibility Mapping For each detected pattern, classify by category: | Category | Detection Pattern | Consolidation Target | |----------|-------------------|---------------------| | **Types** | Same i