TopRank Skills

Official OpenClaw rules 36%

clscli

Query and analyze Tencent Cloud CLS logs

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 clscli 技能。 若已安装,则直接安装 clscli 技能。

Overview

Skill Key
dbwang0130/clscli
Author
dbwang0130
Source Repo
openclaw/skills
Version
-
Source Path
skills/dbwang0130/clscli
Latest Commit SHA
9270f8079e2ba294733d57d40955110cb3c79be7

Extracted Content

SKILL.md excerpt

# CLS Skill

Query and analyze Tencent Cloud CLS logs.

## Setup
1. Install clscli (Homebrew):
    ```bash
    brew tap dbwang0130/clscli
    brew install dbwang0130/clscli/clscli
    ```
2. Get credentials and region list: https://cloud.tencent.com/document/api/614/56474
3. Set environment variables (same as Tencent Cloud API common parameters):
    ```bash
    export TENCENTCLOUD_SECRET_ID="your-secret-id"
    export TENCENTCLOUD_SECRET_KEY="your-secret-key"
    ```
4. Specify region via `--region` (e.g. ap-guangzhou).

## Usage

!IMPORTANT: If you do not know the log topic, list topics first.

### List log topics
List topics in a region to determine which `--region` and topic ID to use for query/context.

```bash
clscli topics --region <region> [--topic-name name] [--logset-name name] [--logset-id id] [--limit 20] [--offset 0]
```
Examples: `--output=json`, `--output=csv`, `-o topics.csv`

| Option | Required | Description |
|--------|----------|-------------|
| --region | yes | CLS region, e.g. ap-guangzhou |
| --topic-name | no | Filter by topic name (fuzzy match) |
| --logset-name | no | Filter by logset name (fuzzy match) |
| --logset-id | no | Filter by logset ID |
| --limit | no | Page size, default 20, max 100 |
| --offset | no | Pagination offset, default 0 |
| --output, -o | no | Output: json, csv, or file path |

Output columns: Region, TopicId, TopicName, LogsetId, CreateTime, StorageType.

### Get log by query
```bash
clscli query -q "[query condition] | [SQL statement]" --region <region> -t <TopicId> --last 1h
```
Examples:
- Time: `--last 1h`, `--last 30m`; or `--from`/`--to` (Unix ms)
- Multiple topics: `--topics <id1>,<id2>` or multiple `-t <id>`
- Auto pagination and cap: `--max 5000` (paginate until 5000 logs or ListOver)
- Output: `--output=json`, `--output=csv`, `-o result.json` (write to file)

| Option | Required | Description |
|--------|----------|-------------|
| --region | yes | CLS region, e.g. ap-guangzhou |
| -q, --query | yes | Query...

Related Claw Skills