Source profileQuality 91/100Review permissions

commontoolsinc/labs/skills/deno-memory-profiler/SKILL.md

deno-memory-profiler

Analyze memory in a running Deno process via the V8 inspector CDP protocol. Use when the user asks about memory usage, memory leaks, heap analysis, heap snapshots, allocation profiling, or object retention in a Deno process running with --inspect.

Source repository stars
37
Declared platforms
0
Static risk flags
1
Last source update
2026-08-05
Source checked
2026-08-05

Decision brief

What it does—and where it fits

Analyze memory in a running Deno process via the V8 inspector CDP protocol.

Best for

  • Memory usage of a running Deno process
  • Memory leaks or growing heap
  • Heap analysis or heap snapshots

Not for

  • Snapshot size: Snapshot parsing can be slow and memory-intensive for very
  • Sampling is duration-based: Coordinate with the user on timing — the

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/commontoolsinc/labs --skill "skills/deno-memory-profiler"
Safe inspection promptEditorial

Inspect the Agent Skill "deno-memory-profiler" from https://github.com/commontoolsinc/labs/blob/b0ff67d2dde1812680849aa2373df1f49b6faa2f/skills/deno-memory-profiler/SKILL.md at commit b0ff67d2dde1812680849aa2373df1f49b6faa2f. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    usage — Quick heap stats

    Returns usedSize, totalSize, usagePercent. Use --gc to force garbage collection before measuring for a more accurate picture.

    Returns usedSize, totalSize, usagePercent. Use --gc to force garbage collection before measuring for a more accurate picture.
  2. 02

    eval — Evaluate in target process

    Runs an expression in the target via Runtime.evaluate and prints the result. Useful for inspecting specific objects.

    Runs an expression in the target via Runtime.evaluate and prints the result. Useful for inspecting specific objects.
  3. 03

    Phase 1: capture baseline

    deno run --allow-net --allow-write skills/deno-memory-profiler/scripts/memory.ts diff baseline

    deno run --allow-net --allow-write skills/deno-memory-profiler/scripts/memory.ts diff baseline
  4. 04

    Phase 2: compare

    deno run --allow-net --allow-read skills/deno-memory-profiler/scripts/memory.ts diff compare bash deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts usage --gc bash deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts sample --duration 10 bash

    deno run --allow-net --allow-read skills/deno-memory-profiler/scripts/memory.ts diff compare bash deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts usage --gc bash deno run --allow-net skills/deno-memor…
  5. 05

    Workflow examples

    Get the current heap state after GC. Good first step to see if memory is unexpectedly high.

    Get the current heap state after GC. Good first step to see if memory is unexpectedly high.Run this while the user triggers their workload. Shows where allocations are happening — useful for finding hot allocation paths.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 24

The documentation asks the agent to run terminal commands or scripts.

deno run --inspect main.ts # default port 9229

Runs scripts

medium · line 25

The documentation asks the agent to run terminal commands or scripts.

deno run --inspect=0.0.0.0:9230 main.ts # custom host/port

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars37SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
commontoolsinc/labs
Skill path
skills/deno-memory-profiler/SKILL.md
Commit
b0ff67d2dde1812680849aa2373df1f49b6faa2f
License
0BSD
Collected
2026-08-05
Default branch
main
View the original SKILL.md

Deno Memory Profiler

Analyze memory in a running Deno process via the V8 inspector CDP protocol.

When to use

Use this skill when the user asks about:

  • Memory usage of a running Deno process
  • Memory leaks or growing heap
  • Heap analysis or heap snapshots
  • Allocation profiling
  • Object retention or constructor counts

The target Deno process must be running with --inspect or --inspect-brk. The default inspector port is 9229.

Prerequisites

The target process must be started with the inspect flag:

deno run --inspect main.ts          # default port 9229
deno run --inspect=0.0.0.0:9230 main.ts  # custom host/port

Available commands

The script is at skills/deno-memory-profiler/scripts/memory.ts. When run_skill_script is available and exactly allowlisted, invoke it with skill="deno-memory-profiler" and path="scripts/memory.ts" instead of constructing a shell command.

All commands accept --port=<port> (default 9229) and --host=<host> (default 127.0.0.1). Output is JSON to stdout; status messages go to stderr.

usage — Quick heap stats

deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts usage
deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts usage --gc

Returns usedSize, totalSize, usagePercent. Use --gc to force garbage collection before measuring for a more accurate picture.

eval <expression> — Evaluate in target process

deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts eval "Deno.memoryUsage()"
deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts eval "globalThis.myCache.size"

Runs an expression in the target via Runtime.evaluate and prints the result. Useful for inspecting specific objects.

sample — Allocation sampling

deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts sample --duration 10
deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts sample --duration 5 --top 50 --interval 16384

Profiles allocations for the given duration. Returns the top allocation sites sorted by bytes allocated. Options:

  • --duration <seconds> — sampling time (default 5)
  • --top <N> — number of sites to show (default 30)
  • --interval <bytes> — sampling interval (default 32768; lower = more detail, more overhead)

snapshot — Full heap snapshot summary

deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts snapshot

Takes a V8 heap snapshot and produces a summary: total size, top 20 constructors by shallow size, top 10 by instance count, and duplicate strings (>50 occurrences).

diff baseline / diff compare — Leak detection

# Phase 1: capture baseline
deno run --allow-net --allow-write skills/deno-memory-profiler/scripts/memory.ts diff baseline

# ... user triggers suspected leaky operation ...

# Phase 2: compare
deno run --allow-net --allow-read skills/deno-memory-profiler/scripts/memory.ts diff compare

Two-phase leak detection. Baseline saves a snapshot summary to /tmp/memory-baseline-{port}.json. Compare takes a new snapshot and reports:

  • Total heap growth (bytes and percent)
  • New constructors not in baseline
  • Constructors with increased instance count or size
  • Constructors that disappeared

Workflow examples

Quick health check

deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts usage --gc

Get the current heap state after GC. Good first step to see if memory is unexpectedly high.

Allocation profiling

deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts sample --duration 10

Run this while the user triggers their workload. Shows where allocations are happening — useful for finding hot allocation paths.

Leak detection

# 1. Take baseline while idle
deno run --allow-net --allow-write skills/deno-memory-profiler/scripts/memory.ts diff baseline

# 2. Ask user to trigger the suspected leaky operation several times

# 3. Compare
deno run --allow-net --allow-read skills/deno-memory-profiler/scripts/memory.ts diff compare

The diff shows what grew. Focus on constructors with large deltaCount or deltaSize.

Deep inspection

# Full snapshot breakdown
deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts snapshot

# Then poke at specific objects
deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts eval "Deno.memoryUsage()"
deno run --allow-net skills/deno-memory-profiler/scripts/memory.ts eval "globalThis.myMap?.size"

Interpreting results

  • Large shallow size with high count: Usually arrays, buffers, or string data being retained. Look at what constructor owns them and trace back to why they're kept alive.
  • Growing constructors between baseline and compare: These are likely leaks — objects being created but not released. Focus on the ones with the highest deltaCount.
  • High allocation count in sampling: Hot allocation paths that may benefit from object pooling, caching, or restructuring to reduce GC pressure.
  • Duplicate strings: Many identical strings suggest opportunities for string interning or indicates a pattern creating redundant string copies.
  • New constructors in diff compare: Types that didn't exist at baseline may indicate new subsystems being loaded, or leaked closures/objects from the triggered operation.

Limitations

  • Snapshot size: Snapshot parsing can be slow and memory-intensive for very large heaps (>500MB). The profiler process itself needs memory to parse the JSON.
  • Sampling is duration-based: Coordinate with the user on timing — the sampling period should overlap with the workload being profiled.
  • No retained size: Computing retained size requires building a dominator tree, which is expensive. Shallow size grouped by constructor is provided instead, which is still very useful for identifying leaks and large allocations.
  • Single target: Connects to the first debuggable target. If multiple isolates are running, only the first is profiled.
  • Inspector must be enabled: The target process must be running with --inspect. There's no way to attach to a process that wasn't started with this flag.

Alternatives

Compare before choosing

Computed 10023,835

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 10014,533

prowler-cloud/prowler

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance

Computed 10014,251

wanshuiyin/Auto-claude-code-research-in-sleep

citation-audit

Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.

Computed 9832,671

K-Dense-AI/scientific-agent-skills

dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.