con un clic
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.
// 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.
Apply private modules with public re-exports (barrel export) pattern for clean API design. Includes conditional visibility for docs and tests. Use when creating modules, organizing mod.rs files, or before creating commits.
Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.
Write and format Rust documentation correctly. Apply proactively when writing code with rustdoc comments (//! or ///). Covers voice & tone, prose style (opening lines, explicit subjects, verb tense), structure (inverted pyramid), intra-doc links (crate:: paths, reference-style), constant conventions (binary/byte literal/decimal), and formatting (cargo rustdoc-fmt). Also use retroactively via /fix-intradoc-links, /fix-comments, or /fix-md-tables commands.
Run clippy linting, enforce comment punctuation rules, format code with cargo fmt, and verify module organization patterns. Use after code changes and before creating commits.
Publish a crate release to crates.io with changelog, git tag, and GitHub release. Use when releasing a new version of any workspace crate.
Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth. Use when designing APIs, modules, or data structures.
| name | analyze-log-files |
| description | 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. |
.log or log-related files that may contain ANSI escape sequencesLog files captured from terminal sessions often contain ANSI escape sequences for:
\x1b[31m for red)These sequences make logs difficult to:
Before analyzing any log file, first strip the ANSI sequences using ansifilter:
ansifilter -i log.txt -o /tmp/clean_log.txt
For other log file names, adjust accordingly:
ansifilter -i <input_file> -o /tmp/clean_log.txt
Read and analyze /tmp/clean_log.txt instead of the original file:
# Use the Read tool on /tmp/clean_log.txt
When reporting findings to the user:
log.txt - General purpose log in project roottarget/ - Cargo build logs/tmp/*.log - Temporary logsUser: "Can you analyze log.txt and tell me what's wrong?"
ansifilter -i log.txt -o /tmp/clean_log.txt/tmp/clean_log.txtIf ansifilter is not installed:
# Ubuntu/Debian
sudo apt-get install ansifilter
# macOS
brew install ansifilter
# Or run bootstrap.sh to install all dependencies
./bootstrap.sh
check-code-quality - For checking Rust code quality (may generate logs)analyze-performance - For performance analysis (generates flamegraph data)/analyze-logs - Explicitly invokes this skill