Skip to content
Back to skills

Index Gen

ASecurity

Get smart database index suggestions from query patterns. Use when queries are slow.

  • 21 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added June 7, 2026
databasesbashsqlnodegitapidatabaseperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned June 7, 2026

npx -y skills add modbender/skill-library-mcp --skill index-gen --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Index Gen?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Index Gen
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-index-gen/badge)](https://www.skillsdirectory.com/skills/modbender-index-gen)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: index-suggester
description: Get smart database index suggestions from query patterns. Use when queries are slow.
---

# Index Suggester

Your queries are slow but you're not sure what to index. This tool analyzes your query files and tells you exactly what indexes to create.

**One command. Zero config. Just works.**

## Quick Start

```bash
npx @lxgicstudios/ai-index ./src/queries/
```

## What It Does

- Analyzes your query files for patterns
- Identifies missing indexes
- Suggests composite indexes for complex queries
- Explains why each index helps

## Usage Examples

```bash
# Analyze all query files
npx @lxgicstudios/ai-index ./src/queries/

# Single file
npx @lxgicstudios/ai-index ./src/queries/users.ts -o indexes.sql

# Prisma queries
npx @lxgicstudios/ai-index ./prisma/
```

## Best Practices

- **Don't over-index** - indexes slow down writes
- **Consider query frequency** - index hot paths first
- **Use composite indexes wisely** - column order matters
- **Test before deploying** - indexes can change query plans

## When to Use This

- Query performance is degrading
- Adding new queries to an app
- Database audit and optimization
- Learning about indexing strategies

## Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

**Find more:**
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgicstudios.com

## Requirements

No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.

```bash
npx @lxgicstudios/ai-index --help
```

## How It Works

Reads your query files, extracts WHERE clauses and JOIN conditions, then determines what indexes would speed up those queries. The AI considers selectivity and query patterns to prioritize suggestions.

## License

MIT. Free forever. Use it however you want.

Files in this skill

  • README.md579 B
  • SKILL.md2 KB
  • package-lock.json31.1 KB
  • package.json691 B
  • src/cli.ts1 KB
  • src/index.ts1.3 KB
  • tsconfig.json264 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.