component-identification-sizing
Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use for runtime performance sizing or infrastructure capacity planning.
What this skill does
# Component Identification and Sizing This skill identifies architectural components (logical building blocks) in a codebase and calculates size metrics to assess decomposition feasibility and identify oversized components. ## How to Use ### Quick Start Request analysis of your codebase: - **"Identify and size all components in this codebase"** - **"Find oversized components that need splitting"** - **"Create a component inventory for decomposition planning"** - **"Analyze component size distribution"** ### Usage Examples **Example 1: Complete Analysis** ``` User: "Identify and size all components in this codebase" The skill will: 1. Map directory/namespace structures 2. Identify all components (leaf nodes) 3. Calculate size metrics (statements, files, percentages) 4. Generate component inventory table 5. Flag oversized/undersized components 6. Provide recommendations ``` **Example 2: Find Oversized Components** ``` User: "Which components are too large?" The skill will: 1. Calculate mean and standard deviation 2. Identify components >2 std dev or >10% threshold 3. Analyze functional areas within large components 4. Suggest specific splits with estimated sizes ``` **Example 3: Component Size Analysis** ``` User: "Analyze component sizes and distribution" The skill will: 1. Calculate all size metrics 2. Generate size distribution summary 3. Identify outliers 4. Provide statistics and recommendations ``` ### Step-by-Step Process 1. **Initial Analysis**: Start with complete component inventory 2. **Identify Issues**: Find components that need attention 3. **Get Recommendations**: Request actionable split/consolidation suggestions 4. **Monitor Progress**: Track component growth over time ## When to Use Apply this skill when: - Starting a monolithic decomposition effort - Assessing codebase structure and organization - Identifying components that are too large or too small - Creating component inventory for migration planning - Analyzing code distribution across components - Preparing for component-based decomposition patterns ## Core Concepts ### Component Definition A **component** is an architectural building block that: - Has a well-defined role and responsibility - Is identified by a namespace, package structure, or directory path - Contains source code files (classes, functions, modules) grouped together - Performs specific business or infrastructure functionality **Key Rule**: Components are identified by **leaf nodes** in directory/namespace structures. If a namespace is extended (e.g., `services/billing` extended to `services/billing/payment`), the parent becomes a **subdomain**, not a component. ### Size Metrics **Statements** (not lines of code): - Count executable statements terminated by semicolons or newlines - More accurate than lines of code for size comparison - Accounts for code complexity, not formatting **Component Size Indicators**: - **Percent of codebase**: Component statements / Total statements - **File count**: Number of source files in component - **Standard deviation**: Distance from mean component size ## Analysis Process ### Phase 1: Identify Components Scan the codebase directory structure: 1. **Map directory/namespace structure** - For Node.js: `services/`, `routes/`, `models/`, `utils/` - For Java: Package structure (e.g., `com.company.domain.service`) - For Python: Module paths (e.g., `app/billing/payment`) 2. **Identify leaf nodes** - Components are the deepest directories containing source files - Example: `services/BillingService/` is a component - Example: `services/BillingService/payment/` extends it, making `BillingService` a subdomain 3. **Create component inventory** - List each component with its namespace/path - Note any parent namespaces (subdomains) ### Phase 2: Calculate Size Metrics For each component: 1. **Count statements** - Parse source files in component directory - Count executable statements (not comments, blank lines, or declarations alone) - Sum across all files in component 2. **Count files** - Total source files (`.js`, `.ts`, `.java`, `.py`, etc.) - Exclude test files, config files, documentation 3. **Calculate percentage** ``` component_percent = (component_statements / total_statements) * 100 ``` 4. **Calculate statistics** - Mean component size: `total_statements / number_of_components` - Standard deviation: `sqrt(sum((size - mean)^2) / (n - 1))` - Component's deviation: `(component_size - mean) / std_dev` ### Phase 3: Identify Size Issues **Oversized Components** (candidates for splitting): - Exceeds 30% of total codebase (for small apps with <10 components) - Exceeds 10% of total codebase (for large apps with >20 components) - More than 2 standard deviations above mean - Contains multiple distinct functional areas **Undersized Components** (candidates for consolidation): - Less than 1% of codebase (may be too granular) - Less than 1 standard deviation below mean - Contains only a few files with minimal functionality **Well-Sized Components**: - Between 1-2 standard deviations from mean - Represents a single, cohesive functional area - Appropriate percentage for application size ## Output Format ### Component Inventory Table ```markdown ## Component Inventory | Component Name | Namespace/Path | Statements | Files | Percent | Status | | --------------- | ---------------------------- | ---------- | ----- | ------- | ------------ | | Billing Payment | services/BillingService | 4,312 | 23 | 5% | ✅ OK | | Reporting | services/ReportingService | 27,765 | 162 | 33% | ⚠️ Too Large | | Notification | services/NotificationService | 1,433 | 7 | 2% | ✅ OK | ``` **Status Legend**: - ✅ OK: Well-sized (within 1-2 std dev from mean) - ⚠️ Too Large: Exceeds size threshold or >2 std dev above mean - 🔍 Too Small: <1% of codebase or <1 std dev below mean ### Size Analysis Summary ```markdown ## Size Analysis Summary **Total Components**: 18 **Total Statements**: 82,931 **Mean Component Size**: 4,607 statements **Standard Deviation**: 5,234 statements **Oversized Components** (>2 std dev or >10%): - Reporting (33% - 27,765 statements) - Consider splitting into: - Ticket Reports - Expert Reports - Financial Reports **Well-Sized Components** (within 1-2 std dev): - Billing Payment (5%) - Customer Profile (5%) - Ticket Assignment (9%) **Undersized Components** (<1 std dev): - Login (2% - 1,865 statements) - Consider consolidating with Authentication ``` ### Component Size Distribution ```markdown ## Component Size Distribution ``` Component Size Distribution (by percent of codebase) [Visual representation or histogram if possible] Largest: ████████████████████████████████████ 33% (Reporting) ████████ 9% (Ticket Assign) ██████ 8% (Ticket) ██████ 6% (Expert Profile) █████ 5% (Billing Payment) ████ 4% (Billing History) ... ```` ### Recommendations ```markdown ## Recommendations ### High Priority: Split Large Components **Reporting Component** (33% of codebase): - **Current**: Single component with 27,765 statements - **Issue**: Too large, contains multiple functional areas - **Recommendation**: Split into: 1. Reporting Shared (common utilities) 2. Ticket Reports (ticket-related reports) 3. Expert Reports (expert-related reports) 4. Financial Reports (financial reports) - **Expected Result**: Each component ~7-9% of codebase ### Medium Priority: Review Small Components **Login Component** (2% of codebase): - **Current**: 1,865 statements, 3 files - **Consideration**: May be too granular if related to broader authentication - **Recommendation**: Evaluate if should be consolidated with Authentication/User components ### Low Priority: Monitor Well-Sized Components Most components are appropriately sized. Continue monitoring during decomposition. ```` ## Analysis Checklist **Componen
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.