skill-security-scan: Skill for Claude Code

.claude/skills/log-analyzer/SKILL.md

Log Analyzer is a skill for Claude Code from huifer/skill-security-scan. It costs 18 tokens per session (585 once invoked), scanned A, original, MIT.

A read-only tool for examining text log files, which record events, warnings, and errors from software.

In plain words
What is it for?
Use it to count and group errors, inspect time ranges, find HTTP failures, detect slow queries, search custom patterns, and produce a Markdown report.
Why use it?
It helps locate application failures, repeated error patterns, slow operations, and possible performance bottlenecks without changing the logs.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is huifer/skill-security-scan's own configuration. It tells Claude Code how to work on skill-security-scan itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything skill-security-scan configures →

Reuse

Borrowing it

Nothing to install: this file belongs to huifer/skill-security-scan. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/huifer/skill-security-scan/main/.claude/skills/log-analyzer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/huifer/skill-security-scan

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 Log Analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/huifer/skill-security-scan/log-analyzer/github.svg)](https://agentmods.dev/skills/huifer/skill-security-scan/log-analyzer)
Your own site
<a href="https://agentmods.dev/skills/huifer/skill-security-scan/log-analyzer"><img src="https://agentmods.dev/badge/skills/huifer/skill-security-scan/log-analyzer/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 Log Analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/huifer/skill-security-scan/log-analyzer"><img src="https://agentmods.dev/badge/skills/huifer/skill-security-scan/log-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 585 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.00018 $0.00585
Opus 5.5 $0.00007 $0.00234
Sonnet 5.5 $0.00004 $0.00117
Haiku 4.5 $0.00002 $0.00059

Measured 1mo ago against content hash 5d7e66bcc472, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (utils/log_parser.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/log-analyzer/SKILL.md · 89 lines

What it actually says

Log Analyzer - 日志分析工具

功能描述

这是一个安全可靠的日志分析 Skill,用于帮助开发者快速分析和理解应用日志文件。

主要功能

  1. 错误识别 - 自动识别日志中的错误和异常
  2. 性能分析 - 检测慢查询和性能瓶颈
  3. 统计报告 - 生成错误统计和趋势分析
  4. 模式匹配 - 根据自定义规则搜索日志模式

使用场景

  • 分析应用错误日志
  • 监控系统性能指标
  • 调试生产环境问题
  • 审计安全事件

使用方法

当用户要求分析日志时:

1. 识别日志文件

查找并读取以下位置的日志文件:

  • ./logs/*.log
  • ./var/log/*.log
  • 用户指定的日志文件路径

2. 分析日志内容

# 读取日志文件内容
# 使用正则表达式匹配错误模式:
# - ERROR, WARN, CRITICAL
# - Exception, Traceback
# - HTTP 错误码(4xx, 5xx)

3. 生成分析报告

  • 错误总数统计
  • 错误类型分布
  • 时间范围分析
  • Top 错误排行

4. 输出结果

以清晰的 Markdown 格式输出分析结果,包括:

  • 执行摘要
  • 详细错误列表
  • 改进建议

安全说明

  • ✅ 只读取日志文件,不修改任何文件
  • ✅ 不执行任何系统命令
  • ✅ 不访问网络资源
  • ✅ 不读取敏感配置文件

依赖项

  • Python 3.9+
  • 标准库:re, datetime, collections

示例用法

用户:分析当前目录的 application.log
工具:[分析日志内容]
输出:✅ 发现 23 个错误,主要是数据库连接超时

限制

  • 仅支持文本格式日志
  • 最大支持 100MB 的日志文件
  • 不处理二进制日志

最佳实践

  1. 定期清理旧日志文件
  2. 使用结构化日志格式(JSON)
  3. 在生产环境启用日志轮转
  4. 保护敏感日志文件权限

版本历史

  • v1.0.0 (2024-12-29) - 初始版本
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. 1mo ago First seen · 89 lines · 18 tokens per session scan A 5d7e66bcc472

Subscribe to this mod's changes

Log Analyzer is a skill published in the GitHub repository huifer/skill-security-scan (174 stars, last pushed 10mo ago), licensed MIT. It adds 18 tokens to every session and 585 once invoked, about $0.0001 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-08-30.

Related

Other skills, from other repositories

gke-workload-scaling-troubleshooting

Diagnoses GKE HorizontalPodAutoscaler (HPA) failures — metrics showing as , FailedGetResourceMetric / FailedGetScale / FailedComputeMetricsReplicas events, missing Pod resource requests, custom/external metrics-pipeline breakage (FailedGetExternalMetric / FailedGetCustomMetric, unavailable metrics adapter…

google/skills · 170 tokens

gke-ai-troubleshooting-tpu-performance-degradation

Diagnose GKE Cloud TPU training throughput drops and step-time regressions (15%+ TPU duty-cycle drop) using ML Diagnostics Workload Monitoring (gcloud alpha mldiagnostics monitored-events / hypercomputecluster.googleapis.com/v1alpha) and 1-minute Cloud Monitoring system metrics (kubernetes.io/node/accelerator/).…

google/skills · 200 tokens

gke-ai-troubleshooting-jobset-interruption

Diagnoses GKE JobSet interruptions, restarts, and preemptions for AI/ML training workloads autonomously. Use when troubleshooting JobSet restart loops, spot VM preemptions, node readiness failures, host VM issues, or coordinator worker crashes. Don't use for general GKE cluster creation, basic workload deployment, or…

google/skills · 83 tokens

gke-node-notready

Diagnoses GKE nodes reporting NotReady or Unknown status by inspecting node conditions, events, kubelet/containerd logs, and node metrics, then proposing safe remediations. Use when nodes show NotReady, when the kubelet stops posting node status, or when workloads are evicted or stuck Pending due to node health. Don't…

google/skills · 112 tokens

bigquery-troubleshooting

Provides diagnostic workflows and step-by-step root-cause analysis procedures for actively broken, failing, or slow BigQuery jobs, execution graph and query plan stage bottlenecks, system performance issues, or unexpectedly expensive workloads. Use when interpreting symptoms, isolating bottlenecks, diagnosing cost…

google/skills · 140 tokens

gke-ai-troubleshooting-tpu-vbar-oom

Diagnoses and prevents vbarcontrolagent segfaults, out-of-memory (OOM) errors, and TPU device initialization failures on TPU v6e nodes in GKE caused by race conditions during TPU device resets or high-frequency metrics polling. Use when troubleshooting vbarcontrolagent crashes, memory cgroup OOMs in serial console…

google/skills · 125 tokens