Agent skill

Aliyun Sls Log Query

by cinience in cinience/alicloud-skills

A skill your agent uses when querying or troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK.

MITAuto-check passedDevelopment

Install Aliyun Sls Log Query

skills CLI
$ npx skills add cinience/alicloud-skills --skill aliyun-sls-log-query -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cinience/alicloud-skills aliyun-sls-log-query --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cinience/alicloud-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/observability/sls/aliyun-sls-log-query .claude/skills/aliyun-sls-log-query && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
aliyun-sls-log-query
GitHub stars
397
Token cost
~859 tokens
SKILL.md length
198 words
Files
8 (incl. scripts, references)
Skills in repo
96
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when querying or troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK.

  • Works in 4 steps: Ensure Logstore indexing is enabled… → Write query clause and append analysis… → Execute with SDK/script and inspect… → …
  • Troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK
  • SKILL.md covers Prerequisites, Query Composition, Quickstart (Python SDK) and Script quickstart, plus 5 more sections
  • Runs Python scripts from its folder; calls python and python3; needs ALIBABACLOUD_ACCESS_KEY_ID and ALIBABACLOUD_ACCESS_KEY_SECRET

What it does

Aliyun Sls Log Query is an agent skill from cinience/alicloud-skills. Use when querying or troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK. Use for time-bounded log search, error investigation, and root-cause analysis workflows.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/python-sdk.md` and `references/query-syntax.md`).

It sits in Development, covering Root cause analysis. It works with Alibaba Cloud and Python. The repository describes itself as: alibaba cloud skills,qwen ,wan and all skills. The licence is MIT.

When your agent uses it

  • Troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK
  • Time-bounded log search
  • Error investigation
  • Root-cause analysis workflows

Example prompts

  • “/aliyun-sls-log-query”

Requirements

  • Python 3
  • A credential in ALIBABACLOUD_ACCESS_KEY_SECRET

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Ensure Logstore indexing is enabled (queries/analysis fail without index).
  2. Write query clause and append analysis clause when needed.
  3. Execute with SDK/script and inspect results.
  4. Control returned rows with limit; narrow time range when needed.

What it can do on your machine

Read from SKILL.md and the folder at commit 1818263. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ALIBABACLOUD_ACCESS_KEY_ID
    • ALIBABACLOUD_ACCESS_KEY_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Aliyun Sls Log Query loads about 859 tokens when it runs, and up to ~1.3k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 198 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~859
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cinience/alicloud-skills at commit 1818263, republished under its MIT licence (© cinience). 198 words, ~859 tokens.

Download SKILL.mdSave it as .claude/skills/aliyun-sls-log-query/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
aliyun-sls-log-query
description
Use when querying or troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK. Use for time-bounded log search, error investigation, and root-cause analysis workflows.
version
1.0.0

Category: service

SLS Log Query and Troubleshooting

Use SLS query|analysis syntax and Python SDK for log search, filtering, and analytics.

Prerequisites

  • Install SDK (virtual environment recommended to avoid PEP 668 restrictions):
bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -U aliyun-log-python-sdk
  • Configure environment variables:
    • ALIBABACLOUD_ACCESS_KEY_ID
    • ALIBABACLOUD_ACCESS_KEY_SECRET
    • SLS_ENDPOINT (e.g. cn-hangzhou.log.aliyuncs.com)
    • SLS_PROJECT
    • SLS_LOGSTORE(supports a single value or comma-separated values)

Query Composition

  • Query clause: filters logs (e.g. status:500).
  • Analysis clause: statistical aggregation, format query|analysis.
  • Example: * | SELECT status, count(*) AS pv GROUP BY status

See references/query-syntax.md for full syntax.

Quickstart (Python SDK)

python
import os
import time
from aliyun.log import LogClient, GetLogsRequest

client = LogClient(
    os.environ["SLS_ENDPOINT"],
    os.environ["ALIBABACLOUD_ACCESS_KEY_ID"],
    os.environ["ALIBABACLOUD_ACCESS_KEY_SECRET"],
)

project = os.environ["SLS_PROJECT"]
logstore = os.environ["SLS_LOGSTORE"]

query = "status:500"
start_time = int(time.time()) - 15 * 60
end_time = int(time.time())

request = GetLogsRequest(project, logstore, start_time, end_time, query=query)
response = client.get_logs(request)
for log in response.get_logs():
    print(log.contents)

Script quickstart

bash
python skills/observability/sls/aliyun-sls-log-query/scripts/query_logs.py \
  --query "status:500" \
  --last-minutes 15

Optional args: --project, --logstore(repeatable, or comma-separated values), --endpoint, --start, --end, --last-minutes, --limit, --parallel.

Troubleshooting script

bash
python skills/observability/sls/aliyun-sls-log-query/scripts/troubleshoot.py \
  --group-field status \
  --last-minutes 30 \
  --limit 20

Optional args: --error-query, --group-field, --limit, --logstore(repeatable, or comma-separated values), --parallel, plus the time range args above.

Workflow

  1. Ensure Logstore indexing is enabled (queries/analysis fail without index).
  2. Write query clause and append analysis clause when needed.
  3. Execute with SDK/script and inspect results.
  4. Control returned rows with limit; narrow time range when needed.

Validation

bash
mkdir -p output/aliyun-sls-log-query
for f in skills/observability/sls/aliyun-sls-log-query/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-sls-log-query/validate.txt

Pass criteria: command exits 0 and output/aliyun-sls-log-query/validate.txt is generated.

Output And Evidence

  • Save artifacts, command outputs, and API response summaries under output/aliyun-sls-log-query/.
  • Include key parameters (region/resource id/time range) in evidence files for reproducibility.

References

  • Syntax and examples:references/query-syntax.md

  • Python SDK initialization and queries:references/python-sdk.md

  • Troubleshooting templates:references/templates.md

  • Source list: references/sources.md

© cinience, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in skills/observability/sls/aliyun-sls-log-query of cinience/alicloud-skills.

  • SKILL.md
  • agents/openai.yaml
  • references/python-sdk.md
  • references/query-syntax.md
  • references/sources.md
  • references/templates.md
  • scripts/query_logs.py
  • scripts/troubleshoot.py

Open the folder on GitHubat commit 1818263

Compare with similar skills

Aliyun Sls Log Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Aliyun Sls Log Query compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Aliyun Sls Log Query this skillcinience/alicloud-skills397—~859Automated safety check: PassMIT
The Art of Debuggingstas00/the-art-of-debugging1.7k—~6.1kAutomated safety check: NotesCC-BY-SA-4.0
Problem Solving ProHoangTheQuyen/think-better122—~4.5kAutomated safety check: PassMIT
PR Gate Checkoracle/graalpython1.7k—~637Automated safety check: PassCustom licence
CodeScope Codebase Graph AnalysisQwenLM/qwen-code28k1 repos~9.3kAutomated safety check: PassApache-2.0
Bug DetectiveGalaxy-Dawn/claude-scholar5.7k1 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • The Art of Debugging

    stas00/the-art-of-debugging

    Condensed debugging method and tool recipes for Unix, Python and PyTorch programs: crashes, hangs, segfaults, wrong output, CUDA OOM, NaN values and slowness.

    1.7k GitHub stars~6.1k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes
  • Problem Solving Pro

    HoangTheQuyen/think-better

    Systematic problem-solving toolkit for business, product, process and personal problems: root cause analysis, hypothesis testing, critical thinking frameworks.

    122 GitHub stars~4.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • PR Gate Check

    oracle/graalpython

    Official

    Check gate status for a Bitbucket PR by resolving the PR head commit, finding the gate merge commit, inspecting builds on that merge commit, and summarizing root-cause failures with actionable next…

    1.7k GitHub stars~637 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Answers questions about code structure, history, bugs and PR risk using a CodeScope knowledge graph and semantic index built from the repository.

    28k GitHub starsUsed in 1 repo~9.3k tokens
    DevelopmentAuto-check passed
  • Bug Detective

    Galaxy-Dawn/claude-scholar

    Applies a systematic debugging workflow to errors, exceptions and failures, with error-type tables, localization techniques and reference notes for Python, JavaScript and shell.

    5.7k GitHub starsUsed in 1 repo~2.1k tokens
    DevelopmentAuto-check passed
  • Codegraph QA

    QwenLM/qwen-code-examples

    Use CodeScope to analyze any indexed codebase via its graph database (neug) and vector index (zvec).

    143 GitHub stars~4.3k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed

More from cinience/alicloud-skills

All 96 skills in this repo
  • Aliyun Skill Creator

    cinience/alicloud-skills

    A skill your agent uses when creating, migrating, or optimizing skills for this alicloud-skills repository.

    397 GitHub stars~2.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Alicloud Acs Agent Sandbox

    cinience/alicloud-skills

    Bootstrap, create, connect to, operate, secure, scale, upgrade, troubleshoot, inspect, and tear down Alibaba Cloud Container Compute Service (ACS) Agent Sandbox environments.

    397 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Alicloud Acs Cluster

    cinience/alicloud-skills

    Create, inspect, connect to, inventory, and delete Alibaba Cloud Container Compute Service (ACS) clusters through the official CS OpenAPI.

    397 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Aliyun Adb Mysql

    cinience/alicloud-skills

    A skill your agent uses when managing Alibaba Cloud AnalyticDB for MySQL (ADB) via OpenAPI/SDK, including the user needs AnalyticDB resource lifecycle and configuration operations, status checks, or…

    397 GitHub stars~708 tokensUpdated 2 mo ago
    Auto-check passed
  • Aliyun Aicontent Generate

    cinience/alicloud-skills

    A skill your agent uses when managing Alibaba Cloud AIContent (AiContent) via OpenAPI/SDK, including the user needs AI content generation or content workflow operations in Alibaba Cloud, including…

    397 GitHub stars~734 tokensUpdated 2 mo ago
    Auto-check passed
  • Aliyun Aimiaobi Generate

    cinience/alicloud-skills

    A skill your agent uses when managing Alibaba Cloud Quan Miao (AiMiaoBi) via OpenAPI/SDK, including the user asks for Alibaba Cloud MiaoBi content operations, including listing resources…

    397 GitHub stars~724 tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Aliyun Sls Log Query

What does Aliyun Sls Log Query do?

A skill your agent uses when querying or troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK. Aliyun Sls Log Query is an agent skill from cinience/alicloud-skills. Use when querying or troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK.

When should I use Aliyun Sls Log Query?

Aliyun Sls Log Query fits situations like: troubleshooting logs in Alibaba Cloud Log Service (SLS) using query|analysis syntax and the Python SDK; time-bounded log search; error investigation; root-cause analysis workflows.

How do I install Aliyun Sls Log Query in Claude Code?

Run `npx skills add cinience/alicloud-skills --skill aliyun-sls-log-query -a claude-code`. Or copy the skill folder (skills/observability/sls/aliyun-sls-log-query in cinience/alicloud-skills) into .claude/skills/aliyun-sls-log-query in your project. Claude Code loads it when a task matches its description.

How do I install Aliyun Sls Log Query in Codex?

Run `npx skills add cinience/alicloud-skills --skill aliyun-sls-log-query -a codex`. Or copy the skill folder (skills/observability/sls/aliyun-sls-log-query in cinience/alicloud-skills) into .agents/skills/aliyun-sls-log-query in your project. Codex loads it when a task matches its description.

Can I use Aliyun Sls Log Query in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cinience/alicloud-skills --skill aliyun-sls-log-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aliyun-sls-log-query, .gemini/skills/aliyun-sls-log-query, .github/skills/aliyun-sls-log-query and .opencode/skills/aliyun-sls-log-query in your project.

What does Aliyun Sls Log Query need to run?

Going by SKILL.md and its folder, Aliyun Sls Log Query needs Python for the scripts in its folder, the command-line tools its instructions call (python and python3) and credentials named ALIBABACLOUD_ACCESS_KEY_ID and ALIBABACLOUD_ACCESS_KEY_SECRET. Our summary lists: Python 3; A credential in ALIBABACLOUD_ACCESS_KEY_SECRET.

Does Aliyun Sls Log Query access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Aliyun Sls Log Query safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Aliyun Sls Log Query use?

Aliyun Sls Log Query is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Aliyun Sls Log Query use?

About 859 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 424 tokens, read only when the agent opens those files.

What are the alternatives to Aliyun Sls Log Query?

Skills that share tags, products or a category with Aliyun Sls Log Query: The Art of Debugging (stas00/the-art-of-debugging, 1.7k stars), Problem Solving Pro (HoangTheQuyen/think-better, 122 stars), PR Gate Check (oracle/graalpython, 1.7k stars) and CodeScope Codebase Graph Analysis (QwenLM/qwen-code, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Aliyun Sls Log Query?

cinience (a GitHub user) maintains it in cinience/alicloud-skills, which has 397 GitHub stars. The repository holds 96 skills in this directory. The repository was last updated on August 11, 2026.

Source: cinience/alicloud-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.