- Home
- Skills
- Interstellar Code
- Claud Skills
- Log Analysis Tools
log-analysis-tools_skill
- Python
11
GitHub Stars
3
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill interstellar-code/claud-skills --skill log-analysis-tools- log-tools.sh19.4 KB
- README.md2.6 KB
- skill.md20.2 KB
Overview
This skill provides fast, framework-aware log file analysis with automatic pruning and multi-framework detection. It saves tokens by focusing on relevant entries (about 70–80% token savings vs reading full logs) and integrates best-effort fallbacks when optional tools are missing. All output uses the colored-output formatter for consistent, readable terminal output.
How this skill works
The tool auto-detects project frameworks (Laravel, CodeIgniter, Next.js, React, Django, etc.) and opens the most relevant log locations using lnav when available, falling back to bat/less/cat. It supports commands to view, tail, search with regex, extract recent errors, produce statistics, merge multiple logs, and prune old entries into compressed archives. Dependency checks run at startup and the script suggests installs for optional performance tools.
When to use it
- Debugging production 500 errors or uncaught exceptions
- Investigating spikes or recurring errors (peak times, top error messages)
- Live-tail when reproducing issues in real time
- Searching logs with regex or context around failures
- Pruning and archiving old logs to recover disk space
- Correlating app and server logs across multiple files
Best practices
- Install lnav and ripgrep for best performance; the script will still work without them
- Run prune with --dry-run first to preview archives before deleting
- Use framework-specific commands (view laravel, view nextjs) when auto-detection is ambiguous
- Keep daily rotation enabled and archive older logs to the archive folder for searchability
- Use search with --context to capture stack traces and surrounding request info
Example use cases
- Auto-detect Laravel and show errors from the last 24 hours to identify a recurring 500
- Tail production logs with color-coded levels while reproducing an issue in staging
- Search for "database connection" regex across merged app + webserver logs to correlate timeouts
- Run prune --keep 7 to compress and move older logs to storage/logs/archive, reclaiming disk space
- Run stats to get top 10 errors and error counts per hour to spot peak incident windows
FAQ
The script falls back to bat → less → cat for viewing, and ripgrep falls back to grep for searching; functionality remains but performance and UX are reduced.
Will pruning delete logs permanently?
No — pruning archives older logs into storage/logs/archive as .log.gz. Use --dry-run to preview actions before proceeding.