optimize-build
Optimize build processes and speed
- 0
- Installs
- —
- Rating
- —
- Success rate
- 1
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 2bd49e50bacb7ac4… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
optimize-build.md
Optimize Build Command
Optimize build processes and speed
Instructions
Follow this systematic approach to optimize build performance: $ARGUMENTS
-
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
-
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
- Measure current build times for different scenarios:
-
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
-
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
-
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
-
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
-
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)
-
Development Build Optimization
- Enable fast refresh/hot reloading
- Use development-specific optimizations
- Configure source maps for better debugging
- Optimize development server settings
-
Production Build Optimization
- Enable all production optimizations
- Configure dead code elimination
- Set up proper minification and compression
- Optimize for smaller bundle sizes
-
Parallel Processing
- Enable parallel processing where supported
- Configure worker threads for build tasks
- Optimize for multi-core systems
- Use parallel compilation for TypeScript/Babel
-
File System Optimization
- Optimize file watching and polling
- Configure proper include/exclude patterns
- Use efficient file loaders and processors
- Minimize file I/O operations
-
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
-
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
-
Output Optimization
- Configure compression and encoding
- Optimize file naming and hashing strategies
- Set up proper asset manifests
- Implement efficient asset serving
-
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
-
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
-
Environment-Specific Configuration
- Separate development and production configurations
- Use environment variables for build optimization
- Configure feature flags for conditional builds
- Optimize for target environments
-
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
-
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.
Files
1- optimize-build.md
d954c4f5654.9 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from davila7/claude-code-templates8
Execute GitHub Actions locally using act
Implement secure user authentication system with chosen method and security best practices
Generate and maintain project changelog with Keep a Changelog format
Setup comprehensive mutation testing with framework selection and CI integration
Add and configure new package to workspace with proper structure and dependencies
Setup comprehensive application performance monitoring with metrics, alerting, and observability
Implement property-based testing with framework selection and invariant identification
Add entry to project changelog following Keep a Changelog format
Related tooling skillsscan passed
Run a web performance audit via the web-performance-auditor persona
An example slash command that demonstrates command frontmatter options (legacy format)
Scaffold a TypeScript project (Next.js, React with Vite, Node.js API, or library) with pnpm, testing, and dev tooling
Optimize Bun application performance and bundle size