Query Performance

Query Performance is a skill for Claude Code, Codex from niels-emmer/myace. It costs 29 tokens per session (471 once invoked), scanned A, original, MIT.

A practical checklist for making database queries stay responsive as data grows. It covers indexes, query-plan checks, repeated queries, and realistic test data.

In plain words
What is it for?
Use it when writing or reviewing queries, choosing indexes, checking EXPLAIN plans, finding N+1 queries, or testing with production-like data.
Why use it?
It helps catch queries that look fine with a small test dataset but become slow or expensive in production.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit Use it when writing or reviewing queries, choosing indexes, checking EXPLAIN plans, finding N+1 queries, or testing with production-like data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/niels-emmer/myace/query-performance
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 niels-emmer/myace --skill query-performance
Clone the repo
git clone --depth 1 https://github.com/niels-emmer/myace

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 Query Performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/query-performance/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/query-performance)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/query-performance"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/query-performance/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 Query Performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/query-performance"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/query-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00029 $0.00471
Opus 5 $0.00015 $0.00235
Sonnet 5 $0.00006 $0.00094
Haiku 4.5 $0.00003 $0.00047

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

Security

Grade A, and why

Query Performance 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 8d 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.

collections/additional/database/skills/query-performance/SKILL.md · 28 lines

What it actually says

Purpose

A query that works on a toy dataset but degrades under real data volume is a defect, not a surprise. This skill is a checklist for verifying that queries are indexed for the access patterns the application actually uses, and that the plan matches intent before the query ships.

When to use it

Every time you write or review a query that touches a table with meaningful data volume — not just for "slow" queries. The discipline should be automatic.

Checklist

  • Index for the queries you actually run. Add indexes based on measured access patterns, not speculation. Every index has a write cost; don't index a pattern nothing executes.
  • Verify with EXPLAIN. Confirm the plan uses the index you expect, not a full-table scan. If the plan doesn't match intent, the query isn't done.
  • Watch for N+1. A loop that issues one query per row is the most common performance defect in application code. Batch the fetch or join instead.
  • Test with realistic data. Profile against data volume and distribution that resembles production, not a handful of rows. A plan that's fine on 100 rows can be catastrophic on 10 million.
  • Check the write path too. Inserts/updates that touch many rows, or that fight an index, are as important as read performance. Batch writes where the pattern allows.
  • Flag full-table scans in review. A scan on a hot table is a review finding, even if it's "fast enough" today — it won't stay that way.

Expected output

Queries that are verified against a realistic plan (via EXPLAIN), indexed for the access patterns the application actually executes, and free of N+1 and full-table-scan surprises — with the performance work treated as part of the change, not a follow-up.

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. 8d ago First seen · 28 lines · 29 tokens per session scan A acf9706aea09

Subscribe to this mod's changes

Query Performance is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed 5d ago), licensed MIT. It adds 29 tokens to every session and 471 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.