TiDB X 用 Claude Code Agent Skills
PingCap が GitHub で TiDB X (TiDB Cloudのサービスブランド)用 Agent Skills を公開しています。
Agent Skills とは
こちらのブログでその内容や使い方を纏めています。
Agent Skills(エージェントスキル) は、AI エージェントに「役割」や「専門性」を与えるための仕組みです。
これは単なるプロンプト集ではなく、AI が特定のタスクを安定して実行するための知識・手順・補助リソースを一体化した再利用可能な単位として設計されており、従来自然言語でLLMに動作を指定していたシステムプロンプトを拡張し、「この作業をするときは、この考え方・この手順・この制約を守る」という知識を スキルとして事前定義 し、必要なときにエージェントへ読み込ませるという考え方を取っています。
Agent Skills は、プロンプトエンジニアリングを 属人化したノウハウ から 構造化された資産 に変えます。これまでのプロンプトは、チャット履歴に埋もれたり、人によって書き方が異なったりと、再利用性や保守性に課題がありました。
一方で Agent Skills は、フォルダ単位で管理され、Markdown 形式の SKILL.md にスキルの目的、前提条件、具体的な指示、使用例などが明確に記述されます。
このファイル自体が「AI に渡す作業マニュアル」となり、エージェントは必要に応じてそれを読み込み、振る舞いを切り替えます。
つまり、「その場限りのプロンプト」ではなく、「継続的に使える業務スキル」として AI の能力を拡張できるのです。
PingCap からリリースされている Skill を使うと ClaudeCode 等から TiDB X を操作するための機能が統合された環境として提供されます。
さっそくやってみる
0. Claude Code と Agent Skills の設定
こちらのブログに従い簡単なskillが動作するところまでを確認しておきます。
1. TiDB X 用 Skill のダウンロードと配置
新しい Skill の配置はとてもシンプルです skill.mdとそれに紐づくスクリプトやファイル(通常はskill.mdと同じ場所にフォルダとしてまとめられたものが提供されます)を配置するだけです。
まずは git レポジトリをクローンします。
git clone https://github.com/pingcap/agent-rules.git
次に Claude Code 用 skillフォルダに配置します。
xcopy agent-rules\skills\tidbx %USERPROFILE%\.claude\skills\tidbx /E /I
この記事の執筆環境は Windows を使っていますが皆さんの環境ごとにコピー先は置き換えてください。

2. Claude Code から tidbx skill の起動
/tidbxを入力すれば skill が起動します。
● I'll verify your TiDB Cloud CLI setup before we proceed.
● Bash(command -v ticloud 2>/dev/null && echo "INSTALLED" || echo "NOT_INSTALLED")
⎿ NOT_INSTALLED
● Setup Status (TiDB Cloud component)
- ○ ticloud installed
- ○ authenticated
まずこのskillはtidbcloidCLIをインストールした後TiDB Cloud にログインします。
画面の指示に従って作業を行うと以下の様に両方の条件が整いクラスターの操作が可能となります。
● I'll verify your TiDB Cloud CLI setup before we proceed.
● Bash(command -v ticloud 2>/dev/null && echo "INSTALLED" || echo "NOT_INSTALLED")
⎿ NOT_INSTALLED
● Setup Status (TiDB Cloud component)
- ○ ticloud installed
- ○ authenticated
Create clusterと指示を出すと以下の様に対話を行いながらClusterが起動します。
> create a cluster
● Bash(export PATH="$HOME/bin:$PATH" && ticloud serverless region 2>&1)
⎿ [
{
"cloudProvider": "aws",
… +54 lines (ctrl+o to expand)
● Here are the available regions:
+----+-----+------------------------------+----------------------+
| # | Cloud | Region | Region ID |
+----+-----+------------------------------+----------------------+
| 1 | AWS | Tokyo (ap-northeast-1) | aws-ap-northeast-1 |
| 2 | AWS | Singapore (ap-southeast-1) | aws-ap-southeast-1 |
| 3 | AWS | Frankfurt (eu-central-1) | aws-eu-central-1 |
| 4 | AWS | N. Virginia (us-east-1) | aws-us-east-1 |
| 5 | AWS | Oregon (us-west-2) | aws-us-west-2 |
+----+-----+------------------------------+----------------------+
Which region would you like to use? (Enter a number 1–5)
> 1
● Bash(export PATH="$HOME/bin:$PATH" && ticloud project list 2>&1)
⎿ {
"projects": [
{
… +12 lines (ctrl+o to expand)
● Here are your available projects:
+----+------------------+-----------------------+
| # | Name | Project ID |
+----+------------------+-----------------------+
| 1 | default project | 1372813089454531804 |
+----+------------------+-----------------------+
You only have one project: default project. I'll use that.
What would you like to name your new cluster?
> skill
● To confirm, I'll create a cluster with these settings:
- Region: Tokyo (aws-ap-northeast-1)
- Project: default project (1372813089454531804)
- Cluster name: skill
Shall I proceed?
> yes
● Bash(export PATH="$HOME/bin:$PATH" && ticloud serverless create --display-name skill --region aws-ap-northeast-1 --project-id 1372813089454531804 2>&1)
⎿ ... Waiting for cluster to be ready
Cluster 10068661020985127044 is ready.
⎿ (timeout 2m)
● Cluster created. Let me verify it's listed:
● Bash(export PATH="$HOME/bin:$PATH" && ticloud serverless list -p 1372813089454531804 -o json 2>&1)
⎿ {
"clusters": [
{
… +56 lines (ctrl+o to expand)
● Your cluster is up and running!
+----------+----------------------+------------------------+--------+
| Name | Cluster ID | Region | State |
+----------+----------------------+------------------------+--------+
| skill | 10068661020985127044 | Tokyo (ap-northeast-1) | ACTIVE |
+----------+----------------------+------------------------+--------+
Cluster details:
- Host: gateway01.ap-northeast-1.prod.aws.tidbcloud.com:4000
- Version: TiDB v8.5.3
- Plan: Starter
- Created by: harunobukameda@gmail.com
To set up a SQL user and download your .env, visit the console:
https://tidbcloud.com/clusters/10068661020985127044/overview?orgId=1372813089209216952&projectId=1372813089454531804
What would you like to do next?
Discussion