All skills
cloudflare avatar

/basin

@41e0d19 official
by cloudflarecloudflare/skills3k stars
298

Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL names.

Use this Skill: https://skilld.dev/gh/cloudflare/skills/basin

This session only. Nothing lands on disk.

referencessqlconfiguration.md

≈425 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Basin SQL Configuration

Auth and setup. For the current permission matrix and wrangler flags, pull https://developers.cloudflare.com/basin-sql/reference/wrangler-commands/index.md and the Basin Catalog manage-catalogs doc.

Prerequisites

  • R2 bucket with Basin Catalog enabled (catalog/configuration.md)
  • R2 API token: R2 Storage Admin Read & Write (includes Basin SQL Read), or add Basin SQL Read explicitly
  • Wrangler CLI (for CLI queries)

Open-beta limitation: R2 Storage Admin Read & Write is required even for read-only Basin SQL queries.

Enable Catalog + Get Warehouse

npx wrangler basin catalog enable my-bucket

You query by warehouse name ({ACCOUNT_ID}_{BUCKET}), shown in the output alongside the Catalog URI.

Configure Auth

Wrangler CLI

export WRANGLER_BASIN_SQL_AUTH_TOKEN=<your-token>
# or a .env file in the project dir (auto-loaded): WRANGLER_BASIN_SQL_AUTH_TOKEN=<your-token>

Wrangler does not use the wrangler login OAuth session for Basin SQL — the env var is required.

REST API

curl -X POST \
  "https://api.sql.cloudflarestorage.com/api/v1/accounts/$ACCOUNT_ID/basin-sql/query/$BUCKET" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"query": "SELECT * FROM default.my_table LIMIT 10"}'

Verify Setup

npx wrangler basin sql query "${ACCOUNT_ID}_my-bucket" "SHOW DATABASES"
npx wrangler basin sql query "${ACCOUNT_ID}_my-bucket" "SHOW TABLES IN default"

See Also

Source: SKILL.md on GitHub

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill provides documentation and implementation patterns for Cloudflare Basin analytics workflows, including Pipelines, Catalog, and SQL querying. No security issues were detected, and the skill correctly leverages standard Cloudflare CLI tools and official API endpoints while following best practices for credential management.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

Signed by skilld at 41e0d19. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 hours ago.

Activeupdated 7 hours ago

README badge

README badge for cloudflare/skills/basin