Agent skill
valgrind-summarizer
Summarize Valgrind Memcheck reports into concise Markdown. Use when the user uploads or references a Valgrind log file (.txt, .log, .valgrind) and wants a summary, analysis, or overview of memory leaks and errors. Triggers on mentions of "valgrind", "memcheck", "leak check", "memory leak report", or when the uploaded file contains Valgrind Memcheck output (identifiable by "==PID==" prefixed lines, "HEAP SUMMARY", "LEAK SUMMARY").
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/valgrind-report
SKILL.md
Valgrind Report Summarizer
Produce a minimal-token Markdown summary of Valgrind Memcheck reports by running the bundled parser script.
Workflow
- Identify the valgrind log file (uploaded or at a given path).
- If no log file exists yet and the user wants to run Valgrind, build with debug symbols first:
bashThen run Valgrind:
cd python && MSCOMPRESS_DEBUG=1 uv sync --all-extras --reinstallbashcd python && valgrind --tool=memcheck --leak-check=full --log-file=leak-check.txt $(uv run which python) -m pytest
- If no log file exists yet and the user wants to run Valgrind, build with debug symbols first:
- Run the parser:
bash
python3 /path/to/this/skill/scripts/parse_valgrind.py <input_file> <output.md> - Deliver the resulting
.mdfile to the user.
What the Script Produces
- Heap Overview — exit usage, total allocated, alloc/free delta
- Leak Summary — table with definitely/indirectly/possibly lost, still reachable, suppressed (with severity icons)
- Top 15 Leak Sources — grouped & deduplicated by call stack, sorted by bytes, showing only user-code frames (runtime/valgrind internals stripped)
Notes
- The parser strips
==PID==/--PID--prefixes automatically. - Stack frames from valgrind preload, libpython, CPython eval loop, pthread, and clone are filtered out to surface only the user's own code.
- Duplicate stacks (same top-4 frames) are merged with a
×Ncount. - Byte values are human-readable (KB/MB/GB).
- If the user wants deeper analysis or remediation advice beyond the summary, read the generated markdown and provide commentary.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?