optimize
БесплатноБез исполняемых скриптовНе проверенOn-demand performance and optimization analysis. Use when identifying bottlenecks, improving build times, reducing bundle size, or optimizing code…
от MadAppGang★ 290 звёзд на GitHubОб этом скилле
Optimize Skill
Overview
The optimize skill provides comprehensive on-demand performance and optimization analysis for your codebase. It identifies bottlenecks, slow builds, large bundles, inefficient code patterns, and opportunities for performance improvements across all supported technology stacks.
When to Use:
- Performance issues and slow response times
- Large bundle sizes and slow page loads
- Long build and compile times
- High memory usage
- Database query optimization
- API endpoint performance tuning
- CI/CD pipeline optimization
Technology Coverage:
- React/TypeScript/JavaScript (Vite, Webpack, Rollup)
- Go applications (build time, runtime performance)
- Rust projects (compile time, binary size)
- Python codebases (runtime optimization)
- Full-stack applications
- Database queries (SQL, ORM)
Optimization Categories
1. Build Performance
What Gets Analyzed:
- Build duration and bottlenecks
- Dependency resolution time
- TypeScript compilation speed
- Asset processing (images, fonts)
- Code splitting effectiveness
- Cache utilization
Common Issues:
- Unnecessary re-builds of unchanged code
- Large dependency trees
- Inefficient TypeScript configuration
- Missing build caching
- Redundant asset processing
Optimization Targets:
- Reduce build time by 30-50%
- Enable incremental builds
- Optimize dependency resolution
- Improve cache hit rates
2. Bundle Size
What Gets Measured:
- Total bundle size (uncompressed/gzipped)
- Individual chunk sizes
- Duplicate dependencies
- Tree-shaking effectiveness
- Unused code in bundles
- Third-party library sizes
Bundle Analysis:
Bundle Size Breakdown:
├── vendor.js: 847 KB (312 KB gzipped)
│ ├── react-dom: 142 KB
│ ├── lodash: 71 KB (should use lodash-es)
│ ├── moment: 67 KB (consider date-fns)
│ └── ...
├── main.js: 234 KB (89 KB gzipped)
└── [lazy chunks]: 156 KB total
Optimization Goals:
- Keep initial bundle under 200 KB (gzipped)
- Lazy load non-critical code
- Remove duplicate dependencies
- Use lighter alternatives
3. Runtime Performance
What Gets Profiled:
- Function execution time
- Component render performance
- Memory allocation patterns
- Garbage collection pressure
- Event loop blocking
- Async operation efficiency
Performance Metrics:
- Time to First Byte (TTFB)
- First Contentful Paint (FCP)
- Largest Contentful Paint (LCP)
- Total Blocking Time (TBT)
- Cumulative Layout Shift (CLS)
Detection Methods:
- Profiling data analysis
- Flame graph generation
- Hot path identification
- Memory leak detection
4. Memory Usage
What Gets Monitored:
- Heap allocation patterns
- Memory leaks
- Large object retention
- Closure memory overhead
- Cache memory usage
- Buffer allocation
Red Flags:
- Growing heap over time (leak)
- Excessive garbage collection
- Large retained objects
- Detached DOM nodes (React)
- Unclosed connections/subscriptions
5. API and Database Performance
What Gets Analyzed:
- Query execution time
- N+1 query problems
- Missing database indexes
- API response times
- Network round trips
- Cache effectiveness
Database Optimization:
- Slow query identification
- Index recommendations
- Query plan analysis
- Connection pooling efficiency
Analysis Patterns
Identifying Bottlenecks
Step 1: Measure Current Performance
Collect baseline metrics:
- Build time:
time npm run build - Bundle size: Analyze with webpack-bundle-analyzer
- Runtime: Browser DevTools Performance tab
- API: Response time logs
Step 2: Profile and Identify Hot Paths
Find where time is spent:
- CPU profiling for computation
- Heap snapshots for memory
- Network waterfall for I/O
- Flame graphs for call stacks
Step 3: Prioritize Optimizations
Focus on:
- Highest impact (largest bottleneck)
- Lowest effort (quick wins)
- Most frequent (called often)
Step 4: Measure Impact
After optimization:
- Re-run benchmarks
- Compare before/after metrics
- Validate improvements
Tools and Commands
JavaScript/TypeScript:
# Bundle analysis
npx webpack-bundle-analyzer dist/stats.json
# Build performance
npm run build -- --profile --json > stats.json
# Runtime profiling
node --prof app.js
node --prof-process isolate-*.log > processed.txt
Go:
# Build time analysis
go build -x 2>&1 | ts '[%Y-%m-%d %H:%M:%S]'
# CPU profiling
go test -cpuprofile=cpu.prof -bench=.
go tool pprof cpu.prof
# Memory profiling
go test -memprofile=mem.prof -bench=.
go tool pprof mem.prof
Rust:
# Compile time analysis
cargo build --timings
# Binary size analysis
cargo bloat --release
# Runtime profiling
cargo flamegraph --bench benchmark_name
Optimization Report Format
Performance Report Structure
# Performance Optimization Report
**Generated**: 2026-01-28 14:32:00
**Scope**: Full application analysis
**Baseline**: Established 2026-01-21
## Executive Summary
**Overall Performance Scor
Установить optimize в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл optimize?
On-demand performance and optimization analysis. Use when identifying bottlenecks, improving build times, reducing bundle size, or optimizing code performance. Trigger keywords - "optimize", "performance", "bottleneck", "bundle size", "build time", "speed up".
Как установить скилл optimize?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл optimize запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic