[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78AH34WQWE3B9ZCX80ZJX57":3,"skill-same:01M78AH34WQWE3B9ZCX80ZJX57":104},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M78AH34WQWE3B9ZCX80ZJX57","log-analyzer",null,"Use when parsing agent log files to identify error patterns, rate limit hits, timeout clusters, tool failures, and component-level error counts. Produces a structured anomaly report. Cron-compatible — silent if no issues, alert digest if anomalies found.","moonlight-lupin\u002Fagent-skills","moonlight-lupin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F136997773?v=4","01M78AEDSH1N62R0RNWPWMWVQY","01M78AEDT8ZF85MTK6XYBQBTNT",123,"MIT","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: log-analyzer\ndescription: \"Use when parsing agent log files to identify error patterns, rate limit hits, timeout clusters, tool failures, and component-level error counts. Produces a structured anomaly report. Cron-compatible — silent if no issues, alert digest if anomalies found.\"\nlicense: MIT\nmetadata:\n  version: 1.1.0\n  author: moonlight-lupin\n  platforms: [linux, macos, windows]\n  tags: [logs, analysis, errors, patterns, anomalies, monitoring, debugging, cron]\n  related_skills: [scheduled-summary, skill-maintainer]\n---\n\n# Log Analyzer\n\n## Overview\n\nLog viewers filter lines. This skill finds patterns.\n\nUse it when an agent runtime, tool process, gateway, scheduler, or other service\nhas produced enough log output that individual `grep` hits no longer explain the\nsystem behavior. The analyzer parses standard log lines, normalizes repeated\nmessages, groups errors by component and tool, and produces a structured anomaly\nreport that is suitable for debugging sessions or cron digests.\n\nThe script is intentionally lightweight and portable: it uses only Python's\nstandard library and works on any text log with timestamp, level, optional\ncomponent, and message fields. It also has a best-effort fallback for\nunstructured logs.\n\n## Quick Start\n\n```bash\ncd agent-ops\u002Flog-analyzer\npython scripts\u002Fanalyze_logs.py scan --log-file agent.log --since 24h\n```\n\nFor per-tool failure rates from a Hermes profile's session DB (structured\nexit_code signals, NOT regex-over-content):\n\n```bash\npython scripts\u002Fstate_failures.py                 # last 7 days, dashboard\npython scripts\u002Fstate_failures.py --days 30 --json\npython scripts\u002Fstate_failures.py --quiet         # cron: silent when healthy\n```\n\nSee `references\u002Fstate-failure-monitor.md` for provenance (adapted concept\nfrom hermes-dojo), the spike evidence for why structured signals matter,\nand interpretation notes.\n\nTo write JSON for later Markdown rendering:\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file agent.log --since 24h --output scan.json\npython scripts\u002Fanalyze_logs.py report --scan scan.json --output report.md\n```\n\nFor cron-compatible anomaly detection:\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file agent.log --since 24h --quiet\n```\n\n`--quiet` exits 0 and prints nothing when no anomalies are found. If anomalies\nexist, it prints the JSON report so the scheduler can deliver the digest.\n\n## What It Detects\n\n1. **Error clusters** — the same normalized error message repeated 3+ times\n   within the selected time window. URLs, IP addresses, and numbers are replaced\n   with placeholders before grouping so repeated failures with changing IDs still\n   cluster.\n2. **Rate limit hits** — HTTP `429`, `rate limit`, `rate_limit`, `too many\n   requests`, and `quota exceeded` patterns. The analyzer groups them by\n   provider when it can detect a provider name.\n3. **Timeout patterns** — `timeout`, `timed out`, `deadline exceeded`, and\n   `connection timeout`. Results are grouped by detected tool name and include\n   example URLs where present.\n4. **Tool failures** — error lines grouped by tool name extracted from patterns\n   such as `tool: terminal`, `tool_call: web_search`, `tool terminal failed`, or\n   lines emitted by a `tools` component.\n5. **Session crashes** — fatal errors, unhandled exceptions, stack traces,\n   `Traceback`, `Exception`, and `segfault` markers. Multiline stack traces are\n   grouped as one crash entry with nearby context.\n6. **Component breakdown** — error and warning counts by component such as\n   `gateway`, `agent`, `tools`, `cron`, or `unknown`.\n7. **Error timeline** — error counts bucketed by hour to reveal spikes and\n   regressions after deploys or scheduled jobs.\n\nSee `references\u002Fanomaly-types.md` for detection criteria and interpretation.\n\n## Log Format Support\n\nThe parser handles standard log lines shaped like:\n\n```text\n2026-07-06 12:30:45 ERROR [gateway] Connection refused\n2026-07-06T12:30:45Z ERROR gateway: Connection refused\n12:30:45 ERROR Connection refused\n```\n\nIt recognizes `ERROR`, `WARN`, `WARNING`, `INFO`, `DEBUG`, `FATAL`, and\n`CRITICAL` levels. Components may appear in square brackets after the level or as\n`component:` after the level. Time-only lines are anchored to the current day (or\nto the supplied default date when called as a library). Unstructured lines fall\nback to best-effort line-by-line scanning, so obvious `ERROR`\u002F`WARN` strings are\nstill counted even when the timestamp cannot be parsed.\n\nSee `references\u002Flog-formats.md` for examples and guidance on adding custom\npatterns.\n\n## CLI Commands\n\n### `scan` — analyze a log file for patterns\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file LOGFILE [--since TIME] [--output report.json] [--quiet]\n```\n\nOptions:\n\n- `--log-file LOGFILE` — required path to the log file.\n- `--since TIME` — optional time window: minutes\u002Fhours\u002Fdays\u002Fweeks, e.g. `30m`,\n  `1h`, `24h`, `7d`, `2w`; default is all lines.\n- `--output report.json` — write JSON to a file instead of stdout.\n- `--quiet` — cron mode: suppress output when no anomalies are found.\n\n### `report` — render Markdown from scan JSON\n\n```bash\npython scripts\u002Fanalyze_logs.py report --scan scan.json [--output report.md]\n```\n\nThe report contains overview counts, one section per anomaly type, a component\nbreakdown table, and an hourly error timeline.\n\n### `tail` — smart tail for recent lines\n\n```bash\npython scripts\u002Fanalyze_logs.py tail --log-file LOGFILE [--lines N] [--since TIME]\n```\n\nThe smart tail prints plain text with markers suitable for chat delivery:\n\n- normal lines: no marker\n- warnings: `⚠️`\n- errors: `❌`\n- repeated recent errors: `🔥` when the same normalized error is seen 3+ times\n\n## Output Format\n\n`scan` emits JSON with these top-level fields:\n\n- `log_file`, `lines_analyzed`, `time_window`\n- `anomalies.error_clusters`, `anomalies.rate_limits`, `anomalies.timeouts`,\n  `anomalies.tool_failures`, `anomalies.crashes`\n- `component_breakdown`\n- `error_timeline`\n- `total_errors`, `total_warnings`, `has_anomalies`\n\n`report` converts that JSON into Markdown:\n\n```markdown\n# Log Analysis Report\n\n## Overview\n- Log file: agent.log\n- Lines analyzed: 1542\n- Time window: 24h\n- Total errors: 12 | warnings: 20\n- Anomalies detected: 5 types\n```\n\n## Scheduled Summary Integration\n\nFor a scheduled digest, run `scan` in quiet mode and include the output only when\nit is non-empty:\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file \u002Fvar\u002Flog\u002Fagent.log --since 24h --quiet --output \u002Ftmp\u002Flog-scan.json\nif [ -s \u002Ftmp\u002Flog-scan.json ]; then\n  python scripts\u002Fanalyze_logs.py report --scan \u002Ftmp\u002Flog-scan.json\nfi\n```\n\nA `scheduled-summary` job can append the Markdown output under a \"Log anomalies\"\nheading. Keep the analysis window aligned with the summary window (for example,\n24 hours for a daily digest) so counts do not overlap or disappear.\n\nFor a state.db failure-rate digest (weekly is a sensible cadence given the\nvolume of sessions):\n\n```bash\npython scripts\u002Fstate_failures.py --quiet --days 7\n```\n\nThis prints nothing (exit 0) when the window has zero failures, so it can be\nused as a `no_agent` cron job that only pings when something is wrong. See\n`references\u002Fstate-failure-monitor.md` for what the categories mean (timeout\nis the most actionable on real data).\n\n## Common Pitfalls\n\n1. **Log rotation breaks time windows.** If yesterday's file was rotated out, a\n   `--since 24h` scan over only the current file may miss early-window failures.\n   Point the scheduler at the active file plus rotated file, or concatenate the\n   relevant files before scanning.\n2. **Multiline stack traces need the first line.** The parser groups indented\n   stack-trace continuation lines under the preceding parsed log line. If a log\n   collector strips the first `Traceback` or `ERROR` line, the remaining stack\n   frames become unstructured context.\n3. **Expected errors can be false positives.** Retries, probing, and health\n   checks may intentionally emit warnings or connection failures. Treat clusters\n   as \"investigate\" signals, not automatic incidents.\n4. **First run on a large historical log can overwhelm output.** Start with\n   `--since 24h`, inspect the report, then widen the window if needed.\n5. **Changing message formats can split clusters.** If an application changes an\n   error string during a deploy, pre- and post-deploy failures may appear as two\n   clusters even when the root cause is the same.\n6. **Time-only logs depend on the scan date.** `12:30:45 ERROR ...` lines do not\n   contain a date. For historical files, prefer full timestamps.\n7. **Comma-millisecond Python-logging lines silently defeat `--since`.** Lines\n   shaped `2026-07-06 12:30:45,123 INFO module: ...` (Hermes agent\u002Fgateway\u002Ferrors\n   logs) are NOT matched by the built-in timestamp regexes. They fall to the\n   unstructured fallback with `timestamp=null`, so `--since` cannot filter them\n   and the **whole unrotated file is scanned**. Symptoms: error\u002Ftraceback counts\n   wildly exceed the true windowed count, every cluster reports\n   \"First: unknown \u002F Last: unknown\", the error timeline says \"No timestamped\n   errors detected\", and crashes are inflated (each stack-trace continuation\n   line counts as a separate crash). **Fix:** for Hermes profile logs use the\n   windowed counter `scripts\u002Fhermes_log_window.py` (handles the comma-ms format,\n   de-duplicates multiline tracebacks by counting `Traceback (most recent call\n   last)` first-lines only) and see `references\u002Fhermes-profile-audit.md` for\n   pulling skill-usage\u002Ftool-call counts from the profile's `state.db`.\n8. **Skill-usage counts are not in agent.log.** `tool skill_view completed\n   (0.05s, 13890 chars)` lines do not carry the skill-name argument. Query the\n   profile's `state.db` `messages` table — the `tool_calls` JSON column holds\n   the full arguments. `messages.timestamp` is a Unix epoch (REAL), not ISO.\n   See `references\u002Fhermes-profile-audit.md` for a ready-to-run snippet.\n9. **The error timeline buckets by hour-of-day, not date.** On a multi-day\n   window (`--since 7d`), errors from 08:00 on different days merge into one\n   `08:00` bar. Use the clusters (which carry full timestamps) for multi-day\n   forensics; treat the timeline as a time-of-day profile.\n10. **Crash detection is substring-based.** The crash regex matches words like\n    `fatal` or `Exception` anywhere in a line, so mentions inside INFO lines\n    (e.g. \"retry succeeded after TimeoutException\", \"non-fatal warning\") count\n    as crash signals and can set `has_anomalies`. Treat crash counts as leads\n    to eyeball, and tune the regex if your logs legitimately chat about\n    exceptions at INFO level.\n\n## What This Skill Is NOT\n\n- Not a log viewer: use `tail`, `less`, or a log UI when you need raw line\n  inspection.\n- Not a log shipper: it does not forward logs to storage or observability\n  systems.\n- Not a SIEM: it does not correlate identities, networks, or security events.\n- Not real-time monitoring: `tail` is a recent-line analyzer, not a daemon or\n  alerting service.\n- Not a root-cause oracle: it highlights patterns so an agent or operator can\n  investigate faster.\n\n## Verification Checklist\n\n- [ ] Run `python scripts\u002Fanalyze_logs.py --help` and confirm subcommands load.\n- [ ] Scan a synthetic log with repeated errors and confirm `has_anomalies` is\n      true.\n- [ ] Render Markdown from the scan JSON and confirm all anomaly sections appear.\n- [ ] Run `python -m pytest tests\u002Ftest_analyze_logs.py -v` from this skill\n      directory.\n- [ ] Run `python -m pytest tests\u002Ftest_state_failures.py -v` from this skill\n      directory (state.db failure-rate monitor; the spike regression test —\n      content merely mentioning error words must not count as failure — lives\n      here).\n- [ ] For cron use, test a no-anomaly log with `--quiet` and confirm stdout is\n      empty with exit code 0.\n- [ ] For state.db cron use, `python scripts\u002Fstate_failures.py --quiet` against\n      a live profile DB exits 0 and prints nothing when the window is clean.\n","# Log Analyzer\n\n## Overview\n\nLog viewers filter lines. This skill finds patterns.\n\nUse it when an agent runtime, tool process, gateway, scheduler, or other service\nhas produced enough log output that individual `grep` hits no longer explain the\nsystem behavior. The analyzer parses standard log lines, normalizes repeated\nmessages, groups errors by component and tool, and produces a structured anomaly\nreport that is suitable for debugging sessions or cron digests.\n\nThe script is intentionally lightweight and portable: it uses only Python's\nstandard library and works on any text log with timestamp, level, optional\ncomponent, and message fields. It also has a best-effort fallback for\nunstructured logs.\n\n## Quick Start\n\n```bash\ncd agent-ops\u002Flog-analyzer\npython scripts\u002Fanalyze_logs.py scan --log-file agent.log --since 24h\n```\n\nFor per-tool failure rates from a Hermes profile's session DB (structured\nexit_code signals, NOT regex-over-content):\n\n```bash\npython scripts\u002Fstate_failures.py                 # last 7 days, dashboard\npython scripts\u002Fstate_failures.py --days 30 --json\npython scripts\u002Fstate_failures.py --quiet         # cron: silent when healthy\n```\n\nSee `references\u002Fstate-failure-monitor.md` for provenance (adapted concept\nfrom hermes-dojo), the spike evidence for why structured signals matter,\nand interpretation notes.\n\nTo write JSON for later Markdown rendering:\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file agent.log --since 24h --output scan.json\npython scripts\u002Fanalyze_logs.py report --scan scan.json --output report.md\n```\n\nFor cron-compatible anomaly detection:\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file agent.log --since 24h --quiet\n```\n\n`--quiet` exits 0 and prints nothing when no anomalies are found. If anomalies\nexist, it prints the JSON report so the scheduler can deliver the digest.\n\n## What It Detects\n\n1. **Error clusters** — the same normalized error message repeated 3+ times\n   within the selected time window. URLs, IP addresses, and numbers are replaced\n   with placeholders before grouping so repeated failures with changing IDs still\n   cluster.\n2. **Rate limit hits** — HTTP `429`, `rate limit`, `rate_limit`, `too many\n   requests`, and `quota exceeded` patterns. The analyzer groups them by\n   provider when it can detect a provider name.\n3. **Timeout patterns** — `timeout`, `timed out`, `deadline exceeded`, and\n   `connection timeout`. Results are grouped by detected tool name and include\n   example URLs where present.\n4. **Tool failures** — error lines grouped by tool name extracted from patterns\n   such as `tool: terminal`, `tool_call: web_search`, `tool terminal failed`, or\n   lines emitted by a `tools` component.\n5. **Session crashes** — fatal errors, unhandled exceptions, stack traces,\n   `Traceback`, `Exception`, and `segfault` markers. Multiline stack traces are\n   grouped as one crash entry with nearby context.\n6. **Component breakdown** — error and warning counts by component such as\n   `gateway`, `agent`, `tools`, `cron`, or `unknown`.\n7. **Error timeline** — error counts bucketed by hour to reveal spikes and\n   regressions after deploys or scheduled jobs.\n\nSee `references\u002Fanomaly-types.md` for detection criteria and interpretation.\n\n## Log Format Support\n\nThe parser handles standard log lines shaped like:\n\n```text\n2026-07-06 12:30:45 ERROR [gateway] Connection refused\n2026-07-06T12:30:45Z ERROR gateway: Connection refused\n12:30:45 ERROR Connection refused\n```\n\nIt recognizes `ERROR`, `WARN`, `WARNING`, `INFO`, `DEBUG`, `FATAL`, and\n`CRITICAL` levels. Components may appear in square brackets after the level or as\n`component:` after the level. Time-only lines are anchored to the current day (or\nto the supplied default date when called as a library). Unstructured lines fall\nback to best-effort line-by-line scanning, so obvious `ERROR`\u002F`WARN` strings are\nstill counted even when the timestamp cannot be parsed.\n\nSee `references\u002Flog-formats.md` for examples and guidance on adding custom\npatterns.\n\n## CLI Commands\n\n### `scan` — analyze a log file for patterns\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file LOGFILE [--since TIME] [--output report.json] [--quiet]\n```\n\nOptions:\n\n- `--log-file LOGFILE` — required path to the log file.\n- `--since TIME` — optional time window: minutes\u002Fhours\u002Fdays\u002Fweeks, e.g. `30m`,\n  `1h`, `24h`, `7d`, `2w`; default is all lines.\n- `--output report.json` — write JSON to a file instead of stdout.\n- `--quiet` — cron mode: suppress output when no anomalies are found.\n\n### `report` — render Markdown from scan JSON\n\n```bash\npython scripts\u002Fanalyze_logs.py report --scan scan.json [--output report.md]\n```\n\nThe report contains overview counts, one section per anomaly type, a component\nbreakdown table, and an hourly error timeline.\n\n### `tail` — smart tail for recent lines\n\n```bash\npython scripts\u002Fanalyze_logs.py tail --log-file LOGFILE [--lines N] [--since TIME]\n```\n\nThe smart tail prints plain text with markers suitable for chat delivery:\n\n- normal lines: no marker\n- warnings: `⚠️`\n- errors: `❌`\n- repeated recent errors: `🔥` when the same normalized error is seen 3+ times\n\n## Output Format\n\n`scan` emits JSON with these top-level fields:\n\n- `log_file`, `lines_analyzed`, `time_window`\n- `anomalies.error_clusters`, `anomalies.rate_limits`, `anomalies.timeouts`,\n  `anomalies.tool_failures`, `anomalies.crashes`\n- `component_breakdown`\n- `error_timeline`\n- `total_errors`, `total_warnings`, `has_anomalies`\n\n`report` converts that JSON into Markdown:\n\n```markdown\n# Log Analysis Report\n\n## Overview\n- Log file: agent.log\n- Lines analyzed: 1542\n- Time window: 24h\n- Total errors: 12 | warnings: 20\n- Anomalies detected: 5 types\n```\n\n## Scheduled Summary Integration\n\nFor a scheduled digest, run `scan` in quiet mode and include the output only when\nit is non-empty:\n\n```bash\npython scripts\u002Fanalyze_logs.py scan --log-file \u002Fvar\u002Flog\u002Fagent.log --since 24h --quiet --output \u002Ftmp\u002Flog-scan.json\nif [ -s \u002Ftmp\u002Flog-scan.json ]; then\n  python scripts\u002Fanalyze_logs.py report --scan \u002Ftmp\u002Flog-scan.json\nfi\n```\n\nA `scheduled-summary` job can append the Markdown output under a \"Log anomalies\"\nheading. Keep the analysis window aligned with the summary window (for example,\n24 hours for a daily digest) so counts do not overlap or disappear.\n\nFor a state.db failure-rate digest (weekly is a sensible cadence given the\nvolume of sessions):\n\n```bash\npython scripts\u002Fstate_failures.py --quiet --days 7\n```\n\nThis prints nothing (exit 0) when the window has zero failures, so it can be\nused as a `no_agent` cron job that only pings when something is wrong. See\n`references\u002Fstate-failure-monitor.md` for what the categories mean (timeout\nis the most actionable on real data).\n\n## Common Pitfalls\n\n1. **Log rotation breaks time windows.** If yesterday's file was rotated out, a\n   `--since 24h` scan over only the current file may miss early-window failures.\n   Point the scheduler at the active file plus rotated file, or concatenate the\n   relevant files before scanning.\n2. **Multiline stack traces need the first line.** The parser groups indented\n   stack-trace continuation lines under the preceding parsed log line. If a log\n   collector strips the first `Traceback` or `ERROR` line, the remaining stack\n   frames become unstructured context.\n3. **Expected errors can be false positives.** Retries, probing, and health\n   checks may intentionally emit warnings or connection failures. Treat clusters\n   as \"investigate\" signals, not automatic incidents.\n4. **First run on a large historical log can overwhelm output.** Start with\n   `--since 24h`, inspect the report, then widen the window if needed.\n5. **Changing message formats can split clusters.** If an application changes an\n   error string during a deploy, pre- and post-deploy failures may appear as two\n   clusters even when the root cause is the same.\n6. **Time-only logs depend on the scan date.** `12:30:45 ERROR ...` lines do not\n   contain a date. For historical files, prefer full timestamps.\n7. **Comma-millisecond Python-logging lines silently defeat `--since`.** Lines\n   shaped `2026-07-06 12:30:45,123 INFO module: ...` (Hermes agent\u002Fgateway\u002Ferrors\n   logs) are NOT matched by the built-in timestamp regexes. They fall to the\n   unstructured fallback with `timestamp=null`, so `--since` cannot filter them\n   and the **whole unrotated file is scanned**. Symptoms: error\u002Ftraceback counts\n   wildly exceed the true windowed count, every cluster reports\n   \"First: unknown \u002F Last: unknown\", the error timeline says \"No timestamped\n   errors detected\", and crashes are inflated (each stack-trace continuation\n   line counts as a separate crash). **Fix:** for Hermes profile logs use the\n   windowed counter `scripts\u002Fhermes_log_window.py` (handles the comma-ms format,\n   de-duplicates multiline tracebacks by counting `Traceback (most recent call\n   last)` first-lines only) and see `references\u002Fhermes-profile-audit.md` for\n   pulling skill-usage\u002Ftool-call counts from the profile's `state.db`.\n8. **Skill-usage counts are not in agent.log.** `tool skill_view completed\n   (0.05s, 13890 chars)` lines do not carry the skill-name argument. Query the\n   profile's `state.db` `messages` table — the `tool_calls` JSON column holds\n   the full arguments. `messages.timestamp` is a Unix epoch (REAL), not ISO.\n   See `references\u002Fhermes-profile-audit.md` for a ready-to-run snippet.\n9. **The error timeline buckets by hour-of-day, not date.** On a multi-day\n   window (`--since 7d`), errors from 08:00 on different days merge into one\n   `08:00` bar. Use the clusters (which carry full timestamps) for multi-day\n   forensics; treat the timeline as a time-of-day profile.\n10. **Crash detection is substring-based.** The crash regex matches words like\n    `fatal` or `Exception` anywhere in a line, so mentions inside INFO lines\n    (e.g. \"retry succeeded after TimeoutException\", \"non-fatal warning\") count\n    as crash signals and can set `has_anomalies`. Treat crash counts as leads\n    to eyeball, and tune the regex if your logs legitimately chat about\n    exceptions at INFO level.\n\n## What This Skill Is NOT\n\n- Not a log viewer: use `tail`, `less`, or a log UI when you need raw line\n  inspection.\n- Not a log shipper: it does not forward logs to storage or observability\n  systems.\n- Not a SIEM: it does not correlate identities, networks, or security events.\n- Not real-time monitoring: `tail` is a recent-line analyzer, not a daemon or\n  alerting service.\n- Not a root-cause oracle: it highlights patterns so an agent or operator can\n  investigate faster.\n\n## Verification Checklist\n\n- [ ] Run `python scripts\u002Fanalyze_logs.py --help` and confirm subcommands load.\n- [ ] Scan a synthetic log with repeated errors and confirm `has_anomalies` is\n      true.\n- [ ] Render Markdown from the scan JSON and confirm all anomaly sections appear.\n- [ ] Run `python -m pytest tests\u002Ftest_analyze_logs.py -v` from this skill\n      directory.\n- [ ] Run `python -m pytest tests\u002Ftest_state_failures.py -v` from this skill\n      directory (state.db failure-rate monitor; the spike regression test —\n      content merely mentioning error words must not count as failure — lives\n      here).\n- [ ] For cron use, test a no-anomaly log with `--quiet` and confirm stdout is\n      empty with exit code 0.\n- [ ] For state.db cron use, `python scripts\u002Fstate_failures.py --quiet` against\n      a live profile DB exits 0 and prints nothing when the window is clean.\n",{"name":5,"license":14,"metadata":23,"description":7},{"tags":24,"author":9,"version":33,"platforms":34,"related_skills":38},[25,26,27,28,29,30,31,32],"logs","analysis","errors","patterns","anomalies","monitoring","debugging","cron","1.1.0",[35,36,37],"linux","macos","windows",[39,40],"scheduled-summary","skill-maintainer","main","e943e3285cd03c44b2c762a9a52328e3d16444b1","agent-ops\u002Flog-analyzer",22,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills","https:\u002F\u002Fhermes-agent.nousresearch.com","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin","Accounting\u002FFP&A\u002FM&A\u002FPERE guy by day, AI\u002Fself-host\u002Fprogramming hobbyist by night. \r\n\r\nPassionate in solving practical business issues.","2026-11-13 19:46:18",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add moonlight-lupin\u002Fagent-skills --skill log-analyzer",{"tool":56,"command":57},"bunx","bunx skills add moonlight-lupin\u002Fagent-skills --skill log-analyzer",{"tool":59,"command":60},"pnpm","pnpm dlx skills add moonlight-lupin\u002Fagent-skills --skill log-analyzer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002FSKILL.md",true,[64,70,74,78,82,88,92,96,100],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fanomaly-types.md","REFERENCE","参考文档",4370,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Freferences\u002Fanomaly-types.md",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fhermes-profile-audit.md",4044,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Freferences\u002Fhermes-profile-audit.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Flog-formats.md",3521,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Freferences\u002Flog-formats.md",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fstate-failure-monitor.md",4642,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Freferences\u002Fstate-failure-monitor.md",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Fanalyze_logs.py","SCRIPT","脚本",23705,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Fscripts\u002Fanalyze_logs.py",{"path":89,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fhermes_log_window.py",4332,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Fscripts\u002Fhermes_log_window.py",{"path":93,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Fstate_failures.py",9047,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Fscripts\u002Fstate_failures.py",{"path":97,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":98,"sourceHtmlUrl":99},"tests\u002Ftest_analyze_logs.py",8299,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Ftests\u002Ftest_analyze_logs.py",{"path":101,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":102,"sourceHtmlUrl":103},"tests\u002Ftest_state_failures.py",9207,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fagent-ops\u002Flog-analyzer\u002Ftests\u002Ftest_state_failures.py",[105,112,119,126,133,140],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":18},"01M78ATNRV7RYQ8M314V0QZX18","website-scraping","Generic playbook for extracting structured data from any website — hotel prices, flight fares, e-commerce listings, real estate, jobs, competitor product catalogues, anything where the goal is to turn one or more URLs into clean records on disk. Use this skill whenever the user mentions scraping, harvesting, extracting, or pulling data from a website; names a specific site or competitor they want data from; asks how to handle JavaScript-rendered pages, Cloudflare blocks, bot detection, Turnstile challenges, or Playwright; wants to monitor prices over time; needs to automate a copy-paste research task; or says things like \"just get the data from X\" or \"I need a script that grabs N from site Y\". Covers recon, picking the lightest extraction tool that works, surviving anti-bot defences, and writing clean JSONL output with a run manifest. Scope is scraping only — landing data in a database, scheduling, and downstream pipeline work are explicitly out of scope and live in other tools.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fweb-scraping\u002Fwebsite-scraping\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":18},"01M78ATK9XGEKSH3QRN7P2MEER","greet","Greets a named person warmly.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fclaude_plugin_sample\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":18},"01M78ATEAQB5CK2D4MKPCW4YHQ","skill-quality-review","Use when auditing or reviewing skill quality — batch checks across a library, deep per-skill grep methodology, usage stats, efficacy testing, or fix planning. Single consolidated home for the writing-for-agents review framework and the 3-surface review methodology.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fskill-quality-review\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":18},"01M78AT58EM57023QSC79S8R6D","people-enrichment","Use when the user has a list of names or companies and wants their job, employer, work history, LinkedIn URLs or company profiles looked up, or wants to find people or companies matching criteria — trigger on phrases like \"enrich these contacts\", \"find their LinkedIn\", \"look up these people\", \"who works at X\", \"find directors at Y\", \"enrich these companies\", or \"get firmographics for\". Enrich and search People Data Labs (PDL) Person and Company data, writing results to .xlsx. Five operations: enrich named PEOPLE into a profile, employment history and LinkedIn URL; IDENTIFY an ambiguous person as several scored candidates; SEARCH people by criteria (company, title, location); enrich COMPANIES into firmographics (industry, size, employees, HQ, founded, LinkedIn); and SEARCH companies by criteria. Do not scrape LinkedIn directly — this uses a licensed data aggregator (PDL) instead, for legal and reliability reasons.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fpeople-enrichment\u002FSKILL.md",[],[],{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":18},"01M78AT0AZJ7WFY73766NBA1EC","notebooklm-mode","Source-grounded research pipeline inspired by NotebookLM. Collect verbatim source extracts into a temporary workspace, then answer questions and create deliverables grounded in those sources. Two grounding modes: strict (vault-only) and augmented (vault + labeled [background] knowledge). Trigger when the user asks to research a topic from sources, wants NotebookLM-style grounded answers, asks to build a resource vault, or says \"notebooklm mode\".","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fnotebooklm-mode\u002FSKILL.md",[],[],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":18},"01M78ASTJVZ9G5JY6GM40SF909","news-monitoring","Use when a topic or news stream needs recurring monitoring — cover it with web search, multi-language sources, digest formatting, and automated delivery via Hermes cron jobs. Covers search strategy, source selection, Chinese-language platforms, and digest templates.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fnews-monitoring\u002FSKILL.md",[],[]]