warehouse-sql
Review and run read-only natural-language SQL against a customer data warehouse with cached schema introspection and explicit write grants.
Skill by HybridAIOne
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hybridaione-warehouse-sql
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, data, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/warehouse-sql
What's inside
- Skill name
warehouse-sql- Description
- Review and run read-only natural-language SQL against a customer data warehouse with cached schema introspection and explicit write grants.
- License
- MIT
- Instructions
- 161 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (6)
- SKILL.md
- tpch_eval_planner.py · evals/
- tpch_scenarios.json · evals/
- tpch_tiny.sql · evals/
- backend-contract.md · references/
- warehouse_sql.py · scripts/
SKILL.md (first lines)
# Warehouse SQL
Use this skill when the user asks natural-language questions of a data
warehouse, analytics database, or TPC-H-style reporting dataset.
## Scope
- schema introspection for SQLite eval databases and pluggable Postgres,
ClickHouse, BigQuery, and Snowflake backends
- cached schema summaries with explicit refresh commands for scheduled runs
- reproducible TPC-H-style evaluation cases for generated SQL
- deterministic SQL safety review before execution
- read-only execution by default
- write detection and explicit per-skill grant checks before any mutation
## Default Workflow
1. Refresh or read cached schema before asking the model to draft SQL:
```bash
python3 skills/warehouse-sql/scripts/warehouse_sql.py --format json schema --backend sqlite --database ./warehouse.db
```
2. Have the model draft SQL using the cached schema, then review it before execution:
```bash
python3 skills/warehouse-sql/scripts/warehouse_sql.py --format json review "SELECT c_name FROM customer LIMIT 10"
```
For review-only commands, pass `--model-review` with the original question
to invoke HybridClaw's OpenAI-compatible gateway for the business-meaning
review:
```bash
python3 skills/warehouse-sql/scripts/warehouse_sql.py --format json review --model-review --question "Show the first 10 customers" "SELECT c_name FROM customer LIMIT 10"
```
3. Return the SQL to the user before execution when the user asks for review,
when the query is broad, or when the result could expose sensitive business
data.
4. Execute only after the SQL review passes and include the original question:
```bash
python3 skills/warehouse-sql/scripts/warehouse_sql.py --format json query --backend sqlite --database ./warehouse.db --execute --question "Show the first 10 customers" "SELECT c_name FROM customer LIMIT 10"
```
`query --execute` always invokes model review before running SQL. Configure
model review with `HYBRIDCLAW_GATEWAY_URL` / `GATEWAY_BASE_URL` and
`HYBRIDCLAW_WAREHOUSE_SQL_MODEL_REVIEW_TOKEN`, `HYBRIDCLAW_GATEWAY_TOKEN`, or
`GATEWAY_API_TOKEN`. Execution requires `--question` so the model can check
whether the SQL answers the user's request.
## Backend Contract
Supported backend names:
- `sqlite` — executable through Python stdlib; used by the bundled eval suite
- `postgres` — `psycopg` driver, or a connector command
- `clickhouse` — `clickhouse-connect` driver, or a connector command
- `bigquery` — `google-cloud-bigquery` driver, or a connector command
- `snowflake` — `snowflake-connector-python` driver, or a connector command
For non-SQLite warehouses, install the backend driver package in the skill
runtime or provide `--backend-command` / `HYBRIDCLAW_WAREHOUSE_SQL_<BACKEND>_COMMAND`.
Connector commands read SQL on stdin and emit a JSON row array, `{"rows": [...]}`
or CSV with headers. Do not invent credentials.
BigQuery schema introspection requires `--bigquery-dataset` or
`HYBRIDCLAW_WAREHOUSE_SQL_BIGQUERY_DATASET`. Set
`--bigquery-project` / `HYBRIDCLAW_WAREHOUSE_SQL_BIGQUERY_PROJECT` when the
dataset is not in the default project.
## Schema Cache
The helper writes schema cache files outside the repo by default at:
```text
~/.hybridclaw/warehouse-sql/schema-cache
```
Use `--cache-dir` for tests or customer-specific workspaces. Use `--refresh` to
force re-introspection. Use `schedule-refresh` to register the refresh with the
HybridClaw gateway scheduler:
```bash
python3 skills/warehouse-sql/scripts/warehouse_sql.py --format json schedule-refresh --backend postgres --profile analytics --every "0 */6 * * *"
```
Scheduled refreshes default to `last-channel` delivery. Use
`--delivery-kind channel --delivery-to <channel-id>` only when the target
channel id is known.
Set `HYBRIDCLAW_GATEWAY_TOKEN` or `GATEWAY_API_TOKEN` in the environment for
production scheduler registration. `--gateway-token` is supported for tests, but
tokens passed as CLI arguments can be visible in process listings.
## Read/Write Rules
- Default posture is read-only. `SELECT`, `WITH`, and `EXPLAIN` are allowed.
- Mutating SQL is blocked unless all of these are true:
- the user explicitly requested a write
- the command includes `--allow-write`
- the environment contains `HYBRIDCLAW_WAREHOUSE_SQL_WRITE_GRANT`
- `--write-grant` exactly matches that environment value
- Do not set or reveal the write grant in chat. Treat it like an operator
capability, not a user-facing token.
- Even with a write grant, explain the mutation and ask for confirmation before
running it unless the user already gave a concrete write instruction.
## SQL Review Rules
Before execution, check:
- single statement only
- read-only unless the explicit write grant path is used
- selected columns are narrow enough for the task
- `LIMIT` is present for exploratory row reads
- joins use known keys from the schema cache
- date and tenant filters are present when the question implies scope
The helper emits a `review` object with safety status and findings. Treat that
as a deterministic guardrail. Pass `--model-review` on review-only commands to
have the helper invoke the configured OpenAI-compatible model endpoint and add
that verdict to `review.modelReview`; `query --execute` invokes model review
automatically. Execution is blocked unless both the deterministic guardrail and
model review pass.From HybridAIOne/hybridclaw, MIT.
More from HybridAIOne/hybridclaw
- 0.720score
manim-video
HybridAIOne
Plan, script, render, and stitch Manim Community Edition videos in Python.
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
datalion
HybridAIOne
Use for DataLion workflows such as listing, reading, creating, or editing projects, inspecting data sources, importing Excel or CSV data, working with reports…
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
langfuse
HybridAIOne
Use Langfuse for LLM observability and evaluation and look up Langfuse documentation.
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
hermes3000-writing
HybridAIOne
Use Hermes3000 to plan, draft, revise, save, check consistency, and export long-form manuscripts through the Hermes3000 AI writing portal API.
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
human-distill
HybridAIOne
Distill a real person into a hireable coworker agent from their source material — chat exports, emails, meeting transcripts, documents, interviews, and live…
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
ga4
HybridAIOne
Run production Google Analytics 4 Data API reports with gateway-injected bearer auth, safe request review, traffic source, landing-page, time-series, revenue…
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
meme-generation
HybridAIOne
Generate meme images from curated classic templates, dynamic imgflip templates, or a custom image.
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
excalidraw
HybridAIOne
Create and revise editable `.excalidraw` diagrams as Excalidraw JSON for architecture diagrams, flowcharts, sequence diagrams, concept maps, and other…
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
diagram
HybridAIOne
Create, validate, update, and render diagram-as-code artifacts with Mermaid-first schema awareness plus PlantUML, Graphviz DOT, and Excalidraw JSON adapters.
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
agentic-tpm
HybridAIOne
Coordinate cross-functional project delivery by tracking commitments, dependencies, decisions, and risks; maintain project context and prepare bounded…
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
distil-pii-redactor
HybridAIOne
Redact, anonymize, sanitize, or remove PII locally with Distil-PII and llama.cpp; keep personal data and secret values out of model context, logs, and chat.
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
google-ads
HybridAIOne
Manage Google Ads accounts with safe GAQL reporting, campaign planning, guarded mutations, and gateway-proxied REST API calls.
SkillAFreshness: A★ 159Claude Code +9
Signals
- Stars
- 159
- Forks
- 17
- Open issues
- 323
- Last commit (this folder)
- May 26, 2026 (5 months ago)
- Last release
- Oct 24, 2026 (4 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/HybridAIOne/hybridclaw
- Website
- www.hybridclaw.io/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from HybridAIOne
- 0.720score
human-distill
HybridAIOne
Distill a real person into a hireable coworker agent from their source material — chat exports, emails, meeting transcripts, documents, interviews, and live…
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
manim-video
HybridAIOne
Plan, script, render, and stitch Manim Community Edition videos in Python.
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
datalion
HybridAIOne
Use for DataLion workflows such as listing, reading, creating, or editing projects, inspecting data sources, importing Excel or CSV data, working with reports…
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
hermes3000-writing
HybridAIOne
Use Hermes3000 to plan, draft, revise, save, check consistency, and export long-form manuscripts through the Hermes3000 AI writing portal API.
SkillAFreshness: A★ 159Claude Code +9 - 0.720score
langfuse
HybridAIOne
Use Langfuse for LLM observability and evaluation and look up Langfuse documentation.
SkillAFreshness: A★ 159Claude Code +9 - 0.716score
meme-generation
HybridAIOne
Generate meme images from curated classic templates, dynamic imgflip templates, or a custom image.
SkillAFreshness: A★ 159Claude Code +9
Cite this page
warehouse-sql skill. Agent Mart. https://agentmart.dev/skills/hybridaione-warehouse-sql (last updated 2026-10-24)