Borrowing it
Nothing to install: this file belongs to KonghaYao/peri. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/KonghaYao/peri/main/.claude/skills/llm-log-analyzer/SKILL.mdgit clone --depth 1 https://github.com/KonghaYao/periWrote 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/konghayao/peri/llm-log-analyzer)<a href="https://agentmods.dev/skills/konghayao/peri/llm-log-analyzer"><img src="https://agentmods.dev/badge/skills/konghayao/peri/llm-log-analyzer.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00117 | $0.03356 |
| Opus 5 | $0.00059 | $0.01678 |
| Sonnet 5 | $0.00023 | $0.00671 |
| Haiku 4.5 | $0.00012 | $0.00336 |
Grade A, and why
llm-log-analyzer 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 8d ago.
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 — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LLM Log Analyzer
分析 ./data/ 下的 LLM 请求/响应日志。
日志结构
每个请求对应一个目录,命名格式 YYYY-MM-DD_HH-MM-SS-mmm_NNNN:
新格式(当前)
data/
└── 2026-05-20_03-56-28-921_0014/
├── request.json # { headers: {...}, body: {...} }
└── stream.log # SSE 流式响应原文(含 usage 数据)
旧格式(兼容)
data/
└── 2026-05-14_10-30-15-123_0003/
├── request.json # { headers?: {...}, body?: {...} } 或裸 body
├── response.json # JSON 响应(非流式)
├── stream.log # SSE 流式响应原文
└── log.txt # 终端格式的人类可读日志
request.json 格式:{ "headers": {...}, "body": {...} }。body 包含以下字段:
model:模型名称(如deepseek-v4-pro)system:system prompt 数组(Anthropic 格式),每项含text+ 可选cache_controlmessages:消息数组tools:工具定义数组(Anthropic 格式用name,OpenAI 格式用function.name)thinking:推理配置(如{"type": "enabled", "budget_tokens": 8000})output_config:输出配置(如{"effort": "high"})stream:是否流式(true)max_tokens:最大输出 token
headers 中的 x-session-id 可按 session 追踪同一 agent 的多次请求。host 头用于推断 API 路由(如 api.deepseek.com → deepseek)。
stream.log 格式:SSE 事件流,包含:
message_start:初始 usage(input_tokens、cache_read_input_tokens、cache_creation_input_tokens、output_tokens=0)content_block_start/delta/stop:thinking、text、tool_use 内容块message_delta:最终 usage(含实际output_tokens)+stop_reasonmessage_stop:流结束标记
工具自动从 stream.log 的 message_delta 事件提取 token usage 数据,无需 response.json。
分析工具
scripts/llm-log-query.mjs 提供以下子命令,用 bun run scripts/llm-log-query.mjs <command> 运行:
list — 列出请求摘要
bun run scripts/llm-log-query.mjs list [--dir ./data] [--limit 20] [--model NAME] [--session ID] [--route openai|anthropic|deepseek] [--after YYYY-MM-DD] [--before YYYY-MM-DD] [--errors]
输出表格:序号 | 请求ID | 时间 | 路由 | 模型 | Session | 消息数 | 状态 | 延迟
show — 查看单个请求详情
bun run scripts/llm-log-query.mjs show <request-id> [--dir ./data] [--body] [--messages] [--tools] [--stream]
- 默认显示摘要(headers、模型、状态、延迟、token 用量、thinking 配置、output_config)
--body显示完整请求体--messages显示 system blocks + 消息列表(role + 内容前 100 字),system blocks 标注[cached]--tools显示工具定义列表,标注[cached]的 cache_control 状态--stream解析 stream.log 中的 SSE 事件- 无
response.json时,自动从stream.log提取响应(stop_reason、thinking、content、tool_calls)
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.
- 8d ago First seen · 218 lines · 117 tokens per session scan A 27cbb4f27036
llm-log-analyzer is a skill published in the GitHub repository KonghaYao/peri (163 stars, last pushed today), licensed Apache-2.0. It adds 117 tokens to every session and 3,356 once invoked, about $0.0006 per session on Opus 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-08-30.
Other skills, from other repositories
qa-testing
Verify your work by actually operating the app or website you changed, instead of assuming it works. Strongly recommended whenever you build, modify, or debug a web app, website, or desktop GUI app. Drive real browsers with the agent-browser CLI and native desktop apps with the cua-driver CLI. These are installed on…
pi-loop-forensics
Diagnose pi-go agent loops and degenerate turns — "agent loop aborted", runaway thinking with no tool calls, repeated phrases. Discriminates genuine model repetition collapse from a race, a tool-parse failure, or a too-low guard, and A/B replays a seed session across providers.
nightly-session-watch
Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still recording. Triages each finding to the specialist skill that diagnoses it. Use for an unattended daily health check, or on…
memory-status
Show MemPalace memory system status — drawer counts, wings, rooms, knowledge graph stats, and embedding model state.
code-review-pi
Review code for quality, run linters, check test coverage, fix issues, and enforce gates. Save the final report to ./specs/issues/003-code-review-pi/PROMPT.md. Use before committing changes.
plugin-creator
Create and scaffold plugin directories for Codex with a required .codex-plugin/plugin.json, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries…