1password
Install and use 1Password CLI (`op`) to sign in, inspect vault items, read secrets safely, and inject secrets into commands.
Review and run read-only natural-language SQL against a customer data warehouse with cached schema introspection and explicit write grants.
$ npx -y skills add HybridAIOne/hybridclaw --skill warehouse-sql --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/warehouse-sqlContext preview
The summary Claude sees to decide when to auto-load this skill.
Review and run read-only natural-language SQL against a customer data warehouse with cached schema introspection and explicit write grants.
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."
user-invocable: true
requires:
bins:
- python3
metadata:
hybridclaw:
category: development
short_description: "Natural-language SQL for warehouses."
tags:
- sql
- warehouse
- analytics
- postgres
- clickhouse
- bigquery
- snowflakeUse this skill when the user asks natural-language questions of a data warehouse, analytics database, or TPC-H-style reporting dataset.
ClickHouse, BigQuery, and Snowflake backends
1. Refresh or read cached schema before asking the model to draft SQL:
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:
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:
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:
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.
Supported backend names:
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.
The helper writes schema cache files outside the repo by default at:
~/.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:
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.
capability, not a user-facing token.
running it unless the user already gave a concrete write instruction.
Before execution, check:
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.
Model review defaults to `HYBRIDCLAW_GATEWAY_URL` / `GATEWAY_BASE_URL` plus `/v1/chat/completions` and model `auxiliary/eval_
Enterprise-ready self-hosted AI assistant runtime with sandboxed execution, secure credentials, approvals, and memory
Install and use 1Password CLI (`op`) to sign in, inspect vault items, read secrets safely, and inject secrets into commands.
Coordinate cross-functional project delivery by tracking commitments, dependencies, decisions, and risks; maintain project…
Search Airtable bases and tables, read records and computed fields, and prepare guarded record CRUD requests with schema-based…
Expose HybridClaw as a custom Alexa skill and prepare guarded Alexa smart-home/device control payloads without exposing Amazon…
View Apple Calendar schedules, draft or import `.ics` files, and coordinate host-side calendar actions on macOS.
Control Apple Music playback, inspect now playing, start playlists, and automate the macOS Music app.