tencent-cls

Query and analyze Tencent Cloud CLS logs using CQL and SQL aggregations.

7|2|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/wenerme/ai --skill tencent-cls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tencent-cls
Source: https://github.com/wenerme/ai/tree/main/skills/tencent-cls
Command: npx skills add https://github.com/wenerme/ai --skill tencent-cls

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you search, troubleshoot, and analyze Tencent Cloud CLS (Cloud Log Service) logs without guessing which queries, tools, or aggregations will reveal the root cause.

Core Features & Use Cases

  • CQL Log Search & Query Tuning: Build correct CLS Query Language expressions (proper quoting, boolean logic, time ranges, and field existence checks) to reliably find relevant log events.
  • MCP Tool Workflows for CLS: Use CLS MCP tools to search logs, cluster similar patterns, fetch log context, and generate histogram distributions for quick investigation.
  • SQL Aggregation Analysis: Perform PV/UV, protocol or dimension breakdowns, and failure-rate computations using CLS SQL aggregation, with required constraints like enabling “统计分析” and using correct timestamp casting.

Quick Start

Use the tencent-cls skill to search for error logs in a specific CLS topic and generate a time-bucketed histogram of results over the last 24 hours.

Frequently Asked Questions about tencent-cls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze Tencent CLS logs to find error patterns?

To analyze Tencent CLS logs for error patterns, you can build CQL search expressions with proper boolean logic and quoted string values to isolate relevant log events. CLS MCP tools then help cluster similar message patterns for quick investigation.

How do I query Tencent CLS logs using CQL syntax?

Querying Tencent CLS logs with CQL requires topic-scoped syntax with quoted string values, field existence checks, and specified time ranges. You apply correct CLS Query Language expressions to reliably retrieve relevant log events without guessing.

Why does SQL aggregation fail on my Tencent CLS topic?

SQL aggregation on a Tencent CLS topic fails if statistical analysis is not enabled. You must enable “统计分析” on the topic and use correct timestamp casting via cast(__TIMESTAMP__ as timestamp) to perform PV/UV or failure-rate computations.

Can I generate a histogram of log events over a time interval in Tencent CLS?

Yes, you can generate histogram distributions and PV/UV style metrics per time interval in Tencent CLS. This uses CLS MCP tools and SQL aggregations to produce time-bucketed results for quick log investigation.

What is the best way to retrieve surrounding log context for troubleshooting?

The best way to retrieve surrounding log context for troubleshooting is using CLS MCP tools. These tools fetch log context around a specific event, cluster similar patterns, and generate histograms to reveal root causes.

Do I need to enable statistical analysis to use SQL aggregation on Tencent CLS logs?

Yes, you need to enable statistical analysis to use SQL aggregation on Tencent CLS logs. This includes performing protocol or dimension breakdowns and requires correct timestamp casting via cast(__TIMESTAMP__ as timestamp) for time-based queries.