Habilidades database-optimizer
📦

database-optimizer

Seguro

Optimize Database Performance

Slow queries and poor database performance can cripple application responsiveness. This skill provides expert guidance on query optimization, indexing strategies, and scalable architectures to dramatically improve database performance.

Soporta: Claude Codex Code(CC)
📊 70 Adecuado
1

Descargar el ZIP de la skill

2

Subir en Claude

Ve a Configuración → Capacidades → Skills → Subir skill

3

Activa y empieza a usar

Pruébalo

Usando "database-optimizer". Optimize this slow query: SELECT * FROM orders o JOIN customers c ON o.customer_id = c.id WHERE c.status = 'active' AND o.created_at > '2024-01-01'

Resultado esperado:

Analysis:
1. **Problem**: SELECT * retrieves unnecessary columns; no index on created_at; status filter may not be selective

Recommendations:
- Add covering index: CREATE INDEX idx_orders_customer_date ON orders(customer_id, created_at) INCLUDE (status, total)
- Replace SELECT * with specific columns
- Consider partitioning by date if tables are large
- Add index on customers.status if frequently filtered

Usando "database-optimizer". How do I implement caching for a frequently-accessed database query?

Resultado esperado:

Multi-tier caching approach:
1. **L1 (Application)**: In-memory cache (e.g., Go map, Python functools.lru_cache) for hot data
2. **L2 (Distributed)**: Redis with TTL-based expiration
3. **Cache Strategy**: Use cache-aside pattern - check cache first, load from DB on miss, store in cache
4. **Invalidation**: Set appropriate TTL (e.g., 5-15 minutes) or use event-driven invalidation
5. **Key Design**: Use composite keys like 'user:123:orders' for specific cache entries

Auditoría de seguridad

Seguro
v1 • 2/24/2026

Prompt-only skill with no executable code. Static analysis scanned 0 files (0 lines) and detected no suspicious patterns. This is a pure instructional prompt providing database optimization guidance. No scripts, network calls, filesystem access, environment access, or external commands are present. No prompt injection attempts detected.

0
Archivos escaneados
0
Líneas analizadas
0
hallazgos
1
Auditorías totales
No se encontraron problemas de seguridad
Auditado por: claude

Puntuación de calidad

38
Arquitectura
100
Mantenibilidad
87
Contenido
26
Comunidad
100
Seguridad
91
Cumplimiento de la especificación

Lo que puedes crear

Application Developer Troubleshooting Slow Queries

Developer notices their application has slow page loads due to database queries. The skill provides step-by-step analysis of query patterns and optimization recommendations.

DBA Designing Indexing Strategy

Database administrator needs to design an indexing strategy for a high-traffic e-commerce application. The skill provides comprehensive guidance on index types and column ordering.

Architect Planning Database Scaling

Software architect planning to scale a monolithic application to handle increased load. The skill provides guidance on partitioning, sharding, and caching strategies.

Prueba estos prompts

Basic Query Optimization
Help me optimize this slow SQL query: [PASTE YOUR QUERY]. Analyze the query structure and suggest improvements for better performance.
Indexing Strategy Design
Design an indexing strategy for our [DATABASE TYPE] database that handles [DESCRIBE YOUR WORKLOAD - e.g., high read, frequent updates]. Our main query patterns include [LIST QUERY PATTERNS].
N+1 Query Resolution
We are experiencing N+1 query problems in our [ORM NAME] application when loading [DESCRIBE ENTITIES]. The current code does [DESCRIBE CURRENT PATTERN]. How can we optimize this?
Database Scaling Architecture
Our database is experiencing [DESCRIBE PROBLEM - e.g., high write volume, slow queries under load]. Current setup: [DESCRIBE CURRENT ARCHITECTURE]. What scaling and optimization strategies would you recommend?

Mejores prácticas

  • Always measure before optimizing - use EXPLAIN ANALYZE to understand actual query performance rather than guessing
  • Design indexes based on actual query patterns, not theoretical knowledge - profile your application's most frequent queries
  • Implement comprehensive monitoring with slow query logs and performance baselines to detect regressions early

Evitar

  • Indexing every column 'just in case' - this increases write overhead and storage without proportional benefit
  • Ignoring N+1 queries in ORMs - always use eager loading, batch queries, or DataLoader patterns
  • Applying generic optimization advice without analyzing your specific workload patterns and data distribution

Preguntas frecuentes

What databases does this skill support?
The skill covers PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, DynamoDB, and cloud databases including RDS, Aurora, Azure SQL, Cloud SQL, and DynamoDB.
Can this skill execute database commands for me?
No, this skill provides guidance and recommendations. You must execute any database commands yourself in your own environment.
How do I know which indexes to create?
Analyze your slow query log and most frequent queries. Create composite indexes matching your WHERE, JOIN, and ORDER BY clauses. Use covering indexes for read-heavy workloads.
What is the best caching strategy for my application?
Use a multi-tier approach: L1 in-memory for hot data, L2 Redis for distributed caching. Choose cache-aside for reads, write-through for data that must be consistent.
How do I handle database scaling for high traffic?
Start with read replicas and connection pooling. Then consider partitioning (horizontal/vertical), sharding, or moving to a distributed database like CockroachDB or Aurora.
Does this skill work with Claude Code and Codex?
Yes, this skill is compatible with Claude, Codex, and Claude Code. It provides optimization guidance that works with any AI assistant helping with database tasks.

Detalles del desarrollador

Estructura de archivos

📄 SKILL.md