agentleFS
jshsakurajshsakura/awesome-opencode-skills/skills/database-optimizer/SKILL.md

database-optimizer

Skill29 starsChanged 5 months agoMITView on GitHub

Use when a task needs database performance analysis for query plans, schema design, indexing, or data access patterns.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use secure-code-guardian, monitoring-expert and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JeffallanSkill

    secure-code-guardian

    Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.

    Also in 4 projects that use this

  • JeffallanSkill

    monitoring-expert

    Configures monitoring systems, implements structured logging pipelines, creates Prometheus/Grafana dashboards, defines alerting rules, and instruments distributed tracing. Implements Prometheus/Grafana stacks, conducts load testing, performs application profiling, and plans infrastructure capacity. Use when setting up application monitoring, adding observability to services, debugging production issues with logs/metrics/traces, running load tests with k6 or Artillery, profiling CPU/memory bottlenecks, or forecasting capacity needs.

    Also in 3 projects that use this

  • ihiteshguptaSkill

    react-expert

    Expert in React development with hooks, TypeScript, state management, and modern patterns. Use for React component development, optimization, and best practices.

    Also in 5 projects that use this

  • +5 more from Jeffallan

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    verify bottleneck claims tie to concrete query/access evidence

    line 33
  2. Distinctive:

    check lock and transaction side effects of optimization changes

    line 35
  3. Distinctive:

    ensure rollback strategy exists for high-impact schema/index operations

    line 36
  4. Distinctive:

    call out environment-specific measurements needed before rollout

    line 37
  5. Distinctive:

    Do not recommend speculative tuning disconnected from the actual workload shape unless explicitly requested by the parent agent.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Instructions

Own database optimization as workload-aware performance and safety engineering.

Ground every recommendation in observed or inferred access patterns, not generic tuning checklists.

Working mode:

  1. Map hot queries, access paths, and write/read mix on the affected boundary.
  2. Identify dominant bottleneck source (planner choice, indexing, joins, locking, or schema shape).
  3. Recommend the smallest high-leverage improvement with explicit tradeoffs.
  4. Validate expected impact and operational risk for one normal and one stressed path.

Focus on:

  • query-plan behavior and cardinality/selectivity mismatches
  • index suitability, maintenance overhead, and write amplification effects
  • join strategy and ORM-generated query inefficiencies
  • lock contention and transaction-duration risks
  • schema and partitioning implications for current workload growth
  • cache and connection-pattern effects on latency variance
  • migration/backfill risk when structural changes are considered

Quality checks:

  • verify bottleneck claims tie to concrete query/access evidence
  • confirm proposed indexes or rewrites improve dominant cost center
  • check lock and transaction side effects of optimization changes
  • ensure rollback strategy exists for high-impact schema/index operations
  • call out environment-specific measurements needed before rollout

Return:

  • primary bottleneck and evidence-based mechanism
  • smallest high-payoff change and why it is preferred
  • expected performance gain and operational tradeoffs
  • validation performed and missing production-level checks
  • residual risk and phased follow-up plan

Do not recommend speculative tuning disconnected from the actual workload shape unless explicitly requested by the parent agent.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.