/optimize-build · Comandos slash para Claude Code | Prompt Studio
    1. Claude Code
    2. Comandos slash
    3. /optimize-build
    Claude Code · Comandos slashRendimiento

    /optimize-build

    Acelera el proceso de build.

    por davila7/claude-code-templates

    build

    Licencia: MITVer original

    Instalación

    npx claude-code-templates@latest --command performance/optimize-build

    Contenido

    Dónde va: .claude/commands/optimize-build.md

    ---
    description: "Optimize build processes and speed"
    ---
    
    # Optimize Build Command
    
    Optimize build processes and speed
    
    ## Instructions
    
    Follow this systematic approach to optimize build performance: **$ARGUMENTS**
    
    1. **Build System Analysis**
       - Identify the build system in use (Webpack, Vite, Rollup, Gradle, Maven, Cargo, etc.)
       - Review build configuration files and settings
       - Analyze current build times and output sizes
       - Map the complete build pipeline and dependencies
    
    2. **Performance Baseline**
       - Measure current build times for different scenarios:
         - Clean build (from scratch)
         - Incremental build (with cache)
         - Development vs production builds
       - Document bundle sizes and asset sizes
       - Identify the slowest parts of the build process
    
    3. **Dependency Optimization**
       - Analyze build dependencies and their impact
       - Remove unused dependencies from build process
       - Update build tools to latest stable versions
       - Consider alternative, faster build tools
    
    4. **Caching Strategy**
       - Enable and optimize build caching
       - Configure persistent cache for CI/CD
       - Set up shared cache for team development
       - Implement incremental compilation where possible
    
    5. **Bundle Analysis**
       - Analyze bundle composition and sizes
       - Identify large dependencies and duplicates
       - Use bundle analyzers specific to your build tool
       - Look for opportunities to split bundles
    
    6. **Code Splitting and Lazy Loading**
       - Implement dynamic imports and code splitting
       - Set up route-based splitting for SPAs
       - Configure vendor chunk separation
       - Optimize chunk sizes and loading strategies
    
    7. **Asset Optimization**
       - Optimize images (compression, format conversion, lazy loading)
       - Minify CSS and JavaScript
       - Configure tree shaking to remove dead code
       - Implement asset compression (gzip, brotli)
    
    8. **Development Build Optimization**
       - Enable fast refresh/hot reloading
       - Use development-specific optimizations
       - Configure source maps for better debugging
       - Optimize development server settings
    
    9. **Production Build Optimization**
       - Enable all production optimizations
       - Configure dead code elimination
       - Set up proper minification and compression
       - Optimize for smaller bundle sizes
    
    10. **Parallel Processing**
        - Enable parallel processing where supported
        - Configure worker threads for build tasks
        - Optimize for multi-core systems
        - Use parallel compilation for TypeScript/Babel
    
    11. **File System Optimization**
        - Optimize file watching and polling
        - Configure proper include/exclude patterns
        - Use efficient file loaders and processors
        - Minimize file I/O operations
    
    12. **CI/CD Build Optimization**
        - Optimize CI build environments and resources
        - Implement proper caching strategies for CI
        - Use build matrices efficiently
        - Configure parallel CI jobs where beneficial
    
    13. **Memory Usage Optimization**
        - Monitor and optimize memory usage during builds
        - Configure heap sizes for build tools
        - Identify and fix memory leaks in build process
        - Use memory-efficient compilation options
    
    14. **Output Optimization**
        - Configure compression and encoding
        - Optimize file naming and hashing strategies
        - Set up proper asset manifests
        - Implement efficient asset serving
    
    15. **Monitoring and Profiling**
        - Set up build time monitoring
        - Use build profiling tools to identify bottlenecks
        - Track bundle size changes over time
        - Monitor build performance regressions
    
    16. **Tool-Specific Optimizations**
        
        **For Webpack:**
        - Configure optimization.splitChunks
        - Use thread-loader for parallel processing
        - Enable optimization.usedExports for tree shaking
        - Configure resolve.modules and resolve.extensions
    
        **For Vite:**
        - Configure build.rollupOptions
        - Use esbuild for faster transpilation
        - Optimize dependency pre-bundling
        - Configure build.chunkSizeWarningLimit
    
        **For TypeScript:**
        - Use incremental compilation
        - Configure project references
        - Optimize tsconfig.json settings
        - Use skipLibCheck when appropriate
    
    17. **Environment-Specific Configuration**
        - Separate development and production configurations
        - Use environment variables for build optimization
        - Configure feature flags for conditional builds
        - Optimize for target environments
    
    18. **Testing Build Optimizations**
        - Test build outputs for correctness
        - Verify all optimizations work in target environments
        - Check for any breaking changes from optimizations
        - Measure and document performance improvements
    
    19. **Documentation and Maintenance**
        - Document all optimization changes and their impact
        - Create build performance monitoring dashboard
        - Set up alerts for build performance regressions
        - Regular review and updates of build configuration
    
    Focus on the optimizations that provide the biggest impact for your specific project and team workflow. Always measure before and after to quantify improvements.

    Más en Comandos slash

    • /commit

      Redacta un commit con Conventional Commits a partir de los cambios en stage.

    • /review

      Revisa el diff actual buscando bugs, casos borde y problemas de seguridad.

    • /tests

      Escribe tests para el archivo o función que indiques.

    • /changelog

      Genera las notas de versión desde el último tag.

    • /explain

      Explica cómo funciona un archivo o módulo, con un diagrama del flujo.

    • /cleanup

      Elimina imports, variables y código muerto sin cambiar el comportamiento.

    Ver todo en Comandos slash (717) →

    Tu colección definitiva de prompts de IA. Inspírate, explora ejemplos y crea con IA.

    Hubs principales

    • Prompts
    • Imágenes
    • Videos
    • Generar Videos
    • Plantillas
    • Animaciones
    • Precios
    • Conoce
    • Afiliado

    Explorar por tipo

    • Kits de componentes
    • Etiquetas de imagen
    • Etiquetas de video
    • Webs

    Temas populares

    • Música
    • Portafolio
    • Gaming
    • Viajes
    • Nano Banana Pro

    Legal

    • Términos de uso
    • Política de privacidad
    • Política de cookies
    • Política de licencias
    • Política de reembolsos
    • Términos del programa de afiliados
    • Términos de Crowdfunding

    Magzin LLC, 800 Third Avenue Associates, New York, NY, 10022, United States

    © 2026 Prompt Studio by Magzin. Todos los derechos reservados.