Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

analyze-m1-module-for-migration

БесплатноБез исполняемых скриптовНе проверен

Systematically analyze a Magento 1 module to determine its purpose, usage, and migration requirements for Magento 2. Use when you need to decide whether to…

ProxiBlueот ProxiBlue★ 17 звёзд на GitHub12 установок в других каталогах

Об этом скилле

Skill: Analyze M1 Module for Migration

Purpose: Systematically analyze a Magento 1 module to determine its purpose, usage, and migration requirements for Magento 2.

When to use: When you encounter a Magento 1 module during migration and need to decide whether to migrate it, find alternatives, or skip it.

Overview

This skill provides a repeatable process to:

  1. Understand what a module does
  2. Verify if it's actively being used in production
  3. Determine if it should be migrated to M2
  4. Research available M2 alternatives
  5. Make a migration recommendation with supporting data

Process

Step 1: Locate and Identify the Module

Objective: Find the module files and basic metadata.

Tasks:

  1. Locate the module directory:

    # M1 modules are typically in:
    # - app/code/local/{Vendor}/{Module}/
    # - app/code/community/{Vendor}/{Module}/
    # - app/code/core/{Vendor}/{Module}/ (avoid modifying core)
    
    find /path/to/m1 -type d -name "{ModuleName}" 2>/dev/null
    
  2. Read module metadata:

    • app/code/{pool}/{Vendor}/{Module}/etc/config.xml - Module version, dependencies, configuration
    • app/etc/modules/{Vendor}_{Module}.xml - Module activation status, code pool
  3. Extract key information:

    • Module name and version
    • Vendor/author
    • Dependencies (other modules required)
    • Is it active? (check <active>true</active>)

Output: Basic module identification and status.


Step 2: Analyze Module Structure and Functionality

Objective: Understand what the module does and how it works.

Tasks:

2.1 Configuration Analysis

Read etc/config.xml to identify:

  • Admin configuration (<adminhtml> section)
  • Events/Observers (<events> section)
  • Rewrites (<rewrite> sections) - what core classes are modified
  • Routes (<routers> section) - custom controllers
  • Cron jobs (<crontab> section)
  • Layout updates (<layout> section)

2.2 Database Schema Analysis

Check for database modifications:

# Look for SQL setup files
find app/code/{pool}/{Vendor}/{Module}/ -name "*install*.php" -o -name "*upgrade*.php"
ls -la app/code/{pool}/{Vendor}/{Module}/sql/

Read setup scripts to identify:

  • Custom tables created
  • Columns added to core tables
  • Indexes and foreign keys

2.3 Code Component Analysis

Models (Model/ directory):

  • What data structures does it manage?
  • What are the main CRUD operations?

Resource Models (Model/Resource/ or Model/Mysql4/):

  • What database operations are performed?
  • Are there custom queries or complex logic?

Blocks (Block/ directory):

  • What UI elements are added/modified?
  • Admin blocks vs. frontend blocks

Controllers (controllers/ directory):

  • What admin actions are available?
  • What frontend endpoints exist?

Helpers (Helper/ directory):

  • What utility functions are provided?

Observers (Model/Observer.php):

  • What events are being listened to?
  • What actions are triggered?

Example analysis command:

# Get overview of module structure
tree -L 3 app/code/{pool}/{Vendor}/{Module}/

# Count files by type
find app/code/{pool}/{Vendor}/{Module}/ -name "*.php" | grep -E "Model|Block|Controller|Helper|Observer" | sort

Output: Detailed functionality description - "This module does X by doing Y when Z happens."


Step 3: Check Database Usage (Production Verification)

Objective: Verify if the module is actively being used with real data.

Tasks:

3.1 Identify Custom Tables

From setup scripts, list all custom tables:

SHOW TABLES LIKE '%{module_prefix}%';

3.2 Count Records

For each custom table:

SELECT COUNT(*) as total_records FROM {table_name};

3.3 Check Data Freshness

Determine if data is recent/active:

-- If table has timestamps
SELECT
    MIN(created_at) as oldest,
    MAX(created_at) as newest,
    COUNT(*) as total
FROM {table_name};

-- Check associations with active entities
SELECT COUNT(DISTINCT {foreign_key})
FROM {table_name}
WHERE {foreign_key} IS NOT NULL;

3.4 Sample Data Analysis

Pull sample records to understand usage patterns:

SELECT * FROM {table_name} LIMIT 10;

3.5 Show Products Using the Feature (Max 10)

Objective: Display real products that actively use the module's functionality for testing/verification purposes.

Purpose:

  • Provides concrete test cases for M2 migration
  • Shows real-world usage patterns
  • Helps identify which products to verify after migration
  • Useful for stakeholder review (they can see familiar products)

Query Template:

-- Generic template (adjust based on module's data structure)
SELECT
    module_table.id,
    module_table.{key_field},
    cpe.entity_id,
    cpe.sku,
    cpev.value as product_name,
    module_table.{relevant_data_column}
FROM {module_table_name} AS module_table
LEFT JOIN catalog_product_entity cpe
    ON module_table.product_id = cpe.entity_id
Полный SKILL.md на GitHub

Установить analyze-m1-module-for-migration в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл analyze-m1-module-for-migration?

Systematically analyze a Magento 1 module to determine its purpose, usage, and migration requirements for Magento 2. Use when you need to decide whether to migrate a M1 module, find alternatives, or skip it.

Как установить скилл analyze-m1-module-for-migration?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл analyze-m1-module-for-migration запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить analyze-m1-module-for-migration с