LoongSuite Pilot is a local telemetry collector that gathers activity from AI coding agents, converts their different records into a shared event format, and exports the data to selected destinations. Development teams use it to inspect agent usage, token consumption, sessions, tools, traces, and security-sensitive data. Its catalogue add-ons support working with and configuring the collector for coding-agent telemetry.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/alibaba/loongsuite-pilotnpx agentmods add skills/alibaba/loongsuite-pilot/agentloop-audit-queryWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alibaba/loongsuite-pilot/agentloop-audit-query)<a href="https://agentmods.dev/skills/alibaba/loongsuite-pilot/agentloop-audit-query"><img src="https://agentmods.dev/badge/skills/alibaba/loongsuite-pilot/agentloop-audit-query/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alibaba/loongsuite-pilot/agentloop-audit-query"><img src="https://agentmods.dev/badge/skills/alibaba/loongsuite-pilot/agentloop-audit-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00114 | $0.02114 |
| Opus 5.5 | $0.00046 | $0.00846 |
| Sonnet 5.5 | $0.00023 | $0.00423 |
| Haiku 4.5 | $0.00011 | $0.00211 |
Grade A, and why
agentloop-audit-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
查询审计日志
判断用户要查日志之后,不要自己调用阿里云。查询语句由用户给出,或由你写成 SLS 检索 / SQL,再交给脚本。脚本只负责取数。不要打印 license key、API key 或 AccessKey。
用户只说想看什么。不要套某几句固定问法。时间、口径或范围不清楚时可以追问。用户没说时间、也不用再确认时,用最近 7 天。后一句没另给时间,就沿用上一问。用中文回答。
先判断这句话在问哪一类事,再去 references/capabilities.md 选表和口径。对不上就读能力表,不要猜一张表:
- 用量、Token、活跃、各 Agent 用了多少:应用事实
agent-event。这是已观测用量,不是账单。 - 在做什么、意图、用途:
audit-event里的意图事件。大类和子类都给,用中文。安全发现不要算进意图。 - 安全方面的发现、有没有风险迹象:仍是
audit-event,限定安全域,按事件名汇总。先说明这是发现,不是已经确认的风险。 - 接着问这些发现落在哪、主要是哪些 Agent:沿用上一问的时间和范围,按 Agent 拆开。
- 已经确认的风险、高保真、要看明细:
incident-event。给条数、Agent、严重性、类型、置信度、落点。原因和命中值可以给。reason为空时,用evidence_values里的命中值填写原因,不要只写未记录。这个值在采集时已经脱敏,不要再去日志正文里找明文。不要贴日志正文。
先读 references/capabilities.md,选定功能和 --logstore,再写查询。字段、指标口径和公共 CTE 见 agentloop-audit-dashboard/schema.md。要中文枚举时读 value-labels.md。语句写法见 query-syntax.md。
用户要筛选、看各 Agent 或人员的用量,或从汇总再看某一个对象时,再读 references/plugin-usage.md、filters-and-variables.md 和 drill-down-events.md。每次查询都带上能力表里的 --logstore。
用户要报表、HTML 预览或一整张大盘时,改用 agentloop-audit-dashboard。它决定口径并写 dashboard JSON,排版规则在 sls-dashboard-builder,预览用下面的 report 子命令。两者和本技能共用同一个阿里云 CLI 和登录,不要另接阿里云接口。
用户还没有给出检索或 SQL,也不是上面这种用量、筛选或下钻问题时,可以参考 ~/.loongsuite-pilot/audit/query-history.jsonl 来写查询语句。这份记录每行一条,含时间、查询语句和时间范围,不含日志正文。新记录在文件末尾,只保留最近 50 条。
在插件根目录执行。后面的重新执行沿用这一次的入口,只改参数。
环境
先检测当前环境,只执行对应的一条命令。
Linux 和 macOS
找不到 python3 时用 python。
python3 scripts/run.py audit --query "<检索或 SQL>"
Windows
参数名与 Linux 和 macOS 相同。
powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File scripts/run.ps1 audit --query "<检索或 SQL>"
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today First seen · 91 lines · 114 tokens per session scan A 2a03e96b5053
agentloop-audit-query is a skill published in the GitHub repository alibaba/loongsuite-pilot (239 stars, last pushed yesterday), licensed Apache-2.0. It adds 114 tokens to every session and 2,114 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-06.
agentloop-audit-query compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agentloop-audit-queryalibaba/loongsuite-pilot | Skill | 239 | yesterday | Apache-2.0 | A | 114 | Claude Code, Codex |
| autofix-prQwenLM/qwen-code | Skill | 29k | yesterday | Apache-2.0 | A | 141 | Claude Code |
| workflow-authoringQwenLM/qwen-code | Skill | 29k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| stuckQwenLM/qwen-code | Skill | 29k | yesterday | Apache-2.0 | A | 57 | Claude Code |
| batchQwenLM/qwen-code | Skill | 29k | yesterday | Apache-2.0 | A | 102 | Claude Code |
| batch-apiQwenLM/qwen-code | Skill | 29k | yesterday | Apache-2.0 | A | 51 | Claude Code |
| e2e-testingQwenLM/qwen-code | Skill | 29k | yesterday | Apache-2.0 | A | 94 | Claude Code, Codex |