aidp-ai-sql

aidp-ai-sql is a skill for Claude Code from ahmedawan-oracle/claude-code-plugins. It costs 77 tokens per session (1,074 once invoked), scanned A, original, MIT.

A way to call a language model directly from Spark SQL, the SQL language used to work with large distributed datasets. It can generate text from rows or query results inside the data platform.

In plain words
What is it for?
Use it to summarise or classify rows, extract structured information, enrich datasets, or produce a grounded narrative from an aggregate result.
Why use it?
It avoids moving data out of SQL for tasks such as summarising, classifying, extracting details, or writing an explanation from aggregated data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the oracle-ai-data-platform-workbench-engineer-agent plugin — 14 skills shipped together

Good fit Use it to summarise or classify rows, extract structured information, enrich datasets, or produce a grounded narrative from an aggregate result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ahmedawan-oracle/claude-code-plugins/aidp-ai-sql
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ahmedawan-oracle/claude-code-plugins --skill aidp-ai-sql
Clone the repo
git clone --depth 1 https://github.com/ahmedawan-oracle/claude-code-plugins

Made for: Claude Code.

Or install oracle-ai-data-platform-workbench-engineer-agent, the plugin that ships this one along with the rest of its 14 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aidp-ai-sql

README.md
[![agentmods](https://agentmods.dev/badge/skills/ahmedawan-oracle/claude-code-plugins/aidp-ai-sql/github.svg)](https://agentmods.dev/skills/ahmedawan-oracle/claude-code-plugins/aidp-ai-sql)
Your own site
<a href="https://agentmods.dev/skills/ahmedawan-oracle/claude-code-plugins/aidp-ai-sql"><img src="https://agentmods.dev/badge/skills/ahmedawan-oracle/claude-code-plugins/aidp-ai-sql/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aidp-ai-sql

Your own site · 80×15
<a href="https://agentmods.dev/skills/ahmedawan-oracle/claude-code-plugins/aidp-ai-sql"><img src="https://agentmods.dev/badge/skills/ahmedawan-oracle/claude-code-plugins/aidp-ai-sql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.01074
Opus 5.5 $0.00031 $0.00430
Sonnet 5.5 $0.00015 $0.00215
Haiku 4.5 $0.00008 $0.00107

Measured 1mo ago against content hash 8f66742e426c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aidp-ai-sql scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-code-plugins/oracle-ai-data-platform-workbench-engineer-agent/skills/aidp-ai-sql/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

aidp-ai-sql — LLM-in-SQL with ai_generate()

Call an LLM directly inside Spark SQL on AIDP — summarize, classify, extract, or narrate over lakehouse data without leaving SQL. A signature differentiator: most competitor agents can't do this inline.

This is a SQL-helper skill. Interactive Spark SQL runs through the bundled helper scripts/aidp_sql.py (it mints a UPST from the api_key DEFAULT profile, auto-creates a scratch notebook, and returns JSON). No aidp MCP and no AIDP_SESSION required.

When to use

  • "Summarize / classify / extract / enrich these rows with AI in SQL."
  • Generate a grounded narrative over an aggregate (e.g. a finance summary over a spend rollup).

Signature (model FIRST)

ai_generate('<model>', '<prompt>')

e.g. ai_generate('openai.gpt-5.4', 'Summarize this supplier spend: ...').

LIVE-VERIFIED model-first (model, prompt) signature with openai.gpt-5.4, openai.gpt-4o, and xai.grok-4.

Verify before relying on it (no-fabrication): confirm the exact signature and the available model names live on the target cluster before treating this as guaranteed — run a trivial SELECT ai_generate('<model>', 'hello') cell first (see smoke test below). Model availability varies by environment. If a model name fails, list/ask for the correct one rather than guessing.

Don't gate on the /models REST catalog. ai_generate resolves the model at the Spark engine level, so it can work even when aidp-models-catalog's GET /models?modelType=GENERATIVE_AI returns an empty list. The smoke test (not the catalog endpoint) is the source of truth for whether ai_generate works.

How to run a cell

python "$PLUGIN_DIR/scripts/aidp_sql.py" \
  --region <region> --datalake <DATALAKE_OCID> --workspace <ws> --cluster <cluster-key> \
  --code "<python/spark code>"

Returns JSON: {"status":"ok|error","outputs":[...],"spark_job_ids":[...]}. Exit 0 on success, 1 on cell error. See scripts/aidp_sql.py for full flags (--profile, --session-profile, --notebook, --timeout).

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 76 lines · 77 tokens per session scan A 8f66742e426c

Subscribe to this mod's changes

aidp-ai-sql is a skill published in the GitHub repository ahmedawan-oracle/claude-code-plugins (3 stars, last pushed 2mo ago), licensed MIT. It adds 77 tokens to every session and 1,074 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pinecone

Managed vector DB for production RAG and search.

NousResearch/hermes-agent · 13 tokens

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

data-engineer

Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms.

davila7/claude-code-templates · 35 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens

graphjin-env

Use when setting up a training or evaluation loop against a GraphJin agent environment — running the container, reading /health, driving episodes hosted or step-by-step or with your own agent over MCP, splitting train from eval, exporting trajectories, and deciding whether two rewards can be compared.

dosco/graphjin · 61 tokens

ingesting-into-data-lake

Import data into the AWS data lake from S3 files, local uploads, JDBC databases (Oracle, SQL Server, PostgreSQL, MySQL, RDS, Aurora), Amazon Redshift, Snowflake, BigQuery, DynamoDB, or existing Glue catalog tables (migration). Default target is S3 Tables; standard Iceberg on a general purpose bucket is supported where…

aws/agent-toolkit-for-aws · 228 tokens