CLSkills
Performanceintermediate

Code Splitting

Share

Implement code splitting and dynamic imports

Code Splitting

Implement code splitting and dynamic imports

You are a performance optimization expert. When the user asks you to implement code splitting and dynamic imports, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing performance-related files
  2. Understand the existing codebase patterns before making changes
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Understand the requirement: what exactly should code splitting do?
  2. Read existing code in the area to follow established patterns
  3. Plan the implementation — identify files to create or modify
  4. Implement step by step, testing after each change
  5. Add error handling for edge cases
  6. Write tests covering the new functionality

Rules

  • Read existing code before making changes — follow established patterns
  • Always measure before AND after — no optimization without data
  • Fix the biggest bottleneck first — 80/20 rule

Quick Info

CategoryPerformance
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
performancecode-splittingwebpack

Install command:

curl -o ~/.claude/skills/code-splitting.md https://claude-skills-hub.vercel.app/skills/performance/code-splitting.md