ns-generate-asset

Captures CPU profiles, heap samples, heap snapshots, and heap tracking assets from N|Solid-connected Node.js applications.

6|7|Updated Jun 4, 2026
One-click install
npx skills add https://github.com/nodesource/nsolid-plugin --skill ns-generate-asset-nodesource
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ns-generate-asset
Source: https://github.com/nodesource/nsolid-plugin/tree/main/skills/ns-generate-asset
Command: npx skills add https://github.com/nodesource/nsolid-plugin --skill ns-generate-asset-nodesource

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Diagnosing Node.js performance issues requires capturing diagnostic artifacts like CPU profiles and heap snapshots from a running process, which normally involves manual console operations, timing waits, and file downloads. This Skill automates the full capture workflow against an N|Solid console so the asset is collected, waited on, and saved locally for analysis. ## Core Features & Use Cases - Asset Capture: Creates CPU profiles, heap samples, heap snapshots, and heap tracking assets on a selected N|Solid agent with correct duration and thread parameters. - Readiness Polling: Waits with bundled scripts and polls asset readiness with capped retries, distinguishing pending states from real tool errors. - Local Download & Handoff: Downloads the finished asset to .nsolid/assets/ via fetch-asset.cjs and hands off to the ns-analyze-asset skill when analysis is requested. - Use Case: A user reports a memory leak in production. The skill resolves the app and agent, captures a 30-second heap sample, waits for summarization, downloads the .heapprofile, and passes it to the analysis skill. ## Quick Start Capture a CPU profile for my production Node.js app connected to N|Solid and save it locally for analysis.

Frequently Asked Questions about ns-generate-asset

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture a CPU profile from a running Node.js app with N|Solid?▼

Ask to capture a CPU profile for your app; the skill resolves the connected agent, starts a 30-second profile on thread 0, waits for readiness, and downloads the .cpuprofile to .nsolid/assets/ using the bundled fetch-asset.cjs script.

What is the difference between heap snapshot and heap sampling in N|Solid?▼

A heap snapshot captures the full heap state as a .heapsnapshot file, while heap sampling records a statistical allocation sample as a .heapprofile. The skill defaults to heap sampling for general memory concerns and uses snapshots only when explicitly requested.

Can I analyze the captured asset immediately after generation?▼

Yes. If you ask to analyze or interpret the asset, the skill hands off the assetId, type, app name, and local path to the ns-analyze-asset skill after the asset is ready. Heap tracking assets are excluded since they cannot be summarized.

Why does asset capture fail with a credentials error?▼

The download script requires ~/.agents/.nodesource-auth.json containing a consoleUrl and serviceToken. If missing, run the NodeSource plugin login command for your harness to authenticate before capturing assets.

What happens if the asset is not ready after waiting?▼

The skill retries readiness checks up to 12 times with 5-second waits. If still pending, it reports the asset ID and pending state rather than inventing analysis, so you can check again later.