agentloop-audit-query

agentloop-audit-query is a skill for Claude Code, Codex from alibaba/loongsuite-pilot. It costs 114 tokens per session (2,114 once invoked), scanned A, original, Apache-2.0.

A skill for querying LoongSuite Pilot audit logs, which are records of agent use and related events. It helps select the right log store and distinguish observed usage, intentions, security findings, and confirmed incidents.

In plain words
What is it for?
Use it to investigate usage, tokens, people, repositories, sessions, tools, skills, cache use, intentions, risks, and runtime events over a chosen time range.
Why use it?
It prevents queries from using the wrong data source or treating a possible security finding as a confirmed risk. It also keeps sensitive log contents and access keys from being exposed.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/run.py audit --query "<检索或 SQL>".

Good fit Use it to investigate usage, tokens, people, repositories, sessions, tools, skills, cache use, intentions, risks, and runtime events over a chosen time range.

Compare 6 skills from other repositories ↓
About the project

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.

alibaba/loongsuite-pilot · 239 stars · on GitHub

Install

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.

Clone the repo
git clone --depth 1 https://github.com/alibaba/loongsuite-pilot
agentmods
npx agentmods add skills/alibaba/loongsuite-pilot/agentloop-audit-query

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for agentloop-audit-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/alibaba/loongsuite-pilot/agentloop-audit-query/github.svg)](https://agentmods.dev/skills/alibaba/loongsuite-pilot/agentloop-audit-query)
Your own site
<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.

agentmods 80×15 button for agentloop-audit-query

Your own site · 80×15
<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>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured today against content hash 2a03e96b5053, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

app/qoder-plugin/agentloop/skills/agentloop-audit-query/SKILL.md · 91 lines

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>"

Read the full file on GitHub · 91 lines

Files

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.

Changes

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.

  1. today First seen · 91 lines · 114 tokens per session scan A 2a03e96b5053

Subscribe to this mod's changes

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.

Related

agentloop-audit-query compared with skills from other repositories

agentloop-audit-query next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentloop-audit-queryalibaba/loongsuite-pilotSkill239yesterdayApache-2.0A114Claude Code, Codex
autofix-prQwenLM/qwen-codeSkill29kyesterdayApache-2.0A141Claude Code
workflow-authoringQwenLM/qwen-codeSkill29kyesterdayApache-2.0A60Claude Code, Codex
stuckQwenLM/qwen-codeSkill29kyesterdayApache-2.0A57Claude Code
batchQwenLM/qwen-codeSkill29kyesterdayApache-2.0A102Claude Code
batch-apiQwenLM/qwen-codeSkill29kyesterdayApache-2.0A51Claude Code
e2e-testingQwenLM/qwen-codeSkill29kyesterdayApache-2.0A94Claude Code, Codex