analyze-log-files
Skill486 starsChanged 15 days agoApache-2.0View on GitHub
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.
- Installs packages
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
When user asks to "analyze /tmp/r3bl_tui/log.txt", "read the log file", "process logs", "check the logs"
- Very specific: line 11
When dealing with any .log or log-related files that may contain ANSI escape sequences
- Distinctive: line 12
When terminal output has been captured to a file and needs analysis
- Distinctive: line 13
When log files appear garbled or contain escape sequence artifacts
- Distinctive: line 24
Read in plain text editors
- Distinctive: line 25
Search with grep/ripgrep
- Very specific: line 33
Before analyzing any log file, first strip the ANSI sequences using ansifilter:
- Very specific: line 46
Read and analyze /tmp/clean_log.txt instead of the original file:
- Distinctive: line 54
When reporting findings to the user:
- Very specific: line 76
If ansifilter is not installed:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Analyze Log Files
When to Use
- When user asks to "analyze /tmp/r3bl_tui/log.txt", "read the log file", "process logs", "check the logs"
- When dealing with any
.logor 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[31mfor red) - Cursor movements
- Text formatting (bold, underline)
- Screen clearing commands
These sequences make logs difficult to:
- Read in plain text editors
- Search with grep/ripgrep
- Process with text analysis tools
- Analyze accurately by LLMs
Instructions
Step 1: Strip ANSI Escape Sequences
Before analyzing any log file, first strip the ANSI sequences using ansifilter:
ansifilter -i /tmp/r3bl_tui/log.txt -o /tmp/clean_log.txtFor other log file names, adjust accordingly:
ansifilter -i <input_file> -o /tmp/clean_log.txtStep 2: Analyze the Clean Log
Read and analyze /tmp/clean_log.txt instead of the original file:
# Use the Read tool on /tmp/clean_log.txtStep 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
/tmp/r3bl_tui/log.txt- General purpose log in project roottarget/- Cargo build logs/tmp/*.log- Temporary logs
Example Workflow
User: "Can you analyze /tmp/r3bl_tui/log.txt and tell me what's wrong?"
- Run:
ansifilter -i /tmp/r3bl_tui/log.txt -o /tmp/clean_log.txt - Read:
/tmp/clean_log.txt - Analyze the content for errors, warnings, patterns
- Report findings to user
Troubleshooting
If ansifilter is not installed:
# Ubuntu/Debian
sudo apt-get install ansifilter
# macOS
brew install ansifilter
# Or run bootstrap.sh to install all dependencies
./bootstrap.shRelated Skills
check-code-quality- For checking Rust code quality (may generate logs)analyze-performance- For performance analysis (generates flamegraph data)
Related Commands
/analyze-logs- Explicitly invokes this skill
In this repository30 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- build-infra/AGENTS.mdAGENTS.md
- rust-analyzer-mcp-server/AGENTS.mdAGENTS.md
- task/AGENTS.mdAGENTS.md
- llms.txtllms.txt
- analyze-performanceSkill
- audit-taskSkill
- batch-refactor-with-sub-agentsSkill
- check-bounds-safetySkill
- check-code-qualitySkill
- check-test-coverageSkill
- code-reviewSkill
- concurrency-safetySkill
- create-commit-messageSkill
- create-prSkill
- design-philosophySkill
- fast-string-allocationsSkill
- fix-issueSkill
- merge-prSkill
- organize-modulesSkill
- organize-testsSkill
- release-crateSkill
- remove-crate-prefixSkill
- review-prSkill
- run-clippySkill
- safe-renamingSkill
- test-cross-platformSkill
- write-documentationSkill
- write-structured-tracingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

