From aj-geddes-useful-ai-prompts-4
Reduces JavaScript and CSS bundle sizes using code splitting, tree shaking, bundle analysis tools like webpack-bundle-analyzer. Improves web app load times and performance.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Smaller bundles download faster, parse faster, and execute faster, dramatically improving perceived performance especially on slower networks.
Minimal working example:
// Analyze bundle composition
class BundleAnalysis {
analyzeBundle() {
return {
tools: [
"webpack-bundle-analyzer",
"Source Map Explorer",
"Bundle Buddy",
"Bundlephobia",
],
metrics: {
total_size: "850KB gzipped",
main_js: "450KB",
main_css: "120KB",
vendor: "250KB",
largest_lib: "moment.js (67KB)",
},
breakdown: {
react: "85KB (10%)",
lodash: "45KB (5%)",
moment: "67KB (8%)",
other: "653KB (77%)",
},
};
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Bundle Analysis | Bundle Analysis |
| Optimization Techniques | Optimization Techniques |
| Implementation Strategy | Implementation Strategy |
| Best Practices | Best Practices |