# alibabacloud-sls-query

Helps write, optimize, and run index searches, SQL analytics, and SPL pipelines in Alibaba Cloud Simple Log Service through the aliyun CLI.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2000 installs · ★ 275
- Author: aliyun
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aliyun/alibabacloud-aiops-skills/tree/HEAD/skills/storage/sls/alibabacloud-sls-query/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/alibabacloud-sls-query

## What it does

The skill translates plain language requests into Alibaba Cloud Simple Log Service queries. It constructs index filters, SQL aggregations, or SPL pipelines, then runs them against your Logstore via the `aliyun` CLI. Before building a statement, the agent inspects logstore indexing through the `get-index` call.

This schema inspection prevents invalid queries. When a field lacks indexing or has disabled statistics, the tool avoids aggregations that would fail on the server. You need an updated Aliyun CLI with an active profile and RAM permissions for log reading.

If the Logstore has no index configured, every query call fails immediately, so index setup must happen before running this skill.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-sls-query -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/alibabacloud-sls-query/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/alibabacloud-sls-query/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-sls-query -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/alibabacloud-sls-query/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-sls-query -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/alibabacloud-sls-query/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install aliyun/alibabacloud-aiops-skills alibabacloud-sls-query
```

2. **Manually: put the files in place**
- File: `.github/skills/alibabacloud-sls-query/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-sls-query -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/aliyun/alibabacloud-aiops-skills --path skills/storage/sls/alibabacloud-sls-query
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/alibabacloud-sls-query/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-sls-query -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/aliyun/alibabacloud-aiops-skills/tree/HEAD/skills/storage/sls/alibabacloud-sls-query/SKILL.md

## When to use it
- write index search filters for raw logs
- aggregate error metrics using SQL
- verify Logstore index configuration
- execute log queries via aliyun CLI

## Example prompts
- Find payment failure logs from the last hour in my Logstore
- Group log records by HTTP status and count total events
- Check the index settings for my project and logstore

## Similar
- [logfire-query](https://affpapa.org/en/nevibecode/skills/logfire-query.md) — skill · 1900 installs
- [planetscale-query-insights-and-tags](https://affpapa.org/en/nevibecode/skills/planetscale-query-insights-and-tags.md) — skill · 1800 installs
- [query](https://affpapa.org/en/nevibecode/skills/query.md) — skill · 1400 installs
- [database-query-optimization](https://affpapa.org/en/nevibecode/skills/database-query-optimization.md) — skill · 586 installs
- [sql-query-optimization](https://affpapa.org/en/nevibecode/skills/sql-query-optimization.md) — skill · 520 installs
- [SQL Query Builder & Optimiser](https://affpapa.org/en/nevibecode/prompts/sql-query-builder-optimiser.md) — prompt · ★ 174597

From the same set: [aliyun/alibabacloud-aiops-skills](https://affpapa.org/en/nevibecode/by/aliyun/alibabacloud-aiops-skills.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
