Skip to content
Back to skills

Sql Optimization Patterns

ASecurity

Apply sql optimization patterns in reproducible local data workflows with version-aware APIs, explicit assumptions, and validation. Use when the user chooses sql optimization patterns or its strengths fit the task.

  • 200 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 26, 2026
ai-agentssqlapi

Works with

  • api

Security analysis

A100/100

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

Scanned September 26, 2026

npx -y skills add sandbaseai/sandbase-skills --skill sql-optimization-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql Optimization Patterns?

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

Security grade badge for Sql Optimization Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sandbaseai-sql-optimization-patterns/badge)](https://www.skillsdirectory.com/skills/sandbaseai-sql-optimization-patterns)

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: sql-optimization-patterns
description: "Apply sql optimization patterns in reproducible local data workflows with version-aware APIs, explicit assumptions, and validation. Use when the user chooses sql optimization patterns or its strengths fit the task."
---

# SQL Optimization Patterns

Use this Skill to produce a bounded, verifiable SQL Optimization Patterns outcome. Preserve the user's chosen stack, source material, and authorization boundaries.

Read [the SandBase API map](references/sandbase-api-map.md) only when the task genuinely needs an external data source or generative model.

## Workflow

1. Inspect the available files, runtime, versions, inputs, and existing conventions before deciding what to change.
2. Restate the requested outcome, constraints, acceptance checks, and any assumption that could change the result.
3. Produce the smallest complete implementation, analysis, or artifact that satisfies those checks.
4. Verify the real output with appropriate tests, previews, calculations, or source comparison; do not infer success from file creation alone.
5. Return the deliverable, evidence of validation, material assumptions, and unresolved limitations.

## Quality gates

- Inspect shapes, types, units, missing values, sampling, target leakage, and train/test boundaries before modeling or transformation.
- Pin or record relevant library versions, random seeds, parameters, and environment assumptions for reproducibility.
- Validate against a baseline or independent calculation and report diagnostics, uncertainty, failure modes, and resource use.

## Focus checks

- Preserve query semantics, inspect the actual execution plan and cardinality estimates, update statistics or indexes only with evidence, and benchmark representative parameters.

## SandBase boundary

Keep the core SQL Optimization Patterns work local. Use SandBase only for an explicitly requested external dataset or model inference step that is not part of the local analysis.

1. Call `sandbase_discover` with a short capability query.
2. Call `sandbase_inspect` for viable candidates and compare the live schema, coverage, limits, output, execution mode, and price.
3. Prefer a dedicated tool or API the user already has. Send only the minimum necessary data.
4. Before any paid call, show the endpoint, important arguments, current unit price, call count, and total estimate or uncertainty, then obtain confirmation.
5. Use `sandbase_account` before an approved multi-call batch and call `sandbase_run` only with current schema-defined arguments.
6. Poll asynchronous work with `sandbase_run_get` using the same run ID; never resubmit merely because it is pending.
7. Use `sandbase_runs` only to recover status or reconcile observed cost.

If SandBase is unavailable, continue with local work and authorized sources when possible. Do not silently switch providers, fabricate external results, or claim a generation or retrieval succeeded.

## Handoff

Provide the completed artifact or findings, concise reproduction steps, checks actually run, source or asset provenance, SandBase endpoint and run IDs when used, observed cost when available, and any follow-up that still requires user action.

Files in this skill

  • SKILL.md3.1 KB
  • references/sandbase-api-map.md1.3 KB

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.

Comments

Loading comments…