Agent skill
magento-catalog
Work with Magento 2 catalog — product types, categories, attributes, indexing, and search integration. Use when building catalog features, customizing product types, or working with the catalog architecture.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/magento-catalog
SKILL.md
Magento 2 Catalog & Product Types
Before writing code
Fetch live docs:
- Web-search
site:developer.adobe.com commerce php development components catalogfor catalog development - Web-search
site:developer.adobe.com commerce php development components indexingfor indexer guide - Fetch
https://developer.adobe.com/commerce/php/development/components/indexing/for indexing architecture
Product Types
Six Built-in Types
| Type | Description | Key Characteristics |
|---|---|---|
| Simple | Single physical item | Unique SKU, own stock, no variations |
| Configurable | Parent with variant children | Children are simple products, vary by attributes (size, color) |
| Grouped | Collection of products | Simple/virtual children, purchased independently |
| Bundle | Customer-assembled set | Options with selectable items, dynamic/fixed pricing |
| Virtual | Non-physical (services) | No shipping, no weight |
| Downloadable | Digital products | Files/links, optional samples |
Configurable Products
The most complex type — a parent product with simple product children:
- Super attributes determine variations (e.g., color, size)
- Each combination maps to a child simple product with its own SKU and stock
- Frontend: dropdown selectors, price updates, image swapping
- Key tables:
catalog_product_super_attribute,catalog_product_super_link
Custom Product Types
Possible to create custom types by:
- Extending
Magento\Catalog\Model\Product\Type\AbstractType - Registering in
etc/product_types.xml - Defining custom price model, stock handling, and checkout behavior
Categories
Category Tree
- Hierarchical structure with root categories and subcategories
- Each store view has one root category
- Categories use EAV for attributes
- URL rewrites generate SEO-friendly paths
- Display modes: products only, CMS block only, both
Category Attributes
name,description,image,meta_title,meta_descriptionis_active,include_in_menu,display_modeurl_key,url_path- Custom attributes addable via data patches
Indexing
Why Indexing Exists
EAV queries are expensive. Indexers pre-compute denormalized data for fast reads.
Standard Indexers
catalog_product_price— pre-computed product pricescatalogsearch_fulltext— search engine index (OpenSearch/Elasticsearch)catalog_product_attribute— filterable attributes for layered navigationcataloginventory_stock— stock statuscatalogrule_product— catalog price rulescatalog_category_product— category-product associations
Index Modes
| Mode | Behavior | Use Case |
|---|---|---|
| Update on Save | Reindexes immediately on data change | Small catalogs, development |
| Update by Schedule | Cron-based, uses changelog tables | Production (recommended) |
Mview (Materialized Views)
Changelog tables (*_cl) track changes via database triggers. Cron compares versions in mview_state to determine what needs reindexing. Efficient — only processes changed entities.
CLI Commands
bin/magento indexer:reindex # Reindex all
bin/magento indexer:reindex catalogsearch_fulltext # Reindex specific
bin/magento indexer:status # Show status
bin/magento indexer:set-mode schedule # Set all to schedule mode
Search Integration
- A search engine has been required since 2.4.0 (originally Elasticsearch; OpenSearch supported from 2.4.6; only OpenSearch from 2.4.8)
- Products, categories indexed for search and layered navigation
- Elasticsearch removed in 2.4.8
- Custom search attributes configurable per attribute
Best Practices
- Use "Update by Schedule" indexing in production
- Design catalog structure before adding products — attribute sets are hard to change later
- Use configurable products for variant-heavy catalogs
- Keep EAV attribute count reasonable — more attributes = slower indexing
- Test catalog operations at scale (1000+ products) to catch performance issues
- Use the repository pattern (
ProductRepositoryInterface) for programmatic product access
Fetch the catalog and indexing docs for exact indexer configuration, product type XML schema, and search integration patterns before implementing.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?