Skip to content
Back to skills

Ns Download Asset

ASecurity

Downloads a raw N|Solid diagnostic asset (heap snapshot, CPU profile, or heap profile) to local disk by asset ID. Use when the user asks to download, save, export, or pull an asset file locally, or needs the raw file for external tools such as snapshot-parser, Chrome DevTools, or diffing. Do not use for analyzing assets — ns-analyze-asset covers that.

  • 6 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added August 31, 2026
toolsshellnoderails

Works with

  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned August 31, 2026

npx -y skills add nodesource/nsolid-plugin --skill ns-download-asset --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ns Download Asset?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ns Download Asset
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nodesource-ns-download-asset/badge)](https://www.skillsdirectory.com/skills/nodesource-ns-download-asset)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ns-download-asset
description: >-
  Downloads a raw N|Solid diagnostic asset (heap snapshot, CPU profile, or heap profile) to local disk by asset ID. Use when the user asks to download, save, export, or pull an asset file locally, or needs the raw file for external tools such as snapshot-parser, Chrome DevTools, or diffing. Do not use for analyzing assets — ns-analyze-asset covers that.
---

## Instructions

### 1. Identify the Asset

- The asset ID comes from the user or from the `assets` MCP tool (filter with `type`, `app`, etc.).
- If the user gives only an app name + asset type, call `assets` and confirm which asset to download before proceeding.
- If the asset was just generated, make sure it is no longer listed in `assets-in-progress` before downloading.

### 2. Resolve the Asset Type

- Map the asset to the script's `assetType`: `cpuprofile` | `heapprofile` | `heapsnapshot`.
- Heap sampling assets use `heapprofile`.

### 3. Resolve the App Name

- Resolve `appName` from the `assets` metadata or the user.
- Fall back to `unknown` only when the app name is genuinely unknown.

### 4. Download

Run the bundled script (use the absolute path of the directory where you read this SKILL.md):

```sh
node "<skill-dir>/fetch-asset.cjs" <assetId> <assetType> <appName>
```

### 5. Report

- Output the file path under `.nsolid/assets/`, the size printed by the script, and that the asset is registered in `.nsolid/assets/index.json`.
- Never open or read the raw file into context.

## Guardrails

- Never download assets via direct HTTP calls, `curl`, or ad hoc shell — only the bundled `fetch-asset.cjs`.
- Never use the MCP `asset` tool even if it appears in the tool list (older console versions still expose it). It is deprecated: it inlines raw data into the response and kills the MCP session with "session expired" on large assets. Always `fetch-asset.cjs`.
- Never read raw asset contents into the AI context — the file is for external tools and the user.
- The script dedupes by asset ID (existing files are reused); do not re-download unnecessarily.
- Do not fabricate analysis from the downloaded file — analyzing assets is `ns-analyze-asset`'s job via `asset-summary`.

Files in this skill

  • SKILL.md2.2 KB
  • fetch-asset.cjs17.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.