К основному содержанию
скилл CX Codex

magento-issue-debugger — скилл для Claude Code: разбор багов Magento 2

Скилл magento-issue-debugger для Claude Code разбирает сбои Magento 2: воспроизводит проблему, собирает логи и помогает найти корневую причину.

MIT 274 установок ★ 33 обновлён 2026-01-24

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add maxnorm/magento2-agent-skills --skill magento-issue-debugger -a claude-code
Открыть на GitHub

Что делает magento-issue-debugger

Скилл ведёт разбор бага Magento 2 по одной схеме: воспроизвести проблему, зафиксировать окружение, оценить охват, найти момент, когда всё сломалось, и изолировать причину отключением модулей. Дальше он собирает данные — var/log/exception.log и var/log/system.log, ошибки PHP-FPM, логи веб-сервера, медленные запросы к БД.

Команды для проверки гипотез тоже прописаны: bin/magento deploy:mode:set developer, cache:clean и cache:flush, indexer:reindex, setup:di:compile, setup:static-content:deploy, setup:db:status. По ходу он смотрит свежие правки кода и состояние базы, а охват идёт от падений cron и прав доступа до ошибок REST и GraphQL.

Пошаговая отладка идёт через Xdebug, профилирование — через Blackfire, XHProf или New Relic. Без одного из этих инструментов в окружении разбор упрётся в логи, потому что заглянуть внутрь запроса будет нечем.

Какие задачи решает

  • найти причину, по которой падает оформление заказа
  • разобрать ошибки индексации и кеша после деплоя
  • прочитать exception.log и понять, откуда исключение
  • вычислить узкое место в медленной карточке товара
  • развести конфликт двух расширений, ломающих админку

Примеры запросов агенту

  • Разбери падение оформления заказа в Magento 2, вот var/log/exception.log
  • Выясни, почему после деплоя не проходит bin/magento indexer:reindex
  • Профилируй загрузку каталога и скажи, что тормозит

Как установить magento-issue-debugger

1Через Skills CLI (Vercel)

npx skills add maxnorm/magento2-agent-skills --skill magento-issue-debugger -a claude-code

2Вручную: положить файлы

~/.claude/skills/magento-issue-debugger/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/magento-issue-debugger/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о magento-issue-debugger

Как установить magento-issue-debugger в Claude Code?

Выполните npx skills add maxnorm/magento2-agent-skills --skill magento-issue-debugger -a claude-code. Файл скилла появится по пути ~/.claude/skills/magento-issue-debugger/SKILL.md.

Что делает magento-issue-debugger?

Проводит диагностику проблем Magento 2: собирает логи со всех компонентов, проверяет конфигурацию и недавние изменения кода, ищет корневую причину вместо симптома.

Какие инструменты нужны для отладки и профилирования?

Для пошаговой отладки — Xdebug. Для профилирования скилл работает с Blackfire, XHProf или New Relic.

Исходный текст

SKILL.md · MIT
---
name: magento-issue-debugger
description: Systematically investigates, diagnoses, and resolves complex Magento 2 technical problems. Use when debugging issues, investigating bugs, analyzing performance problems, resolving errors, or troubleshooting system failures. Masters log analysis, performance profiling, and root cause analysis.
---

# Magento 2 Issue Debugger

Expert specialist in systematically investigating, diagnosing, and resolving complex technical problems across all layers of the Magento stack.

## When to Use

- Debugging production issues
- Investigating bugs and errors
- Analyzing performance problems
- Resolving system failures
- Troubleshooting integration issues
- Diagnosing cache or indexing problems

## Debugging Methodologies

### Systematic Investigation
- **Problem Assessment**: Establish consistent steps to reproduce the problem
- **Environment Documentation**: Catalog system configuration and environment details
- **Impact Analysis**: Determine scope, frequency, and business impact
- **Timeline Analysis**: Establish when the issue started and what changed
- **Isolation Testing**: Disable modules and features to isolate the issue

### Root Cause Analysis
- **Hypothesis Testing**: Form and test theories methodically
- **Data Collection**: Gather logs, configuration, and performance metrics
- **Code Analysis**: Review recent code changes and related modules
- **Database Investigation**: Check for data corruption or migration issues
- **Deep Dive**: Dig deep to find underlying causes rather than treating symptoms

## Issue Investigation Process

### 1. Problem Assessment
- **Issue Reproduction**: Establish consistent steps to reproduce
- **Environment Documentation**: Catalog system configuration
- **Impact Analysis**: Determine scope and business impact
- **Timeline Analysis**: Establish when issue started
- **User Impact**: Understand how issue affects different user types

### 2. Data Collection
- **Log Gathering**: Collect relevant logs from all system components
  - Magento logs: `var/log/`
  - PHP error logs
  - Web server logs (Apache/Nginx)
  - Database slow query logs
- **Configuration Review**: Examine module configurations and system settings
- **Code Analysis**: Review recent code changes and related modules
- **Database Investigation**: Check for data corruption or migration issues
- **Performance Metrics**: Gather timing and resource usage data

### 3. Systematic Debugging
- **Debug Mode**: Enable Magento debug mode for detailed error reporting
  ```bash
  bin/magento deploy:mode:set developer
  ```
- **Xdebug Integration**: Use step-through debugging for complex logic issues
- **Profiling Tools**: Use Blackfire, XHProf, or similar tools for performance issues
- **Database Debugging**: Enable query logging and analyze database interactions
- **Isolation Testing**: Disable modules to isolate the issue

### 4. Resolution Implementation
- **Fix Development**: Implement appropriate fixes based on root cause analysis
- **Testing Strategy**: Develop comprehensive test plans for verification
- **Rollback Planning**: Prepare rollback procedures for production fixes
- **Documentation**: Document findings, solutions, and prevention strategies
- **Monitoring Setup**: Implement monitoring to prevent issue recurrence

## Common Issue Categories

### Performance Issues
- **Slow Page Loading**: Identify bottlenecks in frontend and backend processing
- **Database Performance**: Optimize queries, indexes, and database configuration
- **Memory Issues**: Debug memory leaks and high memory usage
- **Cache Problems**: Resolve cache invalidation and cache warming issues
- **Frontend Performance**: Debug JavaScript errors and CSS rendering issues

### Functional Bugs
- **Checkout Issues**: Debug payment processing, shipping, and order placement
- **Product Display**: Resolve catalog, search, and product page problems
- **Admin Panel Issues**: Fix backend functionality and configuration problems
- **Extension Conflicts**: Identify and resolve module compatibility issues
- **API Problems**: Debug REST and GraphQL API endpoints

### System-Level Issues
- **Installation Problems**: Resolve setup and upgrade issues
- **Configuration Errors**: Fix system and module configuration problems
- **File Permission Issues**: Resolve file system and directory permission problems
- **Cron Job Failures**: Debug scheduled task execution problems
- **Email Issues**: Resolve email sending and template problems

### Security Issues
- **Access Control**: Debug permission and ACL issues
- **Authentication Problems**: Resolve login and session issues
- **CSRF Failures**: Debug form key validation problems
- **SQL Injection**: Identify and fix vulnerable queries
- **XSS Vulnerabilities**: Fix output escaping issues

## Debugging Tools & Techniques

### Log Analysis
- **Magento Logs**: `var/log/exception.log`, `var/log/system.log`
- **PHP Error Logs**: Check PHP-FPM or Apache error logs
- **Web Server Logs**: Analyze Apache/Nginx access and error logs
- **Database Logs**: Review slow query logs and database errors
- **Custom Logging**: Implement custom logging for specific issues

### Performance Profiling
- **Blackfire**: Performance profiling and optimization
- **XHProf**: PHP profiling tool
- **New Relic**: APM monitoring
- **Database Profiling**: Enable query logging
- **Frontend Profiling**: Browser DevTools performance analysis

### Debugging Commands
```bash
# Enable developer mode
bin/magento deploy:mode:set developer

# Clear cache
bin/magento cache:clean
bin/magento cache:flush

# Reindex
bin/magento indexer:reindex

# Check compilation
bin/magento setup:di:compile

# Check static content
bin/magento setup:static-content:deploy

# Check database
bin/magento setup:db:status
```

### Code Debugging
- **Xdebug**: Step-through debugging
- **var_dump/die**: Quick debugging (remove before production)
- **Magento Logger**: Use `\Psr\Log\LoggerInterface` for logging
- **Exception Handling**: Proper exception catching and logging
- **Error Reporting**: Configure error reporting levels

## Best Practices

### Prevention
- **Comprehensive Testing**: Write unit, integration, and functional tests
- **Code Reviews**: Regular code reviews to catch issues early
- **Monitoring**: Implement monitoring and alerting
- **Logging**: Comprehensive logging strategy
- **Documentation**: Maintain clear documentation

### Resolution
- **Root Cause**: Always fix root cause, not symptoms
- **Testing**: Test fixes thoroughly before deployment
- **Documentation**: Document the issue and resolution
- **Communication**: Communicate with stakeholders
- **Monitoring**: Monitor after fix deployment

## References

- [Adobe Commerce Troubleshooting](https://developer.adobe.com/commerce/php/development/)
- [Performance Best Practices](https://developer.adobe.com/commerce/php/best-practices/performance/)
- [Logging](https://developer.adobe.com/commerce/php/development/components/logging/)

Focus on systematic investigation to identify root causes and implement lasting solutions.

© maxnorm · MIT · maxnorm/magento2-agent-skills

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
xdebug kpanuragh Подключает Xdebug к агенту — брейкпоинты, шаг за шагом, просмотр переменных и стека прямо из чата. Разбирает необъяснимые падения PHP-скриптов. CX Codex +1 ★ 29звёзд репо ddev-expert madsnorgaard Скилл ddev-expert, который подсказывает агенту команды DDEV: запуск контейнеров, работа с базой, конфигурация и разбор типичных сбоев. CX Codex +1 379установок hyva-create-module hyva-themes Скилл hyva-create-module для Claude Code. Создаёт заготовку модуля Magento 2 в app/code/: registration.php, composer.json и etc/module.xml без ручного копирования шаблонов. CX Codex +1 1 300установок hyva-cms-component hyva-themes Скилл hyva-cms-component ведёт по шагам создания кастомного компонента Hyvä CMS для Magento 2: модуль, поля, шаблон PHTML и setup:upgrade. CX Codex +1 786установок adk-debugger botpress Скилл adk-debugger для Claude Code помогает выяснить, почему ADK-агент отвечает неверно, зависает или не проходит сборку. Разбирает логи и трассировки, а также ведёт по шагам проверки после исправления. CX Codex +1 1 700установок forge-debugger atlassian Скилл forge-debugger для Claude Code, который ищет и исправляет ошибки в приложениях Atlassian Forge. Запускается при сбоях деплоя, пустом интерфейсе, ошибках резолвера и проблемах с правами. CX Codex +1 533установок

Из того же набора30

Весь набор →
magento-module-developer Скилл magento-module-developer ведёт агента по разработке модулей Magento 2: структура каталогов, DI, сервис-контракты, репозитории и схема БД. CX Codex +1 457установок magento-performance-analyst Скилл magento-performance-analyst ведёт агента по профилированию Magento 2: ищет узкие места, разбирает медленные запросы и планирует оптимизации. CX Codex +1 449установок magento-frontend-developer Скилл magento-frontend-developer задаёт правила вёрстки и клиентской разработки под Magento 2: от макетов layout XML и шаблонов PHTML до скриптов на KnockoutJS и оптимизации Core Web Vitals. CX Codex +1 420установок magento-xml-specialist Скилл magento-xml-specialist для ИИ-агента, который пишет и проверяет XML-конфигурации Magento 2: layout, di.xml, system.xml, module.xml и db_schema.xml. CX Codex +1 394установок magento-php-specialist Скилл magento-php-specialist для разработки под Magento 2 на PHP. Задаёт правила PSR-12, строгое оформление классов и базовые шаблоны платформы вроде репозиториев и плагинов. CX Codex +1 263установок magento-api-developer Скилл magento-api-developer помогает агенту проектировать и писать API для Magento 2: сервисные контракты, DTO, REST-контроллеры, GraphQL-резолверы и тесты. CX Codex +1 259установок magento-security-analyst Скилл magento-security-analyst разбирает безопасность магазина на Magento 2 по слоям и подсказывает, что закрыть: код, конфигурацию, зависимости, подготовку к PCI DSS и GDPR. CX Codex +1 212установок magento-model-developer Скилл magento-model-developer помогает проектировать слой данных в Magento 2: строить модели, декларативные схемы db_schema.xml, репозитории и коллекции под EAV или плоские таблицы. CX Codex +1 210установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой