magento-performance-analyst — скилл для Claude Code: анализ
Скилл ведёт агента по профилированию Magento 2: ищет узкие места, разбирает медленные запросы и планирует оптимизации.
npx skills add maxnorm/magento2-agent-skills --skill magento-performance-analyst -a claude-codeЧто делает magento-performance-analyst
Скилл превращает агента в аналитика производительности Magento 2. Он проходит путь от замера базовых метрик до внедрения правок: сначала профилирование кода, базы и сети, потом поиск узких мест, затем план оптимизаций с приоритетами и откатом. Отдельно разбираются метрики — время загрузки страницы, TTFB, LCP, FID, CLS, а по базе время выполнения запросов, число медленных запросов и попадания в кэш.
Внутри — разделы по фронтенду, базе и приложению. Для фронтенда это Core Web Vitals, сжатие JavaScript и CSS, современные форматы картинок. Для базы — устранение N+1, индексы, пул соединений, кэш результатов. Для приложения — оптимизация PHP, утечки памяти, стратегия кэширования, ленивая загрузка. Из инструментов названы Blackfire, XHProf, New Relic и DevTools браузера.
Скилл советует сначала измерить, а потом менять код — без базовой линии любая правка превращается в угадывание. Для профилирования нужен режим developer: bin/magento deploy:mode:set developer. Если вы работаете на проде, переключение режима — это повод сначала проверить, как оно переживёт нагрузку.
Какие задачи решает
- найти узкое место в медленной странице Magento 2
- разобрать медленные SQL-запросы и убрать N+1
- снять базовые метрики перед оптимизацией
- составить план правок с приоритетами и откатом
- проверить фронтенд по Core Web Vitals
Примеры запросов агенту
- профилируй каталог Magento 2 и покажи, где теряется время
- найди медленные запросы на странице товара
- составь план оптимизации с приоритетами по влиянию
Как установить magento-performance-analyst
1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-performance-analyst -a claude-code2Вручную: положить файлы
~/.claude/skills/magento-performance-analyst/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/magento-performance-analyst/
1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-performance-analyst -a codex2Вручную: положить файлы
.agents/skills/magento-performance-analyst/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-performance-analyst -a cursor2Вручную: положить файлы
.cursor/skills/magento-performance-analyst/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install maxnorm/magento2-agent-skills magento-performance-analyst2Вручную: положить файлы
.github/skills/magento-performance-analyst/SKILL.md1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-performance-analyst -a gemini-cli2Командой платформы
gemini skills install https://github.com/maxnorm/magento2-agent-skills --path skills/magento-performance-analystВручную: положить файлы
.devin/skills/magento-performance-analyst/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-performance-analyst -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о magento-performance-analyst
Как установить magento-performance-analyst в Claude?
Выполните npx skills add maxnorm/magento2-agent-skills --skill magento-performance-analyst -a claude-code. Файл скилла появится по пути ~/.claude/skills/magento-performance-analyst/SKILL.md.
Что делает magento-performance-analyst?
Проводит анализ производительности Magento 2: профилирует код, базу и сеть, ищет узкие места и планирует оптимизации с проверкой результата.
Что нужно для профилирования?
Скилл опирается на режим developer, который включается командой bin/magento deploy:mode:set developer, и на инструменты вроде Blackfire, XHProf или New Relic.
Исходный текст
SKILL.md · MIT
--- name: magento-performance-analyst description: Conducts comprehensive Magento 2 performance analysis and optimization. Use when analyzing performance bottlenecks, profiling applications, optimizing database queries, or improving system scalability. Masters profiling tools, database optimization, and enterprise-scale performance tuning. --- # Magento 2 Performance Analyst Expert specialist in conducting comprehensive performance analysis and implementing systematic optimizations that deliver measurable improvements in application speed, scalability, and user experience. ## When to Use - Analyzing performance bottlenecks - Profiling applications - Optimizing database queries - Improving system scalability - Conducting load testing - Optimizing frontend performance ## Performance Analysis ### Profiling Tools - **Blackfire**: Performance profiling and optimization - **XHProf**: PHP profiling tool - **New Relic**: APM monitoring - **Browser DevTools**: Frontend performance analysis - **Database Profiling**: Query profiling and analysis ### Bottleneck Identification - **Code Profiling**: Identify slow functions and performance hotspots - **Database Analysis**: Analyze slow queries and database performance - **Network Analysis**: Identify network latency and bandwidth issues - **Resource Contention**: Identify resource conflicts and bottlenecks - **Third-party Integration**: Analyze external service performance impact ## Performance Optimization Areas ### Frontend Performance - **Core Web Vitals**: Optimize LCP, FID, CLS, and other web vitals - **JavaScript Optimization**: Minimize and optimize JavaScript execution - **CSS Optimization**: Optimize stylesheet delivery and rendering - **Image Optimization**: Modern image formats and responsive loading - **Asset Optimization**: Minimize and compress assets ### Database Optimization - **Query Optimization**: Optimize database queries and eliminate N+1 problems - **Index Strategy**: Design efficient database indexing - **Connection Pooling**: Optimize database connection management - **Query Caching**: Implement query result caching - **Database Tuning**: Tune database configuration for performance ### Application Optimization - **Code Optimization**: Optimize PHP code execution - **Memory Management**: Optimize memory usage and detect leaks - **Caching Strategy**: Implement comprehensive caching strategies - **Resource Management**: Optimize CPU, I/O, and network resources - **Lazy Loading**: Implement lazy loading for expensive operations ## Performance Analysis Process ### 1. Performance Assessment - **Baseline Establishment**: Establish current performance baselines and metrics - **User Experience Analysis**: Analyze real user performance and experience - **System Resource Analysis**: Assess CPU, memory, disk, and network usage - **Application Profiling**: Deep application profiling and code analysis - **Infrastructure Assessment**: Evaluate infrastructure performance and capacity ### 2. Bottleneck Identification - **Code Profiling**: Identify slow functions and performance hotspots - **Database Analysis**: Analyze slow queries and database performance - **Network Analysis**: Identify network latency and bandwidth issues - **Resource Contention**: Identify resource conflicts and bottlenecks - **Third-party Integration**: Analyze external service performance impact ### 3. Optimization Planning - **Priority Matrix**: Prioritize optimizations based on impact and effort - **Resource Planning**: Plan resource requirements for optimizations - **Risk Assessment**: Assess risks associated with performance changes - **Testing Strategy**: Plan comprehensive testing for optimization changes - **Rollback Planning**: Prepare rollback strategies for optimization failures ### 4. Implementation & Validation - **Optimization Implementation**: Implement systematic performance improvements - **Performance Testing**: Validate optimization effectiveness through testing - **Monitoring Setup**: Implement monitoring for sustained performance - **Documentation**: Document optimization changes and performance gains - **Continuous Monitoring**: Establish ongoing performance monitoring ## Performance Metrics ### Key Metrics - **Page Load Time**: Total page load time - **Time to First Byte (TTFB)**: Server response time - **Largest Contentful Paint (LCP)**: Loading performance - **First Input Delay (FID)**: Interactivity - **Cumulative Layout Shift (CLS)**: Visual stability ### Database Metrics - **Query Execution Time**: Database query performance - **Slow Query Count**: Number of slow queries - **Connection Pool Usage**: Database connection efficiency - **Index Usage**: Index effectiveness - **Cache Hit Rate**: Cache performance ## Best Practices ### Optimization Strategy - **Measure First**: Always measure before optimizing - **Prioritize High Impact**: Focus on optimizations with highest impact - **Incremental Approach**: Make incremental improvements - **Test Thoroughly**: Test all optimizations thoroughly - **Monitor Continuously**: Monitor performance continuously ### Scalability Planning - **Horizontal Scaling**: Design for horizontal scaling - **Vertical Scaling**: Optimize for vertical scaling when needed - **Load Balancing**: Implement proper load balancing - **Resource Planning**: Plan for resource growth - **Performance Budgets**: Set and maintain performance budgets ## Tools & Commands ### Profiling Commands ```bash # Enable developer mode for profiling bin/magento deploy:mode:set developer # Check performance bin/magento setup:performance:generate-fixtures # Database status bin/magento setup:db:status ``` ### Monitoring - Set up APM tools (New Relic, Datadog, etc.) - Monitor server resources (CPU, memory, disk) - Track application metrics - Set up alerts for performance degradation ## References - [Adobe Commerce Performance Best Practices](https://developer.adobe.com/commerce/php/best-practices/performance/) - [Performance Testing](https://developer.adobe.com/commerce/php/development/testing/performance/) Focus on systematic performance analysis and optimization that delivers measurable improvements.
© maxnorm · MIT · maxnorm/magento2-agent-skills