スキル一覧に戻る
epsniff

log-summarizer

by epsniff

Custom Claude Code plugins by epsniff

1🍴 0📅 2026年1月13日
GitHubで見るManusで実行

SKILL.md


name: log-summarizer description: | Log summarizer canvas for pasting logs. Opens a terminal canvas where users paste logs, then spawns a subagent to summarize them. The primary agent receives only the clean summary, not raw logs.

Log Summarizer Canvas

A terminal canvas for pasting log content and submitting it to Claude for summarization. The architecture keeps your context window clean by using a subagent for the actual log analysis.

Usage Flow

When the user wants to paste and summarize logs, follow these steps:

Step 1: Show the Canvas

Run this command to open the log summarizer inline in the current terminal:

${CLAUDE_PLUGIN_ROOT}/run-log-summarizer.sh show

Step 2: Inform the User

Tell the user:

"I've opened a log viewer. Paste your logs using Cmd+V, then press Enter when ready. The canvas will highlight errors, warnings, and timestamps for easier reading."

Step 3: Wait for Submission

The canvas will:

  1. Accept pasted log content
  2. Show syntax highlighting (errors in red, warnings in yellow, timestamps in green)
  3. Allow scrolling through large logs
  4. Write logs to a temp file when user presses Enter
  5. Exit automatically after submission

The log file will be saved at: /tmp/log-summarizer-{id}.log

Step 4: Spawn a Subagent to Summarize

After the canvas exits, use the Task tool to spawn a subagent for summarization:

Read the log file at /tmp/log-summarizer-log-1.log and provide a structured summary.

Analyze the logs and report:

1. **Overview**: What type of logs are these? (application logs, server logs, build output, etc.)

2. **Error Analysis**:
   - Count of errors by type
   - Most critical errors with line numbers
   - Root cause patterns if identifiable

3. **Warning Analysis**:
   - Key warnings that may indicate problems
   - Patterns of recurring warnings

4. **Timeline**:
   - Time range of logs (if timestamps present)
   - Key events in chronological order

5. **Recommendations**:
   - Immediate actions needed
   - Investigation suggestions

Keep the summary under 500 words. Focus on actionable insights.

Step 5: Present Summary to User

Share the subagent's summary with the user. The raw logs stay in the temp file and never enter the primary conversation context.

Why Use a Subagent?

  • Context Preservation: Raw logs (potentially thousands of lines) don't pollute your context window
  • Large Log Support: Can analyze very large logs without hitting context limits
  • Focused Analysis: Subagent specializes in log parsing
  • Clean Handoff: You only see the actionable summary

Canvas Controls (for user reference)

KeyAction
Cmd+V / Ctrl+Shift+VPaste logs
↑/↓Scroll one line
PgUp/PgDnScroll one page
EnterSubmit logs for summarization
EscCancel and close

Syntax Highlighting

The canvas automatically detects and highlights:

  • Errors (ERROR, FATAL, CRITICAL): Red
  • Warnings (WARN, WARNING): Yellow
  • Info (INFO, NOTICE): Cyan
  • Debug/Trace: Gray
  • Timestamps: Green
  • JSON keys: Magenta
  • JSON values: Colored by type

Supported Log Formats

  • JSON structured logs
  • Syslog format
  • Generic timestamped logs
  • Plain text

Configuration (optional)

interface LogSummarizerConfig {
  title?: string;       // Custom canvas title
  maxLines?: number;    // Max lines to accept (default: 10000)
}

Result Format

The canvas sends this data via IPC (you don't need to parse this directly - just check the temp file exists):

interface LogSubmissionResult {
  logFilePath: string;     // Path to temp file: /tmp/log-summarizer-{id}.log
  lineCount: number;       // Number of lines
  detectedFormat: string;  // "json" | "syslog" | "generic" | "unknown"
  sizeBytes: number;       // Size in bytes
}

Example Conversation

User: "I have some error logs I need help with"

Assistant: "I'll open a log viewer for you." Runs: ${CLAUDE_PLUGIN_ROOT}/run-log-summarizer.sh show

"I've opened a log viewer. Paste your logs using Cmd+V, then press Enter when ready."

User pastes logs and presses Enter

Spawns subagent to analyze /tmp/log-summarizer-log-1.log

Assistant: "Here's what I found in your logs:

Overview: Application server logs from a Node.js service

Errors (12 total):

  • ECONNREFUSED on database connection (8 occurrences, lines 45-120)
  • TypeError: Cannot read property 'id' of undefined (4 occurrences, lines 200-250)

Root Cause: The database connection failures started at 10:45:23, causing the TypeError errors downstream when queries returned null.

Recommendations:

  1. Check database server status and connectivity
  2. Add null checks in the user service (around line 200)
  3. Implement connection retry logic with exponential backoff"

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です