Agent skill

Node Inspect Debugger

by BlackBeltTechnology in BlackBeltTechnology/pi-agent-dashboard

See runtime state a console.log cannot reach — set real breakpoints, step, and dump the scope chain of a paused Node/TypeScript process.

MITAuto-check passedFrontend & Design

Install Node Inspect Debugger

skills CLI
$ npx skills add BlackBeltTechnology/pi-agent-dashboard --skill node-inspect-debugger -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install BlackBeltTechnology/pi-agent-dashboard node-inspect-debugger --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/BlackBeltTechnology/pi-agent-dashboard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/eng-disciplines/.pi/skills/node-inspect-debugger .claude/skills/node-inspect-debugger && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
node-inspect-debugger
GitHub stars
316
Token cost
~2.3k tokens
SKILL.md length
978 words
Files
2 (incl. scripts)
Skills in repo
66
Repo updated
First seen
Licence
MIT

At a glance

See runtime state a console.log cannot reach — set real breakpoints, step, and dump the scope chain of a paused Node/TypeScript process.

  • Tasks that involve Responsive design
  • SKILL.md covers Overview, When to Use, Two tiers and Tier 1 — the node inspect REPL…, plus 5 more sections
  • Runs TypeScript scripts from its folder; calls node, curl and npx

What it does

Node Inspect Debugger is an agent skill from BlackBeltTechnology/pi-agent-dashboard. See runtime state a console.log cannot reach — set real breakpoints, step, and dump the scope chain of a paused Node/TypeScript process. Use on "set a breakpoint", "inspect runtime state", "console.log isn't enough", "step through this", "what's in this closure at runtime", "attach a debugger". Not a logging or observability-setup workflow.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/cdp-inspect.ts`).

It sits in Frontend & Design, covering Responsive design. It works with TypeScript. The repository describes itself as: Real-time web dashboard for pi coding-agent sessions. Multi-session view, live chat mirroring, integrated terminal, diff viewer, pi-flows execution, and mobile-first remote… The licence is MIT.

When your agent uses it

  • Tasks that involve Responsive design

Example prompts

  • “set a breakpoint”
  • “inspect runtime state”
  • “console.log isn”
  • “/node-inspect-debugger”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit e23e533. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • curl
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Node Inspect Debugger loads about 2.3k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 978 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from BlackBeltTechnology/pi-agent-dashboard at commit e23e533, republished under its MIT licence (© BlackBeltTechnology). 978 words, ~2,290 tokens.

Download SKILL.mdSave it as .claude/skills/node-inspect-debugger/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
node-inspect-debugger
description
See runtime state a console.log cannot reach — set real breakpoints, step, and dump the scope chain of a paused Node/TypeScript process. Use on "set a breakpoint", "inspect runtime state", "console.log isn't enough", "step through this", "what's in this closure at runtime", "attach a debugger". Not a logging or observability-setup workflow.
related_skills
systematic-debugging, observability-instrumentation

Node Inspect Debugger

Overview

console.log is a guess with a print statement attached — you have to already suspect where to look and what to print. A breakpoint inverts that: you stop the world at a line and read every local and closure variable in the frame, walk the call stack, and evaluate expressions in the paused context. When the bug lives in state a log can't cheaply reach — a closure captured three calls ago, a paused async frame, the Electron main process, the internals of a long-lived WebSocket server — the inspector is the tool.

This skill is the TOOL half of a pair; the METHOD is systematic-debugging (its Phase 1 "gather evidence" and Phase 3 "test one variable" are exactly when you reach for a breakpoint).

When to Use

Reach for the inspector when the state you need is expensive or impossible to log:

  • The dashboard server (packages/server, TypeScript run directly via the native loader, or jiti on the PI_DASHBOARD_TS_LOADER=jiti opt-in) — request handlers whose failure depends on accumulated in-memory state.
  • The restart orchestrator / PTY workers (restart-helper.ts) — a detached process whose closure state you can't console.log from the parent.
  • Dual WebSocket server closure state — connection maps and buffers held in closures across the bridge and browser servers.
  • The Electron main process — lifecycle/bootstrap state that never reaches a browser console.
  • The bridge extension — code running inside every pi session, where adding logs means reloading every session.

If a single well-placed console.log would answer the question, use the log. The inspector earns its setup cost when the state is deep, closure-bound, or in a process you can't easily instrument.

Two tiers

TierUse whenInterface
REPL (node inspect)interactive, one-off, you're drivingthe node inspect command REPL
Programmatic CDPscripted, repeatable, or attaching from another processscripts/cdp-inspect.ts (this skill)

Tier 1 — the node inspect REPL cheat-sheet

node inspect opens a REPL against the inspector. Core commands:

CommandDoes
sb('file.ts', N)set breakpoint at line N of file.ts (see jiti note below — .ts works directly)
ccontinue to next breakpoint
n / s / ostep next / step-in / step-out
btbacktrace (call stack of the paused frame)
list(5)show 5 source lines around the pause point
repldrop into a REPL evaluated in the paused frame's scope — inspect any local
watch('expr')re-evaluate expr at every pause
exec exprevaluate one expression in the paused frame
restart / killrestart / kill the inspected process

In repl mode you can read any in-scope variable by name — this is the fastest way to answer "what is x right now?".

Tier 2 — pi-dashboard native-loader launch (the default)

The dashboard server runs TypeScript directly (no dist/*.js build) through the Node-native loader @blackbelt-technology/pi-dashboard-shared/platform/native-ts-register.mjs (module.stripTypeScriptTypes, transform mode). Launch the target with the inspector and that register module:

bash
node --inspect-brk=<port> --enable-source-maps --import <native-ts-register-url> cli.ts

Resolve the URL by package specifier, never by path arithmetic:

js
import { createRequire } from "node:module";
import { pathToFileURL } from "node:url";
const req = createRequire(process.argv[1] ?? import.meta.url);
const hook = pathToFileURL(req.resolve("@blackbelt-technology/pi-dashboard-shared/platform/native-ts-register.mjs")).href;
  • Type erasure replaces types with whitespace, so .ts lines stay aligned for ordinary code; TS-only constructs that transform mode rewrites (enum, namespace, parameter properties) may shift columns. Keep --enable-source-maps on.
  • The log header names the running loader: grep "launch (parent pid" ~/.pi/dashboard/server.log | tail -1.

Tier 2b — jiti launch (PI_DASHBOARD_TS_LOADER=jiti opt-in, spike-verified)

Under the jiti fallback (PI_DASHBOARD_TS_LOADER=jiti) the server runs TypeScript through jiti. Launch the target with the inspector and jiti's register hook:

bash
node --inspect-brk=<port> --enable-source-maps --import <jiti-register-hook-url> cli.ts
  • --inspect-brk=<port> halts at the very first line so you can set breakpoints before anything runs.
  • --enable-source-maps is not required for line-level breakpoints (jiti is line-preserving, see pitfall below) but keep it: it gives exact column precision and correct Error.stack line numbers.
Show full SKILL.md (402 more words)Show less
Locating the jiti register hook (do not hard-code the path)

The register hook path differs across local / standalone / global installs. Resolve it the same way this repo's launcher (packages/server/bin/pi-dashboard.mjs) does — via createRequire, trying each supported jiti package:

js
import { createRequire } from "node:module";
import { dirname, join } from "node:path";
import { pathToFileURL } from "node:url";

const req = createRequire(import.meta.url);       // or createRequire(process.argv[1])
const JITI_PACKAGES = ["jiti", "@mariozechner/jiti"];
let hook;
for (const pkg of JITI_PACKAGES) {
  try {
    const pkgJson = req.resolve(`${pkg}/package.json`);
    hook = pathToFileURL(join(dirname(pkgJson), "lib", "jiti-register.mjs")).href;
    break;
  } catch { /* try next */ }
}
// pass `hook` to `node --import <hook> cli.ts`
Attaching to the live server (not a fresh launch)

To debug the already-running server instead of a cold --inspect-brk launch, start it with the inspector enabled and discover the port:

bash
NODE_OPTIONS="--inspect=0" pi-dashboard start        # 0 = pick a free port
curl -s http://127.0.0.1:<port>/json/list            # find the webSocketDebuggerUrl / port

--inspect=0 avoids a port collision when something already holds the default 9229.

Pitfalls

The upstream "emitted JS" pitfall does NOT apply to jiti — corrected

A common guide warns: "breakpoints hit the emitted JS, not your .ts, and node inspect doesn't follow sourcemaps." This is false for this repo. jiti transpiles line-preserving and registers the compiled JS under the .ts URL (1:1 line alignment). There is no separate dist/*.js file and no sourcemap indirection to fight.

Consequences you can rely on:

  • sb('cli.ts', 42) in the plain node inspect REPL binds directly to line 42 of the .ts source and hits.
  • Debugger.setBreakpointByUrl('cli.ts', line) over CDP binds to the .ts line.
  • CDP may report sourceMapURL: "" (jiti attaches none) — this does not mean the breakpoint won't bind. It binds and hits anyway.

Do not port the emitted-JS workaround; it's solving a problem jiti doesn't create.

Pending breakpoints return empty locations but still hit

A breakpoint set before the target script has parsed (e.g. right after the --inspect-brk halt) returns locations: [] at set-time. This is not a failure — the breakpoint is deferred and resolves and hits once the script parses. Setting a breakpoint after the script has parsed returns populated locations. Do not treat an empty locations array at set-time as "the breakpoint didn't take."

Programmatic CDP — scripts/cdp-inspect.ts

For scripted or repeatable inspection, this skill ships a dependency-free TypeScript helper. It uses Node 24's global WebSocket — no chrome-remote-interface dependency. It attaches to a paused target, sets a .ts breakpoint, resumes past the entry halt, and on the hit prints the paused frame plus every local and closure variable:

bash
# 1. launch the target halted (see jiti recipe above), noting <port>
# 2. attach + break at a line inside a function:
npx tsx packages/eng-disciplines/.pi/skills/node-inspect-debugger/scripts/cdp-inspect.ts <port> <ts-url> <line>
# prints:  PAUSED at <file>:<line> fn=<name>
#          local    cfg = Object
#          local    doubled = 42
#          closure  label = "HELLO"

Use it as the ready-made "dump the frame" step whenever the REPL's interactivity isn't worth it.

Verification

  • The launch recipe used the selected loader (native register or jiti hook) resolved via createRequire, not a hard-coded path
  • .ts breakpoints were set directly (no emitted-JS workaround)
  • An empty locations at set-time was treated as deferred, not failed
  • The paused frame's locals were read (via repl, exec, or cdp-inspect.ts) — the actual state, not a guess

© BlackBeltTechnology, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in packages/eng-disciplines/.pi/skills/node-inspect-debugger of BlackBeltTechnology/pi-agent-dashboard.

  • SKILL.md
  • scripts/cdp-inspect.ts

Open the folder on GitHubat commit e23e533

Compare with similar skills

Node Inspect Debugger next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Node Inspect Debugger compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Node Inspect Debugger this skillBlackBeltTechnology/pi-agent-dashboard316—~2.3kAutomated safety check: PassMIT
Local Testinglobehub/lobe-ui2.2k—~2.1kAutomated safety check: PassMIT
Frontend Engineer Workflownanocoai/nanoclaw31k—~1.5kAutomated safety check: PassMIT
Trip Map Builderhiyeshu/trip-map-builder242—~1.7kAutomated safety check: PassNone
Previewhanamizuki/solopreneur152—~5.2kAutomated safety check: PassMIT
Python DebugpyKevin100202/Rocket-Design-and-Manufacturing-Automation-Program-from-Shenzhen22highschool170—~638Automated safety check: PassNone

Similar skills

  • Local Testing

    lobehub/lobe-ui

    Local browser verification for the lobe-ui component library and documentation site.

    2.2k GitHub stars~2.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Sets a build, test and verify routine for web projects: write typed, accessible code and never call work done until it is checked in a real browser with screenshots.

    31k GitHub stars~1.5k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Trip Map Builder

    hiyeshu/trip-map-builder

    End-to-end trip planning: gather user constraints, build a reference itinerary, research locations and dining signals via 大众点评 + 小红书, then generate an interactive mobile-first map page (Leaflet +…

    242 GitHub stars~1.7k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Preview

    hanamizuki/solopreneur

    Create an interactive HTML preview of any proposal, plan, idea, doc, brief, or spec and land it in the browsable local Preview Library by default (opens under file:// with a catalog sidebar and…

    152 GitHub stars~5.2k tokensUpdated 11 days ago
    Frontend & DesignAuto-check passed
  • Python Debugpy

    Kevin100202/Rocket-Design-and-Manufacturing-Automation-Program-from-Shenzhen22highschool

    Debug Python with pdb, breakpoint(), post-mortem inspection, and debugpy remote attach.

    170 GitHub stars~638 tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed

More from BlackBeltTechnology/pi-agent-dashboard

All 66 skills in this repo
  • Browser

    BlackBeltTechnology/pi-agent-dashboard

    Browser automation via the agent-browser CLI. An agent skill from BlackBeltTechnology/pi-agent-dashboard.

    316 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • CI Troubleshoot

    BlackBeltTechnology/pi-agent-dashboard

    Diagnose failed GitHub Actions runs for pi-agent-dashboard: the 11-file workflow taxonomy, affected-test selection, the release pipeline, known failure modes, and how to read gh run logs and…

    316 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Debug Dashboard

    BlackBeltTechnology/pi-agent-dashboard

    Diagnose problems in the running pi-agent-dashboard system: server.log, /api/health, bridge WebSocket connectivity, vitest triage, known-issue FAQ entries.

    316 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Implement

    BlackBeltTechnology/pi-agent-dashboard

    Disciplined implementation in pi-agent-dashboard: the rebuild matrix (extension→reload, server→restart, client→build+restart, openspec-apply→full rebuild) plus the project's code discipline rules.

    316 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Pi Dashboard

    BlackBeltTechnology/pi-agent-dashboard

    Monitor and control the pi-dashboard server. An agent skill from BlackBeltTechnology/pi-agent-dashboard.

    316 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Session To Guideline

    BlackBeltTechnology/pi-agent-dashboard

    Turn a pi session into a Markdown "how-we-did-it" collaboration guideline: reads the session's JSONL transcript and synthesizes a reusable playbook of which prompts worked, what had to be steered…

    316 GitHub stars~3.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Node Inspect Debugger

What does Node Inspect Debugger do?

See runtime state a console.log cannot reach — set real breakpoints, step, and dump the scope chain of a paused Node/TypeScript process. Node Inspect Debugger is an agent skill from BlackBeltTechnology/pi-agent-dashboard.log cannot reach — set real breakpoints, step, and dump the scope chain of a paused Node/TypeScript process.

When should I use Node Inspect Debugger?

Node Inspect Debugger fits situations like: tasks that involve Responsive design.

How do I install Node Inspect Debugger in Claude Code?

Run `npx skills add BlackBeltTechnology/pi-agent-dashboard --skill node-inspect-debugger -a claude-code`. Or copy the skill folder (packages/eng-disciplines/.pi/skills/node-inspect-debugger in BlackBeltTechnology/pi-agent-dashboard) into .claude/skills/node-inspect-debugger in your project. Claude Code loads it when a task matches its description.

How do I install Node Inspect Debugger in Codex?

Run `npx skills add BlackBeltTechnology/pi-agent-dashboard --skill node-inspect-debugger -a codex`. Or copy the skill folder (packages/eng-disciplines/.pi/skills/node-inspect-debugger in BlackBeltTechnology/pi-agent-dashboard) into .agents/skills/node-inspect-debugger in your project. Codex loads it when a task matches its description.

Can I use Node Inspect Debugger in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BlackBeltTechnology/pi-agent-dashboard --skill node-inspect-debugger -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/node-inspect-debugger, .gemini/skills/node-inspect-debugger, .github/skills/node-inspect-debugger and .opencode/skills/node-inspect-debugger in your project.

What does Node Inspect Debugger need to run?

Going by SKILL.md and its folder, Node Inspect Debugger needs TypeScript for the scripts in its folder and the command-line tools its instructions call (node, curl and npx). Our summary lists: Node.js.

Does Node Inspect Debugger access the network?

SKILL.md contains no URLs. Its commands use curl and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Node Inspect Debugger safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Node Inspect Debugger use?

Node Inspect Debugger is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Node Inspect Debugger use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Node Inspect Debugger?

Skills that share tags, products or a category with Node Inspect Debugger: Local Testing (lobehub/lobe-ui, 2.2k stars), Frontend Engineer Workflow (nanocoai/nanoclaw, 31k stars), Trip Map Builder (hiyeshu/trip-map-builder, 242 stars) and Preview (hanamizuki/solopreneur, 152 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Node Inspect Debugger?

BlackBeltTechnology (a GitHub organization) maintains it in BlackBeltTechnology/pi-agent-dashboard, which has 316 GitHub stars. The repository holds 66 skills in this directory. The repository was last updated on October 6, 2026.

Source: BlackBeltTechnology/pi-agent-dashboard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.