magento-indexer

magento-indexer is a skill for Claude Code, Codex from furan917/magento-ai-toolkit. It costs 48 tokens per session (4,489 once invoked), scanned C, original, MPL-2.0.

A guide for creating Magento 2 indexers, which prepare and store derived data so Magento can read it quickly. It covers complete rebuilds, incremental updates, source tables, and flat data tables.

In plain words
What is it for?
Use it to build custom indexes, register them for Magento’s admin and command line, update them after source-table changes, and create full or incremental reindexing.
Why use it?
It helps keep calculated or denormalized data current without making every storefront request perform expensive database work. It also helps choose between scheduled and real-time updates.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build custom indexes, register them for Magento’s admin and command line, update them after source-table changes, and create full or incremental reindexing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/furan917/magento-ai-toolkit/magento-indexer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add furan917/magento-ai-toolkit --skill magento-indexer
Clone the repo
git clone --depth 1 https://github.com/furan917/magento-ai-toolkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for magento-indexer

README.md
[![agentmods](https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-indexer/github.svg)](https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-indexer)
Your own site
<a href="https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-indexer"><img src="https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-indexer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for magento-indexer

Your own site · 80×15
<a href="https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-indexer"><img src="https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-indexer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,489 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.04489
Opus 5 $0.00024 $0.02244
Sonnet 5 $0.00010 $0.00898
Haiku 4.5 $0.00005 $0.00449

Measured 12d ago against content hash 382defc64ed9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

magento-indexer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- If the user reports "Intercepted class ... does not exist" after adding an indexer, the fix is `bin/magento setup:di:compile` — never `rm -rf generated/`
skills/magento-indexer/SKILL.md · 514 lines

How it starts

The opening of the file, as written. The whole thing — 514 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: magento-indexer

Purpose: Build custom Magento 2 indexers — full reindex, incremental (mview), flat table generation, and denormalised data structures. Compatible with: Any LLM (Claude, GPT, Gemini, local models) Usage: Paste this file as a system prompt, then describe the data you want to index and its source tables.


System Prompt

You are a Magento 2 indexer specialist. You implement custom indexers using ActionInterface, declare them in indexer.xml, and wire incremental reindexing via mview.xml. You always choose the least expensive indexing strategy for the use case, advise on schedule vs realtime mode, and know how to isolate indexer load from frontend reads.


Indexer Architecture

Magento's indexer framework has two layers:

Layer File Purpose
Indexer declaration etc/indexer.xml Registers the indexer in the admin grid and CLI
Materialized view (mview) etc/mview.xml Subscribes to table changes for incremental reindex
Action class Model/Indexer/*.php Implements the three reindex entry points

Full reindex (executeFull) — rebuilds the entire index from scratch. Partial reindex (executeList) — rebuilds only changed entity IDs, triggered by mview. Row reindex (executeRow) — rebuilds a single entity, triggered by realtime save events.


Step 1 — Indexer Declaration (etc/indexer.xml)

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">

    <indexer id="vendor_module_custom"
             view_id="vendor_module_custom"
             class="Vendor\Module\Model\Indexer\CustomIndexerAction">
        <title translate="true">Vendor Module Custom Index</title>
        <description translate="true">Indexes vendor module data for fast frontend reads.</description>
    </indexer>

</config>

Key attributes:

  • id — unique indexer identifier, used in CLI (bin/magento indexer:reindex vendor_module_custom)
  • view_id — must match the id in mview.xml to link incremental reindex
  • class — the action class that implements ActionInterface

Read the full file on GitHub · 514 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 514 lines · 48 tokens per session scan C 382defc64ed9

Subscribe to this mod's changes

magento-indexer is a skill published in the GitHub repository furan917/magento-ai-toolkit (34 stars, last pushed 4mo ago), licensed MPL-2.0. It adds 48 tokens to every session and 4,489 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

magento-cache-analyst

Optimizes Magento 2 caching strategies for enterprise performance. Use when optimizing cache performance, configuring full-page cache, implementing Redis/Memcached, or designing cache invalidation strategies. Masters FPC, application cache, and distributed caching solutions.

maxnorm/magento2-agent-skills · 54 tokens

magento-index-analyst

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.

maxnorm/magento2-agent-skills · 52 tokens

magento-model-developer

Designs and implements data layer architecture for Magento 2. Use when creating data models, designing database schemas, implementing repositories, or working with EAV/flat table structures. Masters entity design, repository patterns, collections, and database optimization.

maxnorm/magento2-agent-skills · 54 tokens

postgres-commit-history-article

A workflow for comparing PostgreSQL source-code changes between two Git commits and, when useful, writing a Chinese Markdown article about them. PostgreSQL is a database system, and a commit is a saved change in a Git repository.

digoal/blog · 127 tokens

b2c-querying-data

Write efficient data queries in B2C Commerce for products, customers, and orders. Use this skill whenever the user needs to search products on a storefront page, look up customer profiles, query orders, paginate search results, or fix slow category pages. Also use when they ask about performance problems with data…

SalesforceCommerceCloud/b2c-developer-tooling · 108 tokens

b2c-custom-objects

Store and query custom business data using CustomObjectMgr, OCAPI Data API, and Shopper Custom Objects API. Use this skill whenever the user needs to create, read, update, or search custom object instances, build processing queues with status fields, choose between site-scoped and organization-scoped storage, or query…

SalesforceCommerceCloud/b2c-developer-tooling · 104 tokens