agentloop-audit-query

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

A command for querying LoongSuite Pilot audit logs, which record activity from AI agents. It accepts a search expression or SQL query and runs the appropriate audit workflow for the current operating system.

In plain words
What is it for?
Use it to inspect LoongSuite Pilot usage, filter audit events, compare people or agents, or investigate a particular session from the command line.
Why use it?
It provides a direct way to retrieve audit data without manually calling the cloud logging service. The related workflow selects the log store and handles filters and detailed follow-up queries.

Command for Claude Code ✓ vendor

Written for Claude Code: a Claude Code command (commands/*.md).

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 inspect LoongSuite Pilot usage, filter audit events, compare people or agents, or investigate a particular session from the command line.

Compare 6 commands 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 commands/alibaba/loongsuite-pilot/agentloop-audit-query

Made for: Claude Code.

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/commands/alibaba/loongsuite-pilot/agentloop-audit-query/github.svg)](https://agentmods.dev/commands/alibaba/loongsuite-pilot/agentloop-audit-query)
Your own site
<a href="https://agentmods.dev/commands/alibaba/loongsuite-pilot/agentloop-audit-query"><img src="https://agentmods.dev/badge/commands/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/commands/alibaba/loongsuite-pilot/agentloop-audit-query"><img src="https://agentmods.dev/badge/commands/alibaba/loongsuite-pilot/agentloop-audit-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 267 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.00005 $0.00267
Opus 5.5 $0.00002 $0.00107
Sonnet 5.5 $0.00001 $0.00053
Haiku 4.5 $0.00001 $0.00027

Measured today against content hash b5af38f341fd, 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/commands/agentloop-audit-query.md · 32 lines

What it actually says

查询审计日志

用户要看 loongsuite-pilot 的审计日志时使用。

按 agentloop-audit-query 技能执行。在插件根目录执行。先按 capabilities.md 选定 logstore。

用户要筛选、对比范围,或从汇总再看某一个人、某一种 Agent、某一个会话时,先读技能里的 plugin-usage.md,再按它指向的筛选与下钻文档写查询。不要生成仪表盘 JSON。

环境

先检测当前环境,只执行对应的一条命令。

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>"
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 · 32 lines · 5 tokens per session scan A b5af38f341fd

Subscribe to this mod's changes

agentloop-audit-query is a command published in the GitHub repository alibaba/loongsuite-pilot (239 stars, last pushed yesterday), licensed Apache-2.0. It adds 5 tokens to every session and 267 once invoked, about $0.0000 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 commands from other repositories

agentloop-audit-query next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentloop-audit-queryalibaba/loongsuite-pilotCommand239yesterdayApache-2.0A5Claude Code
atomic-helpdamusix/atomic-claudeCommand1154d agoMITA57Claude Code
atomic-plandamusix/atomic-claudeCommand1154d agoMITA54Claude Code
follow-updamusix/atomic-claudeCommand1154d agoMITA0Claude Code
documentationdamusix/atomic-claudeCommand1154d agoMITA0Claude Code
watch-cidamusix/atomic-claudeCommand1154d agoMITA69Claude Code
review-branchdamusix/atomic-claudeCommand1154d agoMITA35Claude Code