index-optimization

index-optimization is a skill for Codex from Eliyce/paqad-ai. It costs 14 tokens per session (562 once invoked), scanned A, original, MIT.

A database review skill that examines whether changed queries have suitable indexes. An index is a database structure that helps find or sort matching records more efficiently.

In plain words
What is it for?
Use it when a feature changes query patterns or adds migrations and you need to assess index coverage, ordering, redundancy, and performance trade-offs.
Why use it?
New filters, sorts, joins, or uniqueness rules can make a query slow when the database lacks the right index. This focuses recommendations on the data paths affected by the change.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when a feature changes query patterns or adds migrations and you need to assess index coverage, ordering, redundancy, and performance trade-offs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eliyce/paqad-ai/index-optimization
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 Eliyce/paqad-ai --skill index-optimization
Clone the repo
git clone --depth 1 https://github.com/Eliyce/paqad-ai

Made for: 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 index-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/eliyce/paqad-ai/index-optimization/github.svg)](https://agentmods.dev/skills/eliyce/paqad-ai/index-optimization)
Your own site
<a href="https://agentmods.dev/skills/eliyce/paqad-ai/index-optimization"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/index-optimization/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 index-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/eliyce/paqad-ai/index-optimization"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/index-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 562 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.00014 $0.00562
Opus 5 $0.00007 $0.00281
Sonnet 5 $0.00003 $0.00112
Haiku 4.5 $0.00001 $0.00056

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

Security

Grade A, and why

index-optimization 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/lint-output.sh, scripts/scan-query-shapes.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

runtime/capabilities/coding/skills/index-optimization/SKILL.md · 69 lines

How it starts

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

What It Does

Evaluates whether changed query paths have the right supporting indexes and explains tradeoffs without drifting into speculative indexing unrelated to the current request.

Use This When

Use this when a request introduces new filters, sorts, joins, uniqueness rules, or query-heavy flows that depend on index coverage.

Inputs

  • Read the changed query paths, migrations, and existing index docs first.
  • Read runtime/capabilities/coding/checklists/database-review-20pt.md and references/index-review-guide.md before evaluating changes.
  • Read any query inventory or performance notes tied to the affected module.

Procedure

  1. Run scripts/scan-query-shapes.sh <files...> to surface query patterns implying index requirements.
  2. Cross-reference each shape with assets/index-rules.txt to know which index shape actually serves it.
  3. Audit existing index docs for redundancy and ordering against those shapes.
  4. Bucket findings into Correctness / Migration Safety / Performance per assets/output.template.md.
  5. Validate with scripts/lint-output.sh. Recommend only indexes that serve the changed behavior or a directly adjacent hot path — no speculative.

Output Contract

  • Return sections named Correctness Risks, Migration Safety Risks, and Performance Risks.
  • For each item, name the query path or index and the reason it is risky or recommended.
  • If no changes are needed, state Performance Risks: none and keep the other buckets explicit.

Escalate / Stop Conditions

  • Ask when workload shape, row volume, or hot-path expectations are missing and materially change the recommendation.
  • Warn when an index recommendation would meaningfully increase write cost or migration risk.
  • Do not suggest speculative indexes without a concrete changed access pattern.

Resources

  • references/index-review-guide.md
  • scripts/scan-query-shapes.sh
  • scripts/lint-output.sh
  • assets/output.template.md
  • assets/index-rules.txt
  • runtime/capabilities/coding/checklists/database-review-20pt.md
  • agents/openai.yaml

Read the full file on GitHub · 69 lines

Files

What ships with it

6 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.

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 · 69 lines · 14 tokens per session scan A 9338c804968e

Subscribe to this mod's changes

index-optimization is a skill published in the GitHub repository Eliyce/paqad-ai (8 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 562 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.

Related

Other skills, from other repositories

database

A database design and migration guide written in Korean. It covers table structure, naming conventions, common columns, indexes, foreign keys, and versioned migration files.

Insajin/autopus-adk · 25 tokens

database-verification

Shell-based database connectivity and integrity checks. Verifies that databases are reachable, schemas match expectations, and data integrity constraints hold.

vladkesler/initrunner · 29 tokens

obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

kepano/obsidian-skills · 63 tokens

session-investigator

Investigate fast-agent session and history files to diagnose issues. Use when a session ended unexpectedly, when debugging tool loops, when correlating sub-agent traces with main sessions, or when analyzing conversation flow and timing. Covers session.json metadata, history JSON format, message structure, tool…

evalstate/fast-agent · 68 tokens

x-osv

CLI for Google OSV database. Query vulnerabilities for packages, scan local projects for vulnerable dependencies. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill). Required Tool: Install osv-scanner for project scanning (see https://github.com/google/osv-scanner).

x-cmd/x-cmd · 72 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens