membrowse-integrate
БесплатноБез исполняемых скриптовНе проверенIntegrate MemBrowse memory tracking into a project that produces ELF binaries. Use when the user wants to set up MemBrowse, add memory analysis GitHub…
Об этом скилле
MemBrowse Integration Skill
You are integrating MemBrowse memory analysis into a project that produces ELF binaries. This works for both embedded firmware (STM32, ESP32, nRF, RISC-V) and non-embedded targets (Linux x86/x64 applications, game engines, system software). Follow these steps to identify build targets, create the configuration file, set up GitHub workflows, and optionally add a MemBrowse badge to the README.
Step 1: Gather Project Configuration
Before exploring the codebase, gather project-level configuration. Auto-detect what you can, then ask the user only what requires their input.
1.1 Auto-detect submodules and default branch
# Detect submodules (non-empty output means submodules exist)
git submodule status
# Detect default branch
git symbolic-ref refs/remotes/origin/HEAD
1.2 Ask the user
Use AskUserQuestion to ask:
- Is this an open-source project that accepts pull requests from forks? (This determines the workflow pattern — open-source projects need a two-workflow setup so PR comments work for fork PRs.)
Step 2: Explore the Codebase to Identify Build Targets
Understand what the project builds and how.
2.1 Search for Build System Files
Use the Glob tool to find build configuration files:
**/Makefile***/CMakeLists.txt**/*.mk**/meson.build**/Cargo.toml**/platformio.ini
For embedded projects, also search for board/port directories:
**/boards/**/ports/
Check existing CI workflows by reading files in .github/workflows/.
2.2 Analyze Existing CI Workflows
Read existing workflow files to understand:
- What targets are currently built
- What setup commands are used
- Where ELF files are output
2.3 Find Linker Scripts (Embedded Projects)
Linker scripts define memory regions (FLASH, RAM, etc.) and are mainly used in embedded projects. Non-embedded projects typically don't have custom linker scripts — this is fine, MemBrowse will use default Code/Data regions based on ELF sections.
Use the Glob tool to find linker scripts:
**/*.ld**/*.lds
Use the Grep tool to check Makefiles for linker script references:
- Pattern:
LDSCRIPT|\.ld|-TinMakefile*and*.mkfiles
2.4 Find ELF Output Locations
Use the Grep tool to search for ELF references in CI workflow files:
- Pattern:
\.elf|\.out|firmware|build/in.github/workflows/*.yml
Common embedded patterns:
build/firmware.elfbuild-BOARDNAME/firmware.elfbuild/PROJECT_NAME.elf
Common non-embedded patterns:
build/myapp(no extension — usefilecommand to confirm it's ELF)target/release/myapp(Rust)builddir/myapp(Meson)
Step 3: Collect Target Information
For each target you identify, gather:
| Field | Description |
|---|---|
target_name |
Unique identifier (e.g., stm32-pybv10, esp32-devkit, linux-x64) |
setup_cmd |
Commands to install build dependencies |
build_cmd |
Commands to compile the project (include map file generation flags — see below) |
elf |
Path to output ELF file after build |
ld |
Space-separated linker script paths (can be empty) |
map_file |
Path to the generated linker map file (empty if toolchain doesn't support it) |
linker_vars |
Optional: variable definitions for linker parsing (e.g., "__flash_size__=4096K") |
partition_table |
ESP-IDF targets only (ESP-IDF, Arduino-ESP32, PlatformIO): the build's compiled partition table, so flash is measured against the app partition (see Field Notes) |
partition_name |
Optional, with partition_table: the app slot the firmware is flashed to, when the table's app slots differ in size (see Field Notes) |
Generating Map Files
Map files enable archive/object file attribution — MemBrowse can show which .a library or .o object file each symbol comes from. Map files are build artifacts generated by the linker, so the build_cmd must include the appropriate flags.
When constructing build_cmd, check if the project's toolchain supports map file generation and add the flag. Use the Grep tool to inspect Makefiles/CMakeLists.txt for the toolchain and existing linker flags (e.g., LDFLAGS, target_link_options, CMAKE_EXE_LINKER_FLAGS).
Toolchain-specific flags:
| Toolchain | Flag to add | Example map_file path |
|---|---|---|
| GCC / Clang (Make) | -Wl,-Map=path/to/output.map in LDFLAGS |
build/firmware.map |
| GCC / Clang (CMake) | -DCMAKE_EXE_LINKER_FLAGS="-Wl,-Map=${PWD}/build/output.map" |
build/output.map |
| IAR EWARM | Map files generated by default | Debug/Exe/project.map |
| ESP-IDF | Map file generated by default at build/<project>.map |
build/<project>.map |
| Rust (Cargo) | RUSTFLAGS="-C link-args=-Wl,-Map=output.map" |
output.map |
How to add map generation to the build command:
- Make-based projects: Check if the Makefile already passes
-Wl,-Mapor has aMAPvariable. If not, append the flag vi
Установить membrowse-integrate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGlobGrepWriteEditBashTaskAskUserQuestionFAQ
Что делает скилл membrowse-integrate?
Integrate MemBrowse memory tracking into a project that produces ELF binaries. Use when the user wants to set up MemBrowse, add memory analysis GitHub workflows, create membrowse-targets.json for tracking memory usage, or add a MemBrowse badge to the README. Works with embedded firmware (STM32, ESP32, nRF, RISC-V) and non-embedded ELF targets (Linux x86/x64, game engines, system software).
Как установить скилл membrowse-integrate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл membrowse-integrate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic