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 finsilabs/awesome-ecommerce-skills --skill database-optimization-commercegit clone --depth 1 https://github.com/finsilabs/awesome-ecommerce-skillsWrote 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/finsilabs/awesome-ecommerce-skills/database-optimization-commerce)<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/database-optimization-commerce"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/database-optimization-commerce/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/finsilabs/awesome-ecommerce-skills/database-optimization-commerce"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/database-optimization-commerce.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.00028 | $0.02387 |
| Opus 5 | $0.00014 | $0.01193 |
| Sonnet 5 | $0.00006 | $0.00477 |
| Haiku 4.5 | $0.00003 | $0.00239 |
Grade A, and why
database-optimization-commerce 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 — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Optimization — Commerce
Overview
E-commerce databases face distinct query patterns: high-cardinality product filtering (category + price + attributes), session-scoped cart lookups, write-heavy order creation, and read-heavy catalog browsing that must scale to concurrent users. This skill covers identifying slow queries, designing effective indexes for product filtering, partitioning order tables, and routing read traffic to replicas.
When to Use This Skill
- When product listing pages are slow due to unindexed filter combinations (category + price + brand)
- When checkout throughput is limited by order insertion latency
- When read load on the primary database is causing write latency to increase
- When a slow query log reveals queries doing sequential scans on large tables
- When planning a database schema for a new custom e-commerce platform
Core Instructions
Step 1: Determine your situation
Database optimization applies primarily to self-hosted setups. Understand your constraints first:
| Platform | Database Control | What to Optimize |
|---|---|---|
| Shopify | None — Shopify manages all infrastructure | Focus on Liquid template rendering speed, app performance, and Shopify's built-in query optimization via Search & Discovery app |
| WooCommerce | Full — you manage MySQL/MariaDB on your host | Optimize WooCommerce queries with caching plugins (Redis Object Cache, WP Rocket), add database indexes via WP Optimize plugin, and configure your hosting MySQL settings |
| BigCommerce | None — BigCommerce manages all infrastructure | Focus on theme performance, image optimization, and reducing third-party app overhead |
| Custom / Headless | Full — you own PostgreSQL (or MySQL) | Apply all the techniques below; PostgreSQL is assumed in code examples |
Step 2: Quick wins for WooCommerce (managed WordPress/WooCommerce)
Before touching database indexes directly, apply these WooCommerce-specific optimizations:
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- evals/orders-partitioning-and-materialized-vie/criteria.json 3.1 KB
- evals/orders-partitioning-and-materialized-vie/task.md 3.0 KB
- evals/product-catalog-index-design/criteria.json 2.8 KB
- evals/product-catalog-index-design/task.md 2.7 KB
- evals/read-replica-database-access-layer/criteria.json 2.4 KB
- evals/read-replica-database-access-layer/task.md 2.1 KB
- tile.json 254 B
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 · 236 lines · 28 tokens per session scan A 182fd3ac7b16
database-optimization-commerce is a skill published in the GitHub repository finsilabs/awesome-ecommerce-skills (52 stars, last pushed 6mo ago), licensed MIT. It adds 28 tokens to every session and 2,387 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
PostgreSQL Performance Optimization
Production-grade PostgreSQL query optimization, indexing strategies, performance tuning, and modern features including pgvector for AI/ML workloads. Master EXPLAIN plans, query analysis, and database design for high-performance applications.
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.
Elasticsearch Testing Patterns
Elasticsearch testing including index management, query validation, mapping verification, bulk operation testing, and search relevance scoring.
sql-expert
Expert-level SQL database design, querying, optimization, and administration across PostgreSQL, MySQL, and SQL Server. Use when the user mentions database, PostgreSQL, MySQL, or query optimization, or when the task involves Database Design, Advanced Queries, Indexes and Performance, or Transactions and Concurrency.
elasticsearch
Configure Elasticsearch mappings and ingest pipelines, investigate cluster health and queries, and plan reindexing or lifecycle changes.
database-engineer
!cat skills/shared/protocols/ux-protocol.md 2>/dev/null || true !cat skills/shared/protocols/input-validation.md 2>/dev/null || true !cat skills/shared/protocols/tool-efficiency.md 2>/dev/null || true !cat .production-grade.yaml 2>/dev/null || echo "No config — using defaults" !cat .forgewright/codebase-context.md…