Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ntygod/ZhiWei --skill log-analyzergit clone --depth 1 https://github.com/ntygod/ZhiWeiWrote 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/ntygod/zhiwei/log-analyzer)<a href="https://agentmods.dev/skills/ntygod/zhiwei/log-analyzer"><img src="https://agentmods.dev/badge/skills/ntygod/zhiwei/log-analyzer.svg" alt="Measured on agentmods" 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.00039 | $0.00662 |
| Opus 5 | $0.00019 | $0.00331 |
| Sonnet 5 | $0.00008 | $0.00132 |
| Haiku 4.5 | $0.00004 | $0.00066 |
Grade A, and why
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 7d 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.
What it actually says
日志分析指南
shell_exec 用 grep / Select-String 扫日志,file_read 按行读关键段。领域强化:报告引用的日志原文必须实际读到,并且对敏感信息(IP / 用户名 / Token / 邮箱 / 手机号)脱敏后输出。
适用场景
- 排查报错("刚才报错了 / 看下错误日志")
- 追踪异常 + 堆栈("X 这个异常哪来的 / 看完整堆栈")
- 错误频率统计("这周 ERROR 多少次 / 最高频是哪个")
- 提取关键事件(启动 / 关闭 / 崩溃 / 慢查询)
- 时间窗口过滤("昨天下午 3 点的日志")
- 多日志关联(一次请求跨多文件)
不适用场景
- 系统级资源诊断 → healthcheck
- 代码级 bug 调试 → code-assistant
- 实时监控告警 → cron-scheduler + shell_exec
工作流
- 定位日志:
file_read列 log 目录;常见路径见参考(/var/log/ 知微 dataDir 下 logs 等) - 快速扫描:按平台用对应工具的 ERROR/Exception 模式匹配抓异常行(具体命令模板见参考)
- 统计分布:按错误类型排序,前 20 看高频
- 大文件分段读:日志通常很大,
file_read带startLine/endLine按行号读,不一次性file_read整个文件 - 时间窗口:日志带时间戳的,先按时间前缀模式缩小范围(
<日期> <时间起>:匹配前缀) - 堆栈追踪:异常行后续
-A 20拿完整堆栈 - 脱敏处理:按参考里的正则替换 IP / Token / 邮箱 / 手机号 / 用户 ID 后再写入报告
- 分级报告:需立即处理(崩溃 / OOM)/ 需关注(高频 ERROR)/ 可忽略(常规 WARN)
详细参考
- 日志路径清单 + Windows/Linux 命令模板 + 时间窗口语法 + 报告结构:
{skill_dir}/references/log-commands.md
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.
- 7d ago First seen · 51 lines · 39 tokens per session scan A 5c6b9146de82
log-analyzer is a skill published in the GitHub repository ntygod/ZhiWei (137 stars, last pushed 26d ago), licensed MIT. It adds 39 tokens to every session and 662 once invoked, about $0.0002 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
inbox-triage
Summarize unread Gmail messages Alfred Core has already synced, and offer to draft or schedule follow-up actions -- never sends or deletes anything on its own.
morning-brief
Render Alfred Core's deterministic morning brief and deliver a short, warm rewrite of it without changing any fact, date, or link it contains.
weekly-review
Pull together the week's open tasks, GitHub notifications, Canvas missing assignments, and remembered context into one retrospective-style summary.
build-test
Run the project's build / typecheck / lint / test commands and emit the build.passing + tests.passing signals devloop convergence reads.
patch-edit
Apply one rewrite-plan step at a time as small reviewable file edits, never rewriting whole files when a localised change suffices.
cvm-ai-doctor
A health-diagnosis workflow for servers, computers, virtual machines, and containers on Linux, macOS, or Windows.