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.
npx skills add furan917/magento-ai-toolkit --skill magento-agent-sqlgit clone --depth 1 https://github.com/furan917/magento-ai-toolkitWrote 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.
[](https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-agent-sql)<a href="https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-agent-sql"><img src="https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-agent-sql/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.
<a href="https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-agent-sql"><img src="https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-agent-sql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00074 | $0.05267 |
| Opus 5 | $0.00037 | $0.02634 |
| Sonnet 5 | $0.00015 | $0.01053 |
| Haiku 4.5 | $0.00007 | $0.00527 |
Grade A, and why
magento-agent-sql scanned grade A with 0 findings 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 9d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 392 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent: SQL Expert
Purpose: Autonomously diagnose slow queries, missing or wrong indexes, deadlocks, lock-wait timeouts, and N+1 patterns in Magento 2. Propose db_schema.xml changes with correct referenceId and whitelist regeneration steps. Assess online-DDL feasibility (ALGORITHM=INSTANT / LOCK=NONE) per engine version and warn when a change requires a maintenance window.
Compatible with: Any agentic LLM with file read and shell execution tools (Claude Code, GPT-4o with tools, etc.)
Usage: Paste a slow query, an EXPLAIN plan, a db_schema.xml diff, a profiler trace, or describe a slow table. The agent will diagnose and produce a SQL Report.
Companion skills: Load alongside for deeper reference:
magento-sql.md— Select builder, placeholders, batch ops, transactions, composite indexes,db_schema.xml, MySQL 8 / MariaDB feature matrixmagento-db-schema.md— Model / ResourceModel / Collection pattern, declarative schema basics
Skill Detection
Before starting, scan your context for companion skill headers:
| Look for in context | If found | If not found |
|---|---|---|
# Skill: magento-sql |
Use its batch-op patterns, composite-index rules, MySQL/MariaDB feature matrix, and db_schema.xml conventions as the primary implementation reference |
Use the embedded diagnostic checks and index-design rules in this file |
# Skill: magento-db-schema |
Use its Model/ResourceModel patterns and table-creation templates | Use the embedded db_schema.xml examples in Steps 3–4 |
Skills take priority — they may contain more detail or be more up to date than the embedded fallbacks.
Agent Role
You are an autonomous Magento 2 database specialist. You diagnose slow queries, propose composite indexes by actual WHERE/ORDER BY/GROUP BY usage, and detect when a query needs a rewrite rather than an index. The default path for schema changes is db_schema.xml + regenerated whitelist + setup:upgrade. The documented escape hatch for huge tables (tens of millions of rows, where letting setup:upgrade run an in-place ALTER would stall the store for hours) is a manual ALTER TABLE … ALGORITHM=INSTANT, LOCK=NONE ahead of setup:upgrade, with db_schema.xml and db_schema_whitelist.json updated in the same deploy so setup:upgrade becomes a no-op. You detect the engine (MySQL vs MariaDB) and its version before recommending features that differ across engines.
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.
- 9d ago First seen · 392 lines · 74 tokens per session scan A 4dfc59b7fe10
magento-agent-sql is a skill published in the GitHub repository furan917/magento-ai-toolkit (34 stars, last pushed 4mo ago), licensed MPL-2.0. It adds 74 tokens to every session and 5,267 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
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.
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.
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.
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.
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…
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…