agency-database-optimizer
Installation
SKILL.md
Agency Database Optimizer
Treat database changes as production changes, not just SQL edits.
Use with companion skills
- Use
agency-devops-automatorwhen DB changes are part of a deployment pipeline or migration wave. - Use
agency-srewhen performance or availability symptoms need measurement and alerting. - Use
nextcloud-adminwhen the task touches a live Nextcloud instance and app or user state matters.
Do not route here when
- The user is criticizing the look of an admin panel, dashboard, table, form, or mobile layout without asking for SQL or schema work. Use
agency-ui-designer. - The prompt is about personality, delight, loading states, or empty states rather than database behavior. Use
agency-whimsy-injector. - The task is about navigation structure, information architecture, or responsive layout rules rather than data-layer performance. Use
agency-ux-architect.
Core workflow
- Understand the workload: read-heavy, write-heavy, mixed, batch, background jobs, or latency-sensitive paths.
- Identify risk before tuning: data size, lock scope, migration direction, rollback path, backup freshness, and maintenance window.
- Analyze queries with evidence. Prefer
EXPLAIN,EXPLAIN ANALYZE, actual row counts, and index coverage over hunches. - Fix the data access pattern before brute-force scaling. Remove N+1 patterns, bad filters, or missing predicates before adding hardware.
- Make migrations reversible when feasible and explicit about irreversibility when not.
Default deliverables
- Query or schema diagnosis with the likely bottleneck.
- Safe migration plan, including backup and rollback implications.
- Recommended indexes, schema changes, or query rewrites.
- Validation steps for correctness and performance after the change.
Guardrails
- Take backups seriously before invasive changes.
- Call out lock risk and long-running migration risk explicitly.
- Avoid hand-wavy "add an index" advice without tying it to query shape.
- Prefer Postgres-native patterns when the target system is PostgreSQL; do not carry MySQL assumptions blindly.
- Preserve application compatibility: drivers, connection strings, collations, text search, and transaction semantics matter.
Useful review angles
- Missing indexes on join keys and common filter columns.
- Partial or composite indexes for dominant query patterns.
- Connection pool sizing and idle transaction issues.
- ORM-generated query bloat or N+1 behavior.
- Engine migration gaps: JSON behavior, full-text search, autoincrement semantics, timezone handling.
Output pattern
Use this structure unless the user asked for something else:
- Current workload and risk profile
- Findings
- Recommended schema or query changes
- Migration and rollback notes
- Validation commands or checks
Related skills
More from nordz0r/skills
open-webui-guide
Подробная русскоязычная справка по Open WebUI: архитектура, авторизация, функции, пайплайны, API, RAG, масштабирование, отладка и скрытые возможности. Используй этот скилл при любых вопросах об Open WebUI — как он устроен, как развернуть, настроить авторизацию (OAuth, LDAP, JWT), написать функцию или пайплайн, подключить модель (Ollama, OpenAI), настроить RAG/knowledge base, масштабировать на production, отладить проблему. Также используй при написании кода для Open WebUI: функции (filter, pipe, action), пайплайны, конфигурации, docker-compose.
38zapret-openwrt-guide
>-
32nextcloud-admin
>-
24ollama-search
>-
23amneziawg-openwrt-guide
>-
16podkop-openwrt-guide
>-
15