Analyzes logs to diagnose errors, patterns, and performance issues. Supports JSON, plain text, syslog, Windows Event Log, and cloud observability tools (ELK, Datadog, Application Insights, Grafana Loki).
Ships in claude-skills-collection. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Avant tout filtrage, qualifier le format :
| Format | Outil natif | Champ clé à valider |
|---|---|---|
| JSON structuré | jq, Kibana, Loki | timestamp, level, traceId |
| Plain text (Apache/Nginx/IIS) | grep, awk, goaccess | pattern de date, status code |
| Syslog RFC 5424 | journalctl, ELK Filebeat | PRI, HOSTNAME, MSGID |
| Windows Event Log | Get-WinEvent, Winlogbeat | EventID, Provider |
| Application Insights / Datadog | KQL, SDK query | operation_Id, customDimensions |
# Détecter rapidement le format
head -5 app.log | python3 -m json.tool 2>/dev/null || echo "plain text"
Règle d'or : isoler avant d'analyser.
# Plage horaire + niveau ERROR dans un fichier plain text
awk '/2026-06-24T10:[23][0-9]/ && /ERROR/' app.log
# JSON structuré avec jq
jq 'select(.level=="Error" and .timestamp >= "2026-06-24T10:20:00Z")' app.log
# journalctl (systemd)
journalctl -u myservice --since "2026-06-24 10:00" --until "2026-06-24 11:00" -p err
# grep avec correlation ID (format UUID)
grep "traceId=3fa85f64" app.log | sort -t' ' -k1
// Application Insights — top 10 exceptions sur 1h
exceptions
| where timestamp > ago(1h)
| summarize count() by type, outerMessage
| order by count_ desc
| take 10
# Grafana Loki — error rate par service
sum(rate({app="api"} |= "ERROR" [5m])) by (service)
Objectifs : top exceptions, spikes, cascading failures.
# Top 10 messages d'erreur (plain text)
grep "ERROR" app.log | sed 's/.*ERROR //' | sort | uniq -c | sort -rn | head 10
# Fréquence d'erreurs par minute (détecter les spikes)
grep "ERROR" app.log | awk '{print $1}' | cut -c1-16 | uniq -c
# Détecter une exception Java/C# récurrente
grep -A 5 "Unhandled exception" app.log | grep "at " | sort | uniq -c | sort -rn
Critères de sévérité :
# Suivre un traceId à travers plusieurs fichiers de services
grep "traceId=abc123" service-a.log service-b.log service-c.log | sort -k1
# Reconstituer la timeline d'une transaction
grep "abc123" *.log | awk '{print $1, $2, $NF}' | sort
// Application Insights — trace complète d'une opération
union requests, dependencies, exceptions, traces
| where operation_Id == "abc123def456"
| order by timestamp asc
| project timestamp, itemType, name, duration, success, message
Si pas de traceId : corréler par userId + fenêtre de ±500 ms, ou par sessionId.
# Extraire les durées (format "duration=NNNms") et calculer P95
grep "duration=" app.log | grep -oP 'duration=\K[0-9]+' | sort -n | \
awk 'BEGIN{c=0} {a[c++]=$1} END{print "P50=" a[int(c*0.5)] " P95=" a[int(c*0.95)] " P99=" a[int(c*0.99)]}'
# Identifier les slow SQL queries (EF Core / SqlClient)
grep "Executed DbCommand" app.log | grep -oP '\(\K[0-9]+(?=ms\))' | awk '$1>1000' | wc -l
// Application Insights — P95 latence par endpoint
requests
| where timestamp > ago(1h)
| summarize percentile(duration, 95) by name
| order by percentile_duration_95 desc
Serilog (.NET) :
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.Enrich.WithProperty("Service", "MyApi")
.Enrich.WithProperty("Version", "1.4.2")
.WriteTo.Console(new JsonFormatter())
.WriteTo.Seq("http://seq:5341")
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.CreateLogger();
// Usage — toujours des propriétés structurées, jamais de string interpolation
Log.Warning("Paiement échoué {TransactionId} pour {UserId}", txId, userId);
Winston (Node.js) :
const logger = winston.createLogger({
format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
defaultMeta: { service: 'payment-api', version: '2.1.0' },
transports: [new winston.transports.Console()]
});
logger.error('Payment failed', { transactionId: txId, userId, amount });
| Stack | Quand choisir | Complexité |
|---|---|---|
| ELK (Elasticsearch + Filebeat + Kibana) | Volume > 10 GB/jour, full-text search | Haute |
| Grafana Loki + Promtail | Déjà sur Grafana/Prometheus, volume modéré | Moyenne |
| Application Insights (Azure) | App Azure, SDK .NET/Node/Python | Faible |
| CloudWatch Logs Insights | Infra AWS Lambda/ECS/EC2 | Faible |
| Seq | Dev/staging .NET, budget limité | Très faible |
// Application Insights — alerter si error rate > 1% sur 5 min
requests
| where timestamp > ago(5m)
| summarize failed=countif(success==false), total=count()
| where (failed * 100 / total) > 1
# Grafana Loki alert rule
- alert: HighErrorRate
expr: sum(rate({app="api"} |= "ERROR" [5m])) > 10
for: 2m
annotations:
summary: "Plus de 10 erreurs/s depuis 2 min"
Ne jamais faire :
string.Format ou interpolation dans les messages Serilog (perd la structure).WARN : ils signalent souvent les prémices d'une panne.Pièges courants :
/app.log, mais l'erreur cherchée est dans /app.log.1 de la veille.flushToDiskInterval ou bufferedBatching: false en prod critique.DateTimeOffset.UtcNow), afficher en local uniquement dans l'UI.OTLP comme protocole d'export pour unifier traces, métriques et logs dans un seul pipeline.grep sur des fichiers bruts en production — plus rapide et moins risqué pour la charge I/O.What SKILL.md sets; muted values are Claude Code's defaults
/claude-skills-collection:dev-log-analyzerfrom claude-skills-collection
npx claudepluginhub vantaflow/claude-skills-collection --plugin claude-skills-collection348 skills in this plugin
/agent-a2a-protocol-guideGuide du protocole Agent-to-Agent (A2A) de Google pour l'interopérabilité entre agents IA — découverte, communication et collaboration inter-agents, avec exemples de code, critères de décision et pièges à éviter. Se déclenche avec "A2A", "agent-to-agent", "protocole A2A", "Google A2A", "interopérabilité agents". Also triggers on "agent-to-agent protocol", "agent interoperability", "connect two agents"./agent-agent-observabilityInstrumentation technique d'un agent IA — tracing distribué des appels LLM et outils, spans, métriques custom, corrélation de logs et dashboards de supervision. Pour les alertes et garde-fous de production, voir agent-monitoring-setup. Se déclenche avec "observabilité agent", "tracing agent", "LangSmith", "Langfuse", "OpenTelemetry agent", "spans LLM", "corréler les logs agent". Also triggers on "trace my agent", "LLM tracing", "agent spans"./agent-api-caller-subagentSous-agent spécialisé dans les appels API REST/GraphQL avec retry, auth et transformation de données. Se déclenche avec "sous-agent API", "API caller agent", "agent qui appelle une API", "REST agent", "HTTP agent", "API integration subagent", "external API agent". Also triggers on "subagent that calls an API", "API calling agent", "agent HTTP requests".Other plugins' skills for the same job