analyze-log-files
Analyze log files by stripping ANSI escape sequences first. Use when asked to process, handle, read, or analyze log files that may contain terminal escape codes.
Best use case
analyze-log-files is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Analyze log files by stripping ANSI escape sequences first. Use when asked to process, handle, read, or analyze log files that may contain terminal escape codes.
Teams using analyze-log-files should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/analyze-log-files/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How analyze-log-files Compares
| Feature / Agent | analyze-log-files | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Analyze log files by stripping ANSI escape sequences first. Use when asked to process, handle, read, or analyze log files that may contain terminal escape codes.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Analyze Log Files ## When to Use - When user asks to "analyze log.txt", "read the log file", "process logs", "check the logs" - When dealing with any `.log` or log-related files that may contain ANSI escape sequences - When terminal output has been captured to a file and needs analysis - When log files appear garbled or contain escape sequence artifacts ## Why This Matters Log files captured from terminal sessions often contain ANSI escape sequences for: - Colors (e.g., `\x1b[31m` for red) - Cursor movements - Text formatting (bold, underline) - Screen clearing commands These sequences make logs difficult to: 1. Read in plain text editors 2. Search with grep/ripgrep 3. Process with text analysis tools 4. Analyze accurately by LLMs ## Instructions ### Step 1: Strip ANSI Escape Sequences Before analyzing any log file, first strip the ANSI sequences using `ansifilter`: ```bash ansifilter -i log.txt -o /tmp/clean_log.txt ``` For other log file names, adjust accordingly: ```bash ansifilter -i <input_file> -o /tmp/clean_log.txt ``` ### Step 2: Analyze the Clean Log Read and analyze `/tmp/clean_log.txt` instead of the original file: ```bash # Use the Read tool on /tmp/clean_log.txt ``` ### Step 3: Report Findings When reporting findings to the user: - Reference line numbers from the clean log - Quote relevant sections - Summarize errors, warnings, or patterns found ## Common Log File Locations - `log.txt` - General purpose log in project root - `target/` - Cargo build logs - `/tmp/*.log` - Temporary logs ## Example Workflow User: "Can you analyze log.txt and tell me what's wrong?" 1. Run: `ansifilter -i log.txt -o /tmp/clean_log.txt` 2. Read: `/tmp/clean_log.txt` 3. Analyze the content for errors, warnings, patterns 4. Report findings to user ## Troubleshooting If `ansifilter` is not installed: ```bash # Ubuntu/Debian sudo apt-get install ansifilter # macOS brew install ansifilter # Or run bootstrap.sh to install all dependencies ./bootstrap.sh ``` ## Related Skills - `check-code-quality` - For checking Rust code quality (may generate logs) - `analyze-performance` - For performance analysis (generates flamegraph data)
Related Skills
excel-field-analyzer
分析Excel/CSV字段结构,AI自动生成中英文映射,验证翻译质量,输出统计报告。用于电子表格分析、数据字典创建、字段映射场景。
chatfiles
Coordinate multiple Claude agents via shared text files. Triggers on Chatfile, multi-agent, cross-machine coordination.
analyze-us-bank-credit-deposit-decoupling
分析銀行貸款與存款之間的「信貸創造脫鉤」現象,追蹤存款的絕對收縮與回升軌跡,用以辨識聯準會緊縮政策在銀行體系內部的真實傳導效果。
analyze-silver-miner-metal-ratio
以「銀礦股價格 ÷ 白銀價格」的相對比率衡量礦業股板塊相對於金屬本體的估值區間(偏貴/偏便宜),並用歷史分位數與類比區間推導「底部/頂部」訊號與情境推演。
analyze-jgb-insurer-superlong-flow
從日本保險公司對超長期(10年以上)JGB 的淨買賣時間序列,自動產出「本月是否創紀錄淨賣出、連續淨賣出月數、期間累積淨賣出」等結論。
analyze-japan-debt-service-tax-burden
以日本公債殖利率變化為觸發,量化「政府利息支出 / 稅收」負擔(含情境壓力測試),並判斷是否進入債務利息螺旋風險區。
analyze-investment-clock-rotation
把「獲利成長 × 財務狀況(金融環境)」映射成「投資時鐘」,判斷目前落在哪個象限、近期是順時針還是逆時針旋轉、以及相對於上一輪循環的位置差異。
analyze-copper-supply-concentration-risk
用公開資料量化「銅供應是否過度集中、主要產地是否結構性衰退、替代增量是否依賴少數國家」,並輸出可行的中期供應風險結論與情境推演。
analyze-copper-stock-resilience-dependency
用跨資產訊號(全球股市韌性 + 中國利率環境)評估銅價能否突破關卡或進入「回補/回踩」到支撐的機率與路徑。
analyze-agent-overlap
Analyzes existing agents, skills, prompts, and instructions to identify overlaps, redundancies, and conflicts. Works with GitHub Copilot, Claude Code, Codex, OpenCode, and other providers. Use before creating new customization files to avoid duplication, when consolidating agents, or when troubleshooting conflicting behaviors.
ab-testing-analyzer
全面的AB测试分析工具,支持实验设计、统计检验、用户分群分析和可视化报告生成。用于分析产品改版、营销活动、功能优化等AB测试结果,提供统计显著性检验和深度洞察。
32-analyze-verify-150
[32] ANALYZE. Ensure every critical claim has verifiable evidence with confidence levels. Each fact must have source + confidence percentage. If confidence <85%, enter Loop150 to find more sources. Use for critical decisions, factual claims, legal/compliance work, or any situation where unverified claims are dangerous.