cls-query-skill

Query Tencent Cloud CLS logs with TC3-HMAC-SHA256 signed SearchLog requests.

6|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/slowman2084/meta-agent --skill cls-query-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cls-query-skill
Source: https://github.com/slowman2084/meta-agent/tree/main/source/skills/cls-query-skill
Command: npx skills add https://github.com/slowman2084/meta-agent --skill cls-query-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, python-dotenv, and includes scripts (resource) components.

What problem does it solve?

Enables reliable, production-grade searches and statistical analysis over Tencent Cloud CLS logs while removing friction of topic lookup, field discovery, and multi-page retrieval so engineers can diagnose issues faster.

Core Features & Use Cases

  • Topic name → TopicId resolution: accept human-friendly topic names and resolve them to TopicId via a local mapping or fuzzy match.
  • Automatic pagination and merging: when SearchLog returns partial pages (ListOver == false) the Skill uses Context to continue fetching until completion or configured limits.
  • Robust query workflow: validates field names with small-sample probes, applies downgrade strategies (approximate functions, windowing, sampling) on timeouts, and signs API calls using TC3-HMAC-SHA256.
  • Use cases: on-call error investigation (non-2xx analysis), distinct-entity counts with APPROX_DISTINCT, hourly request volume histograms, and statistical anomaly detection.

Quick Start

Ask the skill: Find omp-trace-log error logs for the last 24 hours and return the Top 5 interfaces by error count.

Frequently Asked Questions about cls-query-skill

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

FAQPage Schema
How do I query Tencent Cloud CLS logs using a topic name instead of a TopicId?

Querying Tencent Cloud CLS logs by topic name is resolved automatically via a local mapping or fuzzy match to find the correct TopicId before executing the SearchLog API request.

How does automatic pagination work for large Tencent Cloud CLS log search results?

Automatic pagination for CLS log searches uses the returned Context token to continue fetching partial pages until retrieval completes or configured limits are reached, merging all results seamlessly.

What is the best way to analyze error logs and find top failing interfaces in CLS?

Analyzing CLS error logs for top failing interfaces involves querying non-2xx status codes and aggregating statistical results using functions like APPROX_DISTINCT to summarize error counts by endpoint.

How do I handle CLS query timeouts and invalid field names during log analysis?

CLS query timeouts trigger downgrade strategies like approximate functions or sampling, while invalid field names are detected early through small-sample probe queries before running the full search.

Can I use Python requests to call the Tencent Cloud SearchLog API directly?

You can use Python requests to call the SearchLog API, but the requests must be signed using the TC3-HMAC-SHA256 algorithm for proper authentication with Tencent Cloud CLS services.