From aj-geddes-useful-ai-prompts-4
Analyze application and system logs to identify errors, patterns, and root causes using structured logging and log aggregation tools.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:log-analysisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Logs are critical for debugging and monitoring. Effective log analysis quickly identifies issues and enables root cause analysis.
Minimal working example:
// Good: Structured logs (machine-readable)
logger.info({
level: 'INFO',
timestamp: '2024-01-15T10:30:00Z',
service: 'auth-service',
user_id: '12345',
action: 'user_login',
status: 'success',
duration_ms: 150,
ip_address: '192.168.1.1'
});
// Bad: Unstructured logs (hard to parse)
console.log('User 12345 logged in successfully in 150ms from 192.168.1.1');
// JSON Format (Elasticsearch friendly)
{
"@timestamp": "2024-01-15T10:30:00Z",
"level": "ERROR",
"service": "api-gateway",
"trace_id": "abc123",
"message": "Database connection failed",
"error": {
"type": "ConnectionError",
"code": "ECONNREFUSED"
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Structured Logging | Structured Logging |
| Log Levels & Patterns | Log Levels & Patterns |
| Log Analysis Tools | Log Analysis Tools |
| Common Log Analysis Queries | Common Log Analysis Queries |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Parses JSON, Apache, and custom app logs to detect error trends, anomalies, performance metrics, user patterns, and system health; provides root cause analysis and fix recommendations.
Analyze application logs for performance insights and issue detection including slow requests, error patterns, and resource usage. Use when troubleshooting performance issues or debugging errors. Trigger with phrases like "analyze logs", "find slow requests", or "detect error patterns".
Analyzes logs and codebases for error patterns, stack traces, and anomalies. Correlates errors across systems to identify root causes. Useful for debugging production issues.