snowflake
Snowflake API for data warehouse operations. Use when user mentions "Snowflake", "data warehouse", "SQL API", "warehouse", "database", "schema", or asks to query Snowflake data.
What this skill does
## Troubleshooting
If requests fail, run `zero doctor check-connector --env-name SNOWFLAKE_PAT` or `zero doctor check-connector --url https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/databases --method GET`
### Error 390432: `Network policy is required`
Snowflake refuses PAT authentication for any user that is not bound to a network policy. The account admin must attach one before the PAT can authenticate. Steps (perform in Snowsight):
1. Open [https://app.snowflake.com](https://app.snowflake.com) and sign in with an `ACCOUNTADMIN` or `SECURITYADMIN` role.
2. In the left sidebar go to **Projects → Worksheets** and open (or create) a SQL worksheet.
3. Run `SHOW USERS;` and note the value in the `name` column for the PAT-owning user.
4. Run the policy creation statement on its own:
```sql
CREATE NETWORK POLICY pat_policy ALLOWED_IP_LIST = ('0.0.0.0/0');
```
5. Then run the user binding statement on its own (replace `USER_NAME` with the value from step 3 — **no quotes**):
```sql
ALTER USER USER_NAME SET NETWORK_POLICY = pat_policy;
```
Execute the two statements separately — Snowsight rejects them when pasted and submitted together. `0.0.0.0/0` is a deliberately permissive list to unblock the connector; tighten it to the runner egress range once available. Prefer `ALTER USER` over `ALTER ACCOUNT` so the policy does not affect other login paths.
## How to Use
All examples assume these environment variables are set:
- `SNOWFLAKE_PAT`: Snowflake programmatic access token secret
- `SNOWFLAKE_ACCOUNT`: Snowflake account identifier, for example `myorganization-myaccount`
**Base URL**: `https://${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com/api`
**Authentication**: Programmatic Access Token
```bash
--header "Authorization: Bearer $SNOWFLAKE_PAT"
```
## SQL API
### 1. Validate Connection
Write to `/tmp/snowflake_statement.json`:
```json
{
"statement": "SELECT CURRENT_USER() AS user, CURRENT_ROLE() AS role, CURRENT_VERSION() AS version",
"timeout": 60
}
```
Then run:
```bash
curl -s -X POST "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/statements/" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" \
--header "Content-Type: application/json" \
-d @/tmp/snowflake_statement.json | jq .
```
### 2. Run a Query With Context
Write to `/tmp/snowflake_statement.json`:
```json
{
"statement": "SELECT * FROM MY_TABLE LIMIT 10",
"timeout": 60,
"database": "MY_DATABASE",
"schema": "PUBLIC",
"warehouse": "COMPUTE_WH",
"role": "ANALYST"
}
```
Then run:
```bash
curl -s -X POST "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/statements/" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" \
--header "Content-Type: application/json" \
-d @/tmp/snowflake_statement.json | jq .
```
### 3. Check Statement Status
Replace `<statement-handle>` with the handle returned by a SQL API request.
```bash
curl -s "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/statements/<statement-handle>" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 4. Cancel a Statement
```bash
curl -s -X POST "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/statements/<statement-handle>/cancel" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
## REST APIs
### 5. List Databases
```bash
curl -s "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/databases" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 6. Get Database Details
```bash
curl -s "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/databases/<database-name>" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 7. List Schemas
```bash
curl -s "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/databases/<database-name>/schemas" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 8. List Tables
```bash
curl -s "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/databases/<database-name>/schemas/<schema-name>/tables" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 9. Get Table Details
```bash
curl -s "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/databases/<database-name>/schemas/<schema-name>/tables/<table-name>" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 10. List Warehouses
```bash
curl -s "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/warehouses" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 11. Resume a Warehouse
```bash
curl -s -X POST "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/warehouses/<warehouse-name>:resume" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
### 12. Suspend a Warehouse
```bash
curl -s -X POST "https://$SNOWFLAKE_ACCOUNT.snowflakecomputing.com/api/v2/warehouses/<warehouse-name>:suspend" \
--header "Authorization: Bearer $SNOWFLAKE_PAT" | jq .
```
## Guidelines
1. **Account identifier**: Use the account identifier portion before `.snowflakecomputing.com`, such as `myorganization-myaccount`.
2. **PAT setup**: Snowflake may require network policy and authentication policy configuration before a PAT can authenticate.
3. **Least privilege**: Use a PAT tied to a user or service user with the minimum role needed for the requested data and operations.
4. **Warehouse context**: Queries that scan tables usually need a `warehouse` in the request body or an active default warehouse for the user.
5. **Identifier encoding**: URL-encode database, schema, table, and warehouse names if they contain spaces, slashes, quotes, or other special characters.
6. **Async execution**: Long-running SQL API requests return a statement handle; poll `/api/v2/statements/<statement-handle>` until the query completes.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.