[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758947GHTXFX5K5ZVDEZ259":3,"skill-same:01M758947GHTXFX5K5ZVDEZ259":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":31,"ownerDescription":33,"updatedAt":34,"install":35,"resources":47},"01M758947GHTXFX5K5ZVDEZ259","pm-perf-tracing",null,"Performance-trace Nub package-manager installs using the existing phase timings, structured diagnostics, and sampling-profiler workflow. Use when an install or package-manager operation is unexpectedly slow and the bottleneck needs to be localized before changing code.","nubjs\u002Fnub","nubjs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6785695?v=4","01M7583N3EYYHSNB6FJQXCDMQH","Nub","01M7583N44MVMSN8385QEF3C8V",4440,"MIT","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpm-perf-tracing\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: pm-perf-tracing\ndescription: Performance-trace Nub package-manager installs using the existing phase timings, structured diagnostics, and sampling-profiler workflow. Use when an install or package-manager operation is unexpectedly slow and the bottleneck needs to be localized before changing code.\nmetadata:\n  internal: true\n---\n\n# pm-perf-tracing\n\nHow to performance-trace the nub package manager (install\u002Fresolve\u002Ffetch\u002F**link**) and find where the time actually goes — the method that cracked the hoisted-linker slowness (10.8s → root-caused to a per-file copy loop). Reach for this any time a `nub install` \u002F PM operation is \"mysteriously slow\" — do NOT reverse-engineer from source; the instrumentation already exists, turn it on.\n\n## The two layers that already exist\n\n1. **Phase timings — works under nub TODAY.** `RUST_LOG=debug nub install` emits `phase:\u003Cname> \u003Celapsed>` lines on stderr: `phase:resolve`, `phase:fetch (N packages)`, `phase:link (N files)`, `phase:link_bins`. This alone tells you the coarse split (is it network\u002Fresolve, or linking?). The aube engine wires these through the `tracing` crate.\n\n2. **Rich diagnostics layer — native under nub via `NUB_DIAG_*`.** `aube_util::diag` emits structured JSONL to `NUB_DIAG_FILE=\u003Cpath>` — including, for the linker, one event per file naming the strategy used (`link_clonedir`, `link_reflink`, `link_macos_small_copy`, `link_copy`, `link_hardlink`). This is the load-independent crux for a link-perf question. The full knob set (all off by default, zero cost when unset):\n\n   - `NUB_DIAG_FILE=\u003Cpath>` — JSONL events to a file.\n   - `NUB_DIAG_PRINT=1` — live per-span lines to stderr.\n   - `NUB_DIAG_SUMMARY=1` — end-of-run aggregate table.\n   - `NUB_DIAG_CRITPATH=1` — retain records for the critical-path \u002F lifecycle \u002F starvation analyzers.\n   - `NUB_DIAG_THRESHOLD_MS=\u003Cn>` — filter live prints below `\u003Cn>` ms.\n   - `NUB_DIAG_KERNEL=1` — `getrusage` kernel deltas around phases.\n   - `NUB_BENCH_PHASES_FILE=\u003Cpath>` — per-run phase-timing JSON for the bench harness.\n\n```sh\ncargo build -p nub-cli --profile fast        # dev binary at \u003Cworktree>-target\u002Ffast\u002Fnub\nNUB=\u003Cworktree>-target\u002Ffast\u002Fnub\nNUB_DIAG_FILE=\u002Ftmp\u002Fd.jsonl NUB_DIAG_SUMMARY=1 \"$NUB\" install --offline\ngrep -o '\"name\":\"link_[a-z_]*\"' \u002Ftmp\u002Fd.jsonl | sort | uniq -c     # per-strategy tally\n```\n\n(The diag layer reads `NUB_DIAG_*` under the nub embedder profile via the `diag_env_prefix` hook — no source edit needed. `AUBE_DIAG_*` is NOT read under nub. The `dev-tracing-telemetry` thread \u002F `wiki\u002Fresearch\u002Fdev-tracing-telemetry.md` tracks the optional chrome-trace\u002Fflamegraph export layer on top.)\n\n## The measurement discipline (load-independent — this host is permanently contended)\n\nThe dev box runs load ~30–50 and never goes quiet, so **absolute wall-clock is untrustworthy**. Measure things contention can't ruin:\n\n- **Verified-clean warm loop:** `rm -rf node_modules` and *assert it's gone*, warm store already populated, `--offline` (proves zero network: `phase:fetch` shows `0 packages`), and check **rc=0** on every run (a timing from an errored install — e.g. npm's `rm: Directory not empty` purge failures → rc=254 — is garbage).\n- **Strategy tally, not seconds:** \"75,079\u002F76,167 files took `link_macos_small_copy`, 0 took `link_clonedir`\" is a fact regardless of load. That's what proves a design gap.\n- **Back-to-back A\u002FB on the same box, report the RATIO:** e.g. hoisted vs `--node-linker isolated` on the same fixture, same load window → the relative delta (≈26×) is robust even when both absolutes are inflated.\n- For a real clean wall-clock number, hand it to a quiet machine \u002F CI runner — never block on this box settling.\n\n## Layout matters — always check which linker path runs\n\nnub mirrors the incumbent layout: an npm\u002Fyarn\u002Fbun lockfile → **hoisted** layout (`link.rs` → `hoisted::link_hoisted_importer`); nub-identity \u002F `--node-linker isolated` → **isolated** layout (`materialize_into`, the only path with the whole-dir `clonefile(2)` fast path). They have completely different perf characteristics. When a perf question is about linking, run BOTH (`--node-linker isolated` vs default) and diff — that A\u002FB is what localized the hoisted-linker gap.\n\n## When spans aren't enough — sampling profiler\n\nSpan\u002FJSONL instrumentation can distort a syscall-bound, parallel pass (observer effect). For \"where inside the link phase do the syscalls go\" use a sampling profiler on a **release** build: `samply record -- \u003CNUB> install --offline` (macOS\u002FLinux), or `cargo flamegraph`. Spans tell you *which phase\u002Fstrategy*; the sampler tells you *which syscalls\u002Ffunctions* dominate.\n\n## Fixtures\n\n- `\u002Ftmp\u002Fcoffee2-demo` — CoffeeScript 2.0.1, npm `lockfileVersion:1`, 519 pkgs \u002F ~76k hoisted files. The canonical heavy-hoisted-layout fixture.\n- A minimal hoisted repro: a `package.json` + `package-lock.json` with `webpack@3.6.0` + `underscore` (no `node_modules`).\n\n## The one-liner to remember\n\n`RUST_LOG=debug nub install` for the phase split; if it's `phase:link`, set `NUB_DIAG_FILE=…` for the per-file strategy tally; A\u002FB against `--node-linker isolated`; judge by strategy-tally + ratio, never the contended absolute.\n","# pm-perf-tracing\n\nHow to performance-trace the nub package manager (install\u002Fresolve\u002Ffetch\u002F**link**) and find where the time actually goes — the method that cracked the hoisted-linker slowness (10.8s → root-caused to a per-file copy loop). Reach for this any time a `nub install` \u002F PM operation is \"mysteriously slow\" — do NOT reverse-engineer from source; the instrumentation already exists, turn it on.\n\n## The two layers that already exist\n\n1. **Phase timings — works under nub TODAY.** `RUST_LOG=debug nub install` emits `phase:\u003Cname> \u003Celapsed>` lines on stderr: `phase:resolve`, `phase:fetch (N packages)`, `phase:link (N files)`, `phase:link_bins`. This alone tells you the coarse split (is it network\u002Fresolve, or linking?). The aube engine wires these through the `tracing` crate.\n\n2. **Rich diagnostics layer — native under nub via `NUB_DIAG_*`.** `aube_util::diag` emits structured JSONL to `NUB_DIAG_FILE=\u003Cpath>` — including, for the linker, one event per file naming the strategy used (`link_clonedir`, `link_reflink`, `link_macos_small_copy`, `link_copy`, `link_hardlink`). This is the load-independent crux for a link-perf question. The full knob set (all off by default, zero cost when unset):\n\n   - `NUB_DIAG_FILE=\u003Cpath>` — JSONL events to a file.\n   - `NUB_DIAG_PRINT=1` — live per-span lines to stderr.\n   - `NUB_DIAG_SUMMARY=1` — end-of-run aggregate table.\n   - `NUB_DIAG_CRITPATH=1` — retain records for the critical-path \u002F lifecycle \u002F starvation analyzers.\n   - `NUB_DIAG_THRESHOLD_MS=\u003Cn>` — filter live prints below `\u003Cn>` ms.\n   - `NUB_DIAG_KERNEL=1` — `getrusage` kernel deltas around phases.\n   - `NUB_BENCH_PHASES_FILE=\u003Cpath>` — per-run phase-timing JSON for the bench harness.\n\n```sh\ncargo build -p nub-cli --profile fast        # dev binary at \u003Cworktree>-target\u002Ffast\u002Fnub\nNUB=\u003Cworktree>-target\u002Ffast\u002Fnub\nNUB_DIAG_FILE=\u002Ftmp\u002Fd.jsonl NUB_DIAG_SUMMARY=1 \"$NUB\" install --offline\ngrep -o '\"name\":\"link_[a-z_]*\"' \u002Ftmp\u002Fd.jsonl | sort | uniq -c     # per-strategy tally\n```\n\n(The diag layer reads `NUB_DIAG_*` under the nub embedder profile via the `diag_env_prefix` hook — no source edit needed. `AUBE_DIAG_*` is NOT read under nub. The `dev-tracing-telemetry` thread \u002F `wiki\u002Fresearch\u002Fdev-tracing-telemetry.md` tracks the optional chrome-trace\u002Fflamegraph export layer on top.)\n\n## The measurement discipline (load-independent — this host is permanently contended)\n\nThe dev box runs load ~30–50 and never goes quiet, so **absolute wall-clock is untrustworthy**. Measure things contention can't ruin:\n\n- **Verified-clean warm loop:** `rm -rf node_modules` and *assert it's gone*, warm store already populated, `--offline` (proves zero network: `phase:fetch` shows `0 packages`), and check **rc=0** on every run (a timing from an errored install — e.g. npm's `rm: Directory not empty` purge failures → rc=254 — is garbage).\n- **Strategy tally, not seconds:** \"75,079\u002F76,167 files took `link_macos_small_copy`, 0 took `link_clonedir`\" is a fact regardless of load. That's what proves a design gap.\n- **Back-to-back A\u002FB on the same box, report the RATIO:** e.g. hoisted vs `--node-linker isolated` on the same fixture, same load window → the relative delta (≈26×) is robust even when both absolutes are inflated.\n- For a real clean wall-clock number, hand it to a quiet machine \u002F CI runner — never block on this box settling.\n\n## Layout matters — always check which linker path runs\n\nnub mirrors the incumbent layout: an npm\u002Fyarn\u002Fbun lockfile → **hoisted** layout (`link.rs` → `hoisted::link_hoisted_importer`); nub-identity \u002F `--node-linker isolated` → **isolated** layout (`materialize_into`, the only path with the whole-dir `clonefile(2)` fast path). They have completely different perf characteristics. When a perf question is about linking, run BOTH (`--node-linker isolated` vs default) and diff — that A\u002FB is what localized the hoisted-linker gap.\n\n## When spans aren't enough — sampling profiler\n\nSpan\u002FJSONL instrumentation can distort a syscall-bound, parallel pass (observer effect). For \"where inside the link phase do the syscalls go\" use a sampling profiler on a **release** build: `samply record -- \u003CNUB> install --offline` (macOS\u002FLinux), or `cargo flamegraph`. Spans tell you *which phase\u002Fstrategy*; the sampler tells you *which syscalls\u002Ffunctions* dominate.\n\n## Fixtures\n\n- `\u002Ftmp\u002Fcoffee2-demo` — CoffeeScript 2.0.1, npm `lockfileVersion:1`, 519 pkgs \u002F ~76k hoisted files. The canonical heavy-hoisted-layout fixture.\n- A minimal hoisted repro: a `package.json` + `package-lock.json` with `webpack@3.6.0` + `underscore` (no `node_modules`).\n\n## The one-liner to remember\n\n`RUST_LOG=debug nub install` for the phase split; if it's `phase:link`, set `NUB_DIAG_FILE=…` for the per-file strategy tally; A\u002FB against `--node-linker isolated`; judge by strategy-tally + ratio, never the contended absolute.\n",{"name":5,"metadata":24,"description":7},{"internal":25},true,"main","9b734566fd36ceed8379f67a92291bc68af60801",".claude\u002Fskills\u002Fpm-perf-tracing",71,"https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub","https:\u002F\u002Fnubjs.com","https:\u002F\u002Fgithub.com\u002Fnubjs","The all-in-one Node.js toolkit","2026-11-14 14:11:35",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":25},[37,40,43],{"tool":38,"command":39},"npx","npx skills add nubjs\u002Fnub --skill pm-perf-tracing",{"tool":41,"command":42},"bunx","bunx skills add nubjs\u002Fnub --skill pm-perf-tracing",{"tool":44,"command":45},"pnpm","pnpm dlx skills add nubjs\u002Fnub --skill pm-perf-tracing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpm-perf-tracing\u002FSKILL.md",[],[49,55,61,68,75,82],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M758BSH88RVXBG8TPCT427TY","nub","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002Fskills\u002Fnub\u002FSKILL.md",[],[],{"skillNo":56,"name":51,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M758BKPRHXS5MS27WG908PBG","This project uses nub, a single Rust CLI that runs on the project's installed Node and replaces the everyday Node toolchain. ALWAYS prefer nub over node, bun, npm, npx, pnpm, and yarn for: executing JS\u002FTS files, running package.json scripts, the npx-equivalent, installing dependencies, watch mode, and Node version management. Surfaces whenever you would otherwise reach for node\u002Fbun\u002Fnpm\u002Fnpx or a package manager.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002Fsite\u002Fpublic\u002Fskill.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M758BCR8A21H8P4TQ0YRHTC7","worktree","Create and manage isolated git worktrees for parallel build\u002Ftest\u002Flanding work on the nub repo. Invoke (via the Skill tool) whenever you need a fresh worktree to land a change, when you want to know what `.worktreeinclude` does or how to add an entry, or when cleaning up after a merge. Encodes the one-command setup (`nub scripts\u002Fnew-worktree.ts \u003Cslug>` or `node …`) that bakes in the proven recipe — worktree off origin\u002Fmain (vendor\u002Faube is plain in-tree files now, no submodule init), the shared CARGO_TARGET_DIR (`~\u002F.cache\u002Fnub\u002Fshared-target`) that all worktrees reuse, and applying `.worktreeinclude` — plus the eagerly-pull-the-shared-tree discipline and the safe cleanup path. Pairs with the `dev-loop` build skill.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworktree\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M758B9NZ1GQMD1A6B25NK0D9","windows-vm-test","Run ad-hoc Nub tests and debugging probes in the maintainer's existing local Windows 11 ARM64 QEMU\u002FHVF VM when its external disk and runbook are present. Use for interactive win32-arm64 or Windows-on-ARM x64-emulation checks; use ci-adhoc-test for true x64-native behavior or when the local VM is unavailable.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwindows-vm-test\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M758B2JHMBB6YJTGYSJR65S4","visual-review","Verify UI\u002Flayout\u002Fstyling changes are correct by computing occlusion, clipping, and alignment from the browser's resolved paint order via the chrome-devtools MCP `evaluate_script` tool — instead of eyeballing a flat screenshot. Invoke BEFORE declaring any UI, site, or styling\u002Flayout change correct. Screenshots have no depth buffer, so z-index\u002Focclusion\u002Fclip bugs are exactly where \"just look at it\" fails; the `evaluate_script` routines below turn those fuzzy visual judgments into deterministic measurements — including optical center-of-mass, which measures the glyph ink's true visual center so differently-sized labels can be aligned by more than eye.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fvisual-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M758AWPM7CE440NBAYJHD44J","type-declarations","Add, audit, or update @nubjs\u002Ftypes declarations for Nub runtime APIs. Use whenever Nub adds or changes a user-visible global, built-in method, module loader type, or TC39 proposal; when TypeScript or @types\u002Fnode gains an overlapping declaration; and before every release to reconcile runtime changes since the previous tag. Covers conflict-safe global augmentation, compiler-version routing, fixture matrices, and package verification.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftype-declarations\u002FSKILL.md",[],[]]