magento-index-analyst — скилл для Claude Code: индексы Magento 2
Скилл magento-index-analyst для Claude Code разбирает индексацию Magento 2: переиндексацию, настройку Elasticsearch и индексы в базе. Разбирает медленную работу каталога и поиска.
MIT 179 установок ★ 33 обновлён 2026-01-24
npx skills add maxnorm/magento2-agent-skills --skill magento-index-analyst -a claude-codeЧто делает magento-index-analyst
Скилл разбирает индексацию в Magento 2: какие индексаторы есть в ядре, как их переиндексировать и где смотреть статус. Внутри — команды bin/magento indexer:reindex, bin/magento indexer:status и bin/magento indexer:reset, пример настройки Elasticsearch в app/etc/env.php и порядок работы с кастомными индексаторами через AbstractIndexer.
Работа идёт в четыре шага: аудит текущей конфигурации и поиск узкого места, проект стратегии переиндексации, настройка, проверка под нагрузкой. Отдельный блок — индексы в базе: составные и покрывающие, планы запросов через EXPLAIN, медленный лог и N+1.
Код скилл не переписывает, он только советует. Пример конфига задаёт движок elasticsearch7, так что под другую версию ключи в env.php будут другими, и это первое, что придётся править руками.
Какие задачи решает
- Найти индексатор, который тормозит переиндексацию каталога
- Прописать Elasticsearch как поисковый движок в
app/etc/env.php - Снять статус индексаторов перед выкладкой
- Убрать N+1 в запросах карточки товара
- Спроектировать составной индекс под частый запрос
Примеры запросов агенту
- Переиндексация каталога идёт слишком долго — посмотри индексаторы Magento и предложи, что менять
- Настрой Elasticsearch для поиска в Magento 2 через
app/etc/env.php - Напиши кастомный индексатор для остатков на базе
AbstractIndexer
Как установить magento-index-analyst
1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-index-analyst -a claude-code2Вручную: положить файлы
~/.claude/skills/magento-index-analyst/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/magento-index-analyst/
1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-index-analyst -a codex2Вручную: положить файлы
.agents/skills/magento-index-analyst/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-index-analyst -a cursor2Вручную: положить файлы
.cursor/skills/magento-index-analyst/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install maxnorm/magento2-agent-skills skills/magento-index-analyst2Вручную: положить файлы
.github/skills/magento-index-analyst/SKILL.md1Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-index-analyst -a gemini-cli2Командой платформы
gemini skills install https://github.com/maxnorm/magento2-agent-skills --path skills/magento-index-analystВручную: положить файлы
.devin/skills/magento-index-analyst/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add maxnorm/magento2-agent-skills --skill magento-index-analyst -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о magento-index-analyst
Как установить magento-index-analyst в Claude Code?
Выполните npx skills add maxnorm/magento2-agent-skills --skill magento-index-analyst -a claude-code. Файл скилла появится по пути ~/.claude/skills/magento-index-analyst/SKILL.md.
Что делает magento-index-analyst?
Разбирает индексацию в Magento 2: типы индексаторов, стратегию переиндексации, настройку Elasticsearch и индексы в базе. Подсказывает, что менять, когда поиск и каталог отвечают медленно.
С какой версией Elasticsearch работает пример конфига?
В примере движок задан как elasticsearch7 с хостом localhost и портом 9200. Для другой версии ключи в app/etc/env.php нужно переписать.
Исходный текст
SKILL.md · MIT
---
name: magento-index-analyst
description: Optimizes Magento 2 indexing for search performance and database efficiency. Use when optimizing search performance, configuring Elasticsearch, designing database indexes, or improving reindexing strategies. Masters indexer optimization, Elasticsearch configuration, and database indexing.
---
# Magento 2 Index Analyst
Expert specialist in designing and implementing high-performance indexing strategies that dramatically improve search performance, catalog browsing, and overall application responsiveness.
## When to Use
- Optimizing search performance
- Configuring Elasticsearch
- Designing database indexes
- Improving reindexing strategies
- Troubleshooting indexing issues
- Planning indexing architecture
## Magento Indexing Architecture
- **Indexer Types**: Master all Magento indexers and their optimization strategies
- **Index Management**: Expert in index lifecycle management and maintenance
- **Reindexing Strategies**: Optimize reindexing processes and scheduling
- **Index Storage**: Optimize index storage and data structures
- **Performance Monitoring**: Monitor and analyze index performance metrics
## Index Types
### Magento Core Indexers
- **Catalog Product**: Optimize product catalog indexing for fast browsing
- **Catalog Category**: Optimize category hierarchy and navigation indexing
- **Catalog Search**: Optimize search indexing for fast and relevant results
- **Stock Indexer**: Optimize inventory indexing for real-time stock status
- **Price Indexer**: Optimize pricing indexing for dynamic pricing
- **Customer Grid**: Optimize customer data indexing for admin grids
### Custom Indexers
- Create custom indexers for specific business needs
- Implement indexer classes extending `AbstractIndexer`
- Design efficient index data structures
- Optimize index update processes
## Elasticsearch Configuration
### Setup
```php
// app/etc/env.php
'system' => [
'default' => [
'catalog' => [
'search' => [
'engine' => 'elasticsearch7',
'elasticsearch7_server_hostname' => 'localhost',
'elasticsearch7_server_port' => '9200',
'elasticsearch7_index_prefix' => 'magento2',
]
]
]
]
```
### Index Management
```bash
# Reindex all
bin/magento indexer:reindex
# Reindex specific indexer
bin/magento indexer:reindex catalogsearch_fulltext
# Index status
bin/magento indexer:status
# Reset indexer
bin/magento indexer:reset catalogsearch_fulltext
```
## Database Indexing
### Index Strategy
- **Primary Keys**: Design efficient primary key structures
- **Foreign Keys**: Implement proper foreign key relationships
- **Composite Indexes**: Create composite indexes for common queries
- **Covering Indexes**: Design indexes that cover query requirements
- **Index Maintenance**: Regular index maintenance and optimization
### Query Optimization
- **EXPLAIN Analysis**: Analyze query execution plans
- **Slow Query Log**: Monitor and optimize slow queries
- **Index Usage**: Ensure indexes are being used effectively
- **Query Rewriting**: Optimize queries for better index usage
- **N+1 Problem**: Eliminate N+1 query problems
## Index Optimization Process
### 1. Index Assessment & Analysis
- **Current State Analysis**: Assess existing indexing configuration and performance
- **Performance Baseline**: Establish baseline metrics for indexing performance
- **Bottleneck Identification**: Identify indexing bottlenecks and performance issues
- **Usage Pattern Analysis**: Analyze search and browsing usage patterns
- **Capacity Planning**: Plan indexing infrastructure capacity and resources
### 2. Index Strategy Design
- **Indexing Architecture**: Design optimal indexing architecture and topology
- **Reindexing Strategy**: Design efficient reindexing processes and schedules
- **Storage Strategy**: Optimize index storage and data organization
- **Performance Goals**: Define indexing performance targets and SLAs
- **Scalability Planning**: Plan for indexing scalability and growth
### 3. Implementation & Configuration
- **Elasticsearch Setup**: Configure and optimize Elasticsearch clusters
- **Indexer Configuration**: Optimize Magento indexer settings and behavior
- **Database Indexing**: Implement optimal database index strategies
- **Monitoring Setup**: Implement comprehensive indexing monitoring
- **Automation Setup**: Automate indexing processes and maintenance
### 4. Testing & Optimization
- **Performance Testing**: Validate indexing performance improvements
- **Load Testing**: Test indexing behavior under high load conditions
- **Search Quality Testing**: Validate search relevance and accuracy
- **Monitoring Validation**: Verify monitoring and alerting effectiveness
- **Continuous Optimization**: Establish ongoing indexing optimization
## Best Practices
### Reindexing Strategy
- **Scheduled Reindexing**: Schedule reindexing during low-traffic periods
- **Incremental Reindexing**: Use incremental reindexing when possible
- **Parallel Reindexing**: Run independent indexers in parallel
- **Reindexing Monitoring**: Monitor reindexing performance and failures
- **Rollback Planning**: Plan for reindexing failures and rollbacks
### Elasticsearch Optimization
- **Cluster Configuration**: Optimize Elasticsearch cluster settings
- **Shard Strategy**: Design optimal shard allocation
- **Replica Configuration**: Configure appropriate replica counts
- **Query Optimization**: Optimize search queries and aggregations
- **Index Mapping**: Design efficient search index mappings
### Database Index Optimization
- **Index Design**: Design indexes based on query patterns
- **Index Maintenance**: Regular index maintenance and optimization
- **Query Analysis**: Analyze and optimize slow queries
- **Index Monitoring**: Monitor index usage and effectiveness
- **Performance Tuning**: Tune database for optimal index performance
## Monitoring
- **Index Status**: Monitor indexer status and health
- **Reindexing Performance**: Track reindexing duration and resource usage
- **Search Performance**: Monitor search query performance
- **Index Size**: Monitor index storage size and growth
- **Error Monitoring**: Monitor indexing errors and failures
## References
- [Adobe Commerce Indexing](https://developer.adobe.com/commerce/php/development/components/indexing/)
- [Elasticsearch](https://developer.adobe.com/commerce/php/development/components/indexing/elasticsearch/)
- [Custom Indexers](https://developer.adobe.com/commerce/php/development/components/indexing/custom-indexer/)
Focus on creating high-performance indexing strategies that improve search and browsing performance.
© maxnorm · MIT · maxnorm/magento2-agent-skills