← 返回 Skills 市场
sdk-team

Alibabacloud Tablestore Ops

作者 alibabacloud-skills-team · GitHub ↗ · v0.0.1 · MIT-0
cross-platform ✓ 安全检测通过
134
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install alibabacloud-tablestore-ops
功能描述
Alibaba Cloud Tablestore (OTS) Read-Only Operations Skill. Use for querying Tablestore instances and data tables via Aliyun CLI. Triggers: "tablestore", "ots...
使用说明 (SKILL.md)

Tablestore Read-Only Operations

This skill provides CLI-based read-only operations for querying Alibaba Cloud Tablestore (OTS) instances and data tables. Tablestore is a fully managed NoSQL database service that supports storing and accessing large amounts of structured data.

Architecture: Aliyun CLI (otsutil) → Tablestore Instance → Data Tables (Wide Table / TimeSeries)

Scope: This skill only covers read/query operations. No create, update, or delete operations are included.

Prerequisites

Pre-check: Aliyun CLI Required (Version 3.3.0+)

Tablestore operations are performed via aliyun otsutil command, which is part of the Aliyun CLI. IMPORTANT: The otsutil subcommand is only available in Aliyun CLI version 3.3.0 or later. The Homebrew version may be outdated - download directly from the official CDN. See references/cli-installation-guide.md for installation instructions.

Installation

Install Aliyun CLI (Version 3.3.0+)

WARNING: The Homebrew version (brew install aliyun-cli) may not include otsutil. Always download from the official CDN to ensure you get version 3.3.0+ with otsutil support.

Option 1: Download Binary (Recommended)

Platform Download
Mac (Universal) Mac Universal
Linux (AMD64) Linux AMD64
Linux (ARM64) Linux ARM64
Windows (64-bit) Windows

Option 2: Mac GUI Installer

Download Mac PKG and double-click to install.

macOS / Linux Binary Setup

# Download (example for macOS Universal)
curl -L -o aliyun-cli.tgz https://aliyuncli.alicdn.com/aliyun-cli-macosx-latest-universal.tgz

# Extract
tar -xzf aliyun-cli.tgz

# Move to PATH
sudo mv aliyun /usr/local/bin/

# Verify installation and version (must be 3.3.0+)
aliyun version

# Verify otsutil is available
aliyun otsutil help

Windows Setup

  1. Download the zip file from the download link above
  2. Extract the zip file to get aliyun.exe
  3. Add the directory to your PATH environment variable
  4. Verify: aliyun version (must show 3.3.0 or later)

Parameter Confirmation

IMPORTANT: Parameter Confirmation — Before executing any command, ALL user-customizable parameters (e.g., RegionId, instance names, AccessKey, endpoint, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.

Parameter Required Description Default
--endpoint Yes (for table ops) Instance endpoint URL -
--instance Yes (for table ops) Instance name -
-n (instanceName) Yes (for describe_instance) Instance name -
-r (regionId) Yes (for instance ops) Region ID (e.g., cn-hangzhou) -
-t (tableName) Yes (for table ops) Data table name -

Note: AccessKey credentials are configured via aliyun configure, not passed as command parameters.

Authentication

Pre-check: Alibaba Cloud Credentials Required

Security Rules:

  • NEVER echo or print AccessKey values
  • NEVER ask the user to input AccessKey directly in plain text
  • ONLY configure credentials using aliyun configure

If no valid credentials exist:

  1. Obtain AccessKey from Alibaba Cloud Console
  2. For security, use RAM user credentials with AliyunOTSReadOnlyAccess permission
  3. Configure credentials using Aliyun CLI

Configure Credentials (Aliyun CLI)

# Interactive configuration (recommended)
aliyun configure

# Follow prompts:
# Aliyun Access Key ID [None]: \x3CYOUR_ACCESS_KEY_ID>
# Aliyun Access Key Secret [None]: \x3CYOUR_ACCESS_KEY_SECRET>
# Default Region Id [None]: cn-hangzhou
# Default output format [json]: json
# Default Language [zh]: en

Configure with Specific Profile

# Create a named profile
aliyun configure --profile tablestore-user

# Use the profile for otsutil commands
aliyun otsutil --profile tablestore-user list_instance -r cn-hangzhou

Supported Authentication Modes

Mode Description Configure Command
AK AccessKey ID/Secret (default) aliyun configure --mode AK
RamRoleArn RAM role assumption aliyun configure --mode RamRoleArn
EcsRamRole ECS instance role aliyun configure --mode EcsRamRole
OIDC OIDC role assumption aliyun configure --mode OIDC

RAM Policy

Required permissions for Tablestore read-only operations:

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ots:GetInstance",
        "ots:ListInstance",
        "ots:ListTable",
        "ots:DescribeTable"
      ],
      "Resource": "acs:ots:*:*:instance/*"
    }
  ]
}

Or use the managed policy: AliyunOTSReadOnlyAccess

See references/ram-policies.md for detailed permissions.

Core Workflow

Part 1: Instance Read Operations

Task 1: Configure Instance (Connect to Instance)

Configure the endpoint to select which instance to operate on.

Important: You must configure the instance before performing any table operations.

Command Format:

aliyun otsutil config --endpoint \x3Cendpoint> --instance \x3CinstanceName>

Endpoint Format:

  • Public: https://\x3Cinstance_name>.\x3Cregion_id>.ots.aliyuncs.com
  • VPC: https://\x3Cinstance_name>.\x3Cregion_id>.vpc.tablestore.aliyuncs.com

Example:

aliyun otsutil config --endpoint https://myinstance.cn-hangzhou.ots.aliyuncs.com --instance myinstance

Response:

{
  "Endpoint": "https://myinstance.cn-hangzhou.ots.aliyuncs.com",
  "AccessKeyId": "NTS**********************",
  "AccessKeySecret": "7NR2****************************************",
  "AccessKeySecretToken": "",
  "Instance": "myinstance"
}

Task 2: Describe Instance

View instance details including name, creation time, status, and quota.

Command Format:

aliyun otsutil describe_instance -r \x3CregionId> -n \x3CinstanceName>

Example:

aliyun otsutil describe_instance -r cn-hangzhou -n myinstance

Response:

{
  "ClusterType": "ssd",
  "CreateTime": "2024-07-18 09:15:10",
  "Description": "First instance created by CLI.",
  "InstanceName": "myinstance",
  "Network": "NORMAL",
  "Quota": { "EntityQuota": 64 },
  "ReadCapacity": 5000,
  "Status": 1,
  "TagInfos": {},
  "UserId": "1379************",
  "WriteCapacity": 5000
}

Status Values: 1 = Running. Other values indicate abnormal status.

Task 3: List Instances

Get all instances in a specified region.

Command Format:

aliyun otsutil list_instance -r \x3CregionId>

Example:

aliyun otsutil list_instance -r cn-hangzhou

Response:

["myinstance", "another-instance"]

Note: Returns empty array [] if no instances exist in the region.


Part 2: Data Table Read Operations

Prerequisite: You must first configure an instance endpoint using aliyun otsutil config (Task 1) before running table operations.

Task 4: Select Table (use)

Select a data table for subsequent operations.

Command Format:

aliyun otsutil use --wc -t \x3CtableName>
Parameter Required Description
--wc No Indicates the target is a data table (wide column) or index table
-t, --table Yes Table name

Example:

aliyun otsutil use -t mytable

Task 5: List Tables (list)

List table names under the current instance.

Command Format:

aliyun otsutil list [options]
Parameter Required Description
-a, --all No List all table names (data tables + timeseries tables)
-d, --detail No List tables with detailed information
-w, --wc No List only data table (wide column) names
-t, --ts No List only timeseries table names

Examples:

# List tables of the current type
aliyun otsutil list

# List all tables
aliyun otsutil list -a

# List only data tables
aliyun otsutil list -w

# List only timeseries tables
aliyun otsutil list -t

Task 6: Describe Table (desc)

View detailed table information including primary keys, TTL, max versions, and throughput.

Command Format:

aliyun otsutil desc [-t \x3CtableName>] [-f \x3Cformat>] [-o \x3CoutputPath>]
Parameter Required Description
-t, --table No Table name. If omitted, describes the currently selected table (via use)
-f, --print_format No Output format: json (default) or table
-o, --output No Save output to a local JSON file

Examples:

# Describe the currently selected table
aliyun otsutil desc

# Describe a specific table
aliyun otsutil desc -t mytable

# Output in table format
aliyun otsutil desc -t mytable -f table

# Save table info to file
aliyun otsutil desc -t mytable -o /tmp/table_meta.json

Example Response:

{
  "Name": "mytable",
  "Meta": {
    "Pk": [
      { "C": "uid", "T": "string", "Opt": "none" },
      { "C": "pid", "T": "integer", "Opt": "none" }
    ]
  },
  "Option": {
    "TTL": -1,
    "Version": 1
  },
  "CU": {
    "Read": 0,
    "Write": 0
  }
}

Response Fields:

Field Description
Name Table name
Meta.Pk Primary key columns: C=name, T=type (string/integer/binary), Opt=option (none/auto)
Option.TTL Data time-to-live in seconds (-1 = never expire)
Option.Version Max attribute column versions retained
CU.Read / CU.Write Reserved read/write capacity units

Success Verification

See references/verification-method.md for detailed verification steps.

Quick Verification:

  1. After aliyun otsutil config: Response should show correct Endpoint and Instance
  2. After aliyun otsutil list_instance: Verify expected instance names appear in the list
  3. After aliyun otsutil describe_instance: Verify Status=1 (Running)
  4. After aliyun otsutil list: Verify expected table names appear
  5. After aliyun otsutil desc: Verify table schema and configuration are correct

Related APIs

CLI Command Description
aliyun otsutil config Configure CLI access (endpoint, instance)
aliyun otsutil describe_instance Get instance details
aliyun otsutil list_instance List all instances in a region
aliyun otsutil use Select a data table for subsequent operations
aliyun otsutil list List tables under the current instance
aliyun otsutil desc View detailed table information

See references/related-apis.md for complete API reference.

Best Practices

  1. Use RAM Users: Create RAM users with read-only permissions instead of using root account credentials
  2. Use ReadOnly Policy: Apply AliyunOTSReadOnlyAccess for query-only workflows
  3. Region Selection: Choose the region closest to your application for lower latency
  4. Network Type: Use VPC endpoint for better security in production environments
  5. Credential Security: Use aliyun configure for credential management; never hardcode credentials
  6. Use Profiles: Create dedicated profiles for different environments using aliyun configure --profile \x3Cname>
  7. Export Table Schema: Use aliyun otsutil desc -o \x3Cfile> to export and backup table definitions

Reference Links

Reference Description
cli-installation-guide.md Aliyun CLI installation guide
related-apis.md Complete CLI command reference
verification-method.md Verification steps for each operation
ram-policies.md RAM permission requirements
Aliyun CLI GitHub Aliyun CLI source code and documentation
Instance Operations Doc Instance operations reference
Data Table Operations Doc Data table operations reference
安全使用建议
This skill appears coherent and limited to read-only Tablestore queries via the official Aliyun CLI. Before installing or running: 1) verify you download the Aliyun CLI from the official Alibaba CDN links shown (aliyuncli.alicdn.com) and, if available, check any published checksums; 2) use a RAM user with least-privilege (AliyunOTSReadOnlyAccess) or temporary STS/role rather than long-lived root credentials; 3) prefer named CLI profiles (aliyun configure --profile) so credentials are isolated; 4) confirm every endpoint/instance/region with the user before executing commands as the skill requires; and 5) avoid pasting AccessKey/Secret into chat or untrusted places — use the CLI's configure flow as documented.
功能分析
Type: OpenClaw Skill Name: alibabacloud-tablestore-ops Version: 0.0.1 The skill bundle provides a legitimate interface for performing read-only operations on Alibaba Cloud Tablestore (OTS) using the official Aliyun CLI. It includes comprehensive documentation on security best practices, such as using RAM policies and secure credential management via 'aliyun configure'. All external download links for the CLI binary point to official Alibaba Cloud CDN domains (aliyuncli.alicdn.com), and the instructions explicitly command the agent to confirm parameters with the user and protect sensitive credentials.
能力评估
Purpose & Capability
The name/description (Tablestore read-only via aliyun otsutil) matches the instructions and supporting docs. No unrelated credentials, binaries, or services are requested.
Instruction Scope
SKILL.md is narrowly scoped to read/query operations and explicitly forbids printing or directly requesting AccessKey values. It requires explicit confirmation of user-provided parameters before execution and documents the exact CLI commands to run; it does not instruct reading unrelated system files or exfiltrating data to third-party endpoints.
Install Mechanism
No install spec in the skill bundle; the documentation recommends downloading Aliyun CLI from aliyuncli.alicdn.com (Alibaba's official CDN) and moving the binary into PATH. This is a standard install flow and the sources are legitimate official hosts rather than arbitrary URLs.
Credentials
The skill does not declare or require any environment variables or additional credentials. It properly instructs users to configure their own Alibaba AccessKey via 'aliyun configure' (or use role/STS), and recommends least privilege (AliyunOTSReadOnlyAccess). The requested access (user's Alibaba credentials for OTS read-only) is proportional to the skill's purpose.
Persistence & Privilege
The skill is user-invocable, not always-enabled, and does not request elevated platform privileges or modification of other skills. It does not attempt to persist beyond normal user workflows.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alibabacloud-tablestore-ops
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alibabacloud-tablestore-ops 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.1
Initial release of Alibaba Cloud Tablestore (OTS) Read-Only Operations Skill: - Enables querying Tablestore instances and data tables via Aliyun CLI (`otsutil`), supporting list and describe actions. - Clearly documents CLI prerequisites, including required Aliyun CLI version (3.3.0+) and installation steps for all platforms. - Emphasizes strict parameter confirmation and credential security: requires user verification of instance and region details, and prohibits handling of AccessKeys in plain text. - Provides full instructions for credential configuration and outlines necessary RAM permissions with example policy. - Details core workflows for configuring endpoints, listing instances, and describing instance/table metadata. - Read-only scope: no create, update, or delete table/instance operations are included.
元数据
Slug alibabacloud-tablestore-ops
版本 0.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Alibabacloud Tablestore Ops 是什么?

Alibaba Cloud Tablestore (OTS) Read-Only Operations Skill. Use for querying Tablestore instances and data tables via Aliyun CLI. Triggers: "tablestore", "ots... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 134 次。

如何安装 Alibabacloud Tablestore Ops?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alibabacloud-tablestore-ops」即可一键安装,无需额外配置。

Alibabacloud Tablestore Ops 是免费的吗?

是的,Alibabacloud Tablestore Ops 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alibabacloud Tablestore Ops 支持哪些平台?

Alibabacloud Tablestore Ops 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alibabacloud Tablestore Ops?

由 alibabacloud-skills-team(@sdk-team)开发并维护,当前版本 v0.0.1。

💬 留言讨论