memdump

memdump is a skill for Claude Code, Codex from open-vela/.claude. It costs 53 tokens per session (2,759 once invoked), scanned A, original, Apache-2.0.

A tool for studying heap memory, the area of memory used for runtime allocations, from NuttX or Vela embedded-system logs.

In plain words
What is it for?
Use it to compare memory before and after features, inspect allocation hotspots, check memory changes between versions, and locate leaks or source-code locations when an ELF file is available.
Why use it?
It helps find memory leaks, high-use modules, and changes in memory consumption without manually inspecting raw logs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to compare memory before and after features, inspect allocation hotspots, check memory changes between versions, and locate leaks or source-code locations when an ELF file is available.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/open-vela/.claude/memdump
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add open-vela/.claude --skill memdump
Clone the repo
git clone --depth 1 https://github.com/open-vela/.claude

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memdump

README.md
[![agentmods](https://agentmods.dev/badge/skills/open-vela/.claude/memdump/github.svg)](https://agentmods.dev/skills/open-vela/.claude/memdump)
Your own site
<a href="https://agentmods.dev/skills/open-vela/.claude/memdump"><img src="https://agentmods.dev/badge/skills/open-vela/.claude/memdump/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memdump

Your own site · 80×15
<a href="https://agentmods.dev/skills/open-vela/.claude/memdump"><img src="https://agentmods.dev/badge/skills/open-vela/.claude/memdump.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,759 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.02759
Opus 5.5 $0.00021 $0.01104
Sonnet 5.5 $0.00011 $0.00552
Haiku 4.5 $0.00005 $0.00276

Measured 3mo ago against content hash a69b340f4897, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memdump scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/analyze.sh, scripts/memdump_diff.py, scripts/memdump_leak_detect.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/memdump/SKILL.md · 306 lines

How it starts

The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memdump Analysis Skill

目标

分析嵌入式系统(NuttX/FreeRTOS)运行时的 heap 内存占用,识别内存泄漏,定位高内存消耗模块,并提供优化建议。

适用场景

  • 分析系统启动后各功能模块的内存占用情况
  • 检测特定功能(播放/录音/通话)前后的内存变化
  • 定位和验证内存泄漏问题
  • 对比不同版本的内存使用差异
  • 评估内存优化效果

快速开始 ⚡

推荐工具:memdump_quick.py

适用场景:快速评估、热点分析、无需ELF文件的基础统计

核心优势:

  • ✅ 自动检测日志格式(支持多种格式)
  • ✅ 零配置,完全独立运行
  • ✅ 提供诊断模式,显示解析成功率
  • ✅ 支持JSON导出
  • ✅ <1秒完成分析

基础用法:

# 1. 快速诊断(检查日志格式和质量)
python3 scripts/memdump_quick.py log.txt --diagnose

# 2. 分析所有进程
python3 scripts/memdump_quick.py log.txt

# 3. 分析特定PID
python3 scripts/memdump_quick.py log.txt 12

# 4. 导出JSON格式
python3 scripts/memdump_quick.py log.txt 12 --json report.json

输出示例:

PID 12 内存分析
分配次数: 1,827
有效数据: 220.92 KB
管理开销: 42.42 KB
总内存:   263.34 KB
平均分配: 123.8 bytes

Top 10 分配热点 (按大小)
调用地址        次数    总大小      平均      占比
0x10137438      24     70.4 KB    3001.7 B  31.8%
0x10137828      26     44.4 KB    1746.8 B  20.1%
0x10137d96     646     37.0 KB      58.7 B  16.8%

工具选择指南

场景 推荐工具 特点 ELF要求
初步评估 memdump_quick.py 快速、无依赖、诊断模式 ❌ 不需要
热点分析 memdump_quick.py 地址级热点、大小分布 ❌ 不需要
源码定位 memdump_parser.py 解析为函数名和行号 ✅ 必需
泄漏检测 memdump_leak_detect.py 多时间点趋势分析 ✅ 推荐
版本对比 memdump_diff.py 差异分析 ✅ 推荐

分阶段分析流程 🎯

阶段1: 快速评估(1分钟)

python3 scripts/memdump_quick.py log.txt --diagnose

输出: 格式识别、解析成功率、进程数量

阶段2: 统计分析(2分钟)

python3 scripts/memdump_quick.py log.txt 12

输出: 内存统计、热点Top 10、大小分布

阶段3: 深度溯源(需要ELF)

python3 scripts/memdump_parser.py log.txt 12 config.json

输出: 源码级定位(函数名、文件:行号)


快速故障排查

问题1: 无法识别日志格式

❌ 错误: 无法识别日志格式

解决方案:

  1. 确认日志包含memdump输出(搜索PID、Size、Address等关键字)
  2. 使用 --diagnose 查看详细信息
  3. 检查日志格式是否匹配支持的格式(见DATA_COLLECTION.md)

问题2: 解析失败率高(>10%)

⚠️ 警告: 失败率偏高,可能存在格式问题

解决方法:通常不影响分析,只要成功率>90%即可。如果成功率<50%,手动检查日志格式。

问题3: 找不到目标PID

❌ 未找到PID 12的数据

解决方案:先不指定PID,查看所有进程列表,确认PID是否正确。

Read the full file on GitHub · 306 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 306 lines · 53 tokens per session scan A a69b340f4897

Subscribe to this mod's changes

memdump is a skill published in the GitHub repository open-vela/.claude (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 53 tokens to every session and 2,759 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

memdump compared with skills from other repositories

memdump next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memdumpopen-vela/.claudeSkill62mo agoApache-2.0A53Claude Code, Codex
gke-ai-troubleshooting-tpu-dynamic-slices-monitoringgoogle/skillsSkill25ktodayApache-2.0A107Claude Code, Codex
gke-ai-troubleshooting-tpu-vbar-oomgoogle/skillsSkill25ktodayApache-2.0A125Claude Code, Codex
doca-flowNVIDIA/skillsSkill4.3ktodayApache-2.0A224Claude Code
competition-firmware-layoutzhaoxuya520/reverse-skillSkill46k17d agoMITA110Codex
diagnose-driver-installNVIDIA/deepopsSkill1.5ktodayBSD-3-ClauseA47Claude Code, Codex
catc-troubleshootautomateyournetwork/netclawSkill740todayApache-2.0A114Claude Code