skills/tidbx/SKILL.md
Provision TiDB Cloud Serverless clusters and related resources. Use when creating, deleting, or listing clusters/branches, or managing SQL users via the console.
npx skillsauth add pingcap/agenticstore tidbxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provision TiDB Cloud Serverless (now branded as TiDB X) clusters and related resources using the workflows below. Use the command patterns in the references file as implementation details, but keep the focus on the provisioning outcome and required inputs.
Note: TiDB Cloud Serverless has been renamed to TiDB X. Keep both terms in user-facing guidance for clarity. Note: Many users say "instance" when they mean "cluster." Treat "instance" as a synonym for "cluster."
Reminder: Use the CLI for TiDB Cloud (TiDB X) auth/setup, listing regions/projects, and cluster/instance CRUD (Create, Read/list, Update, Delete). Before any CRUD action, ensure the user completes ticloud setup and authentication (see Provisioning Setup below).
Complete setup before any provisioning or lifecycle operations.
Setup Status (TiDB Cloud component)
When verifying setup, remind users to follow this order: install → login → verify with ticloud auth whoami.
Use the checklist to show users what they should do next and where they are in the setup flow.
Checklist template (update after each check, and reflect command results):
Setup Status (TiDB Cloud component)
- ○ ticloud installed
- ○ authenticated
After command -v ticloud succeeds, mark install complete:
Setup Status (TiDB Cloud component)
- ● ticloud installed
- ○ authenticated
After ticloud auth whoami succeeds, mark auth complete:
Setup Status (TiDB Cloud component)
- ● ticloud installed
- ● authenticated
For macOS/Linux:
curl https://raw.githubusercontent.com/tidbcloud/tidbcloud-cli/main/install.sh | sh
After install, verify:
command -v ticloud
Use command -v ticloud to confirm installation before marking it complete.
Update checklist:
Setup Status (TiDB Cloud component)
- ● ticloud installed
- ○ authenticated
Always check auth first:
ticloud auth whoami
If not logged in, run:
ticloud auth login --insecure-storage
Wait for the user to complete the browser flow, then re-check:
ticloud auth whoami
Update checklist:
Setup Status (TiDB Cloud component)
- ● ticloud installed
- ● authenticated
If ticloud auth whoami fails due to network/DNS (e.g., cannot reach iam.tidbapi.com):
If setup errors persist, point the user to the official docs:
Use terminal-friendly ASCII tables for any list output (regions, projects, clusters, branches).
Use ASCII borders with +, -, and |.
Use fixed-width columns; left-align all text.
Refine the table formatting so columns align cleanly and remain readable.
Keep headers short and descriptive.
Do not use Unicode box-drawing characters.
Always emphasize command output that users should execute later.
For single-line commands, use bold inline formatting.
Example:
Run this:
ticloud auth login --insecure-storage
Example format:
+----------------+-----------------------+---------------------------+--------+
| Display Name | Cluster ID | Region | State |
+----------------+-----------------------+---------------------------+--------+
| test-skill | 10913591479486949552 | alicloud-ap-southeast-1 | ACTIVE |
+----------------+-----------------------+---------------------------+--------+
ticloud serverless region and present the full list in a terminal-friendly ASCII bordered table (fixed-width columns in a code block) with selectable option numbers before asking for a region.ticloud project list and present the results in the same ASCII bordered table format before asking. Keep the project ID as a third column..env, direct them to the TiDB Cloud console download for the cluster.references/ticloud.md.ticloud serverless list -p <project-id> -o json and render a table from the JSON.references/ticloud.md.ticloud serverless list -p <project-id> -o json and render a table from the JSON.ticloud serverless list.ticloud project list and present results in the ASCII bordered table format.ticloud serverless list -p <project-id> -o json and render a table from the JSON.ticloud serverless list -p <project-id> -o json and filter by cluster ID or display name.references/ticloud.md.ticloud project list and present results in the ASCII bordered table format.ticloud serverless branch list.ticloud serverless branch list --cluster-id <cluster-id> -o json and render a table from the JSON..env downloads, SQL user management, and database creation. Do not create/update/delete SQL users via CLI.https://tidbcloud.com/clusters/<cluster-id>/overview?orgId=<org-id>&projectId=<project-id>..env)..envticloud auth whoami before any action.ticloud operations that take time, wait 60 seconds before returning control.references/ticloud.mddevops
Guidance for using the TiDB Cloud Serverless Driver (Beta) in Node.js, serverless, and edge environments. Use when connecting to TiDB Cloud Starter/Essential over HTTP with @tidbcloud/serverless, or when integrating with Prisma/Kysely/Drizzle serverless adapters in Vercel/Cloudflare/Netlify/Deno/Bun. Use this skill for serverless driver setup and edge runtime guidance.
tools
Prisma ORM setup and usage for TiDB from Node.js/TypeScript. Covers configuring prisma/schema.prisma (MySQL provider), DATABASE_URL formatting for TiDB Cloud TLS (sslaccept=strict and optional sslcert), migrations (prisma migrate), Prisma Client generation, CRUD patterns, and safe raw SQL ($queryRaw) plus runnable templates.
development
Build and deploy Next.js (App Router) apps that connect to TiDB. Covers Route Handlers (app/api/*/route.ts), Node vs Edge runtime selection for database access, environment variable handling, and production-safe DB patterns on Vercel/serverless. Prefer Prisma/Kysely integration, with optional mysql2 for minimal examples. Includes guides and TypeScript templates.
testing
Set up Kysely with TiDB Cloud (TiDB X), including @tidbcloud/kysely over the TiDB Cloud serverless HTTP driver for serverless or edge environments, plus standard TCP usage. Use for Kysely + TiDB Cloud connection setup, demo snippets, and environment-specific guidance.