Use when checking or reducing this service's memory usage, heap growth, possible leaks, oversized payload retention, or Node server memory pressure. Trigger when the user asks about memory profiling, heap issues, OOM crashes, leak hunting, high RSS/heap usage, or memory optimization in the running web service.
Use this skill to reproduce and inspect memory pressure in the running service.
clinicautocannonnodenext start under Node --heap-prof on a separate port.autocannon..heapprofile file, then reduce payload size, cache size, or duplicated parsing.clinic heapprofiler only as an optional secondary tool when richer visual output is needed.Build first:
npm run build
Then run:
bash ./.codex/skills/web-memory-profile/scripts/run-heap-profile.sh
Override the target route:
TARGET_URL='http://localhost:$PORT/api/threads?kind=all&page=8&pageSize=10' bash ./.codex/skills/web-memory-profile/scripts/run-heap-profile.sh
The script profiles this repo with:
node --heap-prof ./node_modules/next/dist/bin/next start
Heap profile under load with the reliable Node fallback:
PORT=3200 bash ./.codex/skills/web-memory-profile/scripts/run-heap-profile.sh
Optional Clinic run:
USE_CLINIC=true PORT=3200 bash ./.codex/skills/web-memory-profile/scripts/run-heap-profile.sh
data/mail-service-db.json repeatedlybodyHtml payloads into the file-backed store