npm-agent-packaging

npm-agent-packaging is a skill for Claude Code from phazurlabs/install-labs. It costs 108 tokens per session (5,292 once invoked), scanned A, original, Apache-2.0.

A guide for packaging Node.js, TypeScript, or JavaScript AI agents as npm packages, which developers can install or run through the npm registry.

In plain words
What is it for?
Use it to prepare package.json, command-line entry points, compiled files, MCP servers, or agents intended for npm publishing and installation.
Why use it?
It explains how to distribute an agent across macOS, Windows, and Linux and make it runnable with commands such as npx when Node.js is available.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is "inspect": "npx @modelcontextprotocol/inspector node dist/cli.js",.

Part of the install-labs plugin — 12 skills, 10 commands shipped together

Good fit Use it to prepare package.json, command-line entry points, compiled files, MCP servers, or agents intended for npm publishing and installation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/phazurlabs/install-labs
agentmods
npx agentmods add skills/phazurlabs/install-labs/npm-agent-packaging

Made for: Claude Code.

Or install install-labs, the plugin that ships this one along with the rest of its 12 skills, 10 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for npm-agent-packaging

README.md
[![agentmods](https://agentmods.dev/badge/skills/phazurlabs/install-labs/npm-agent-packaging.svg)](https://agentmods.dev/skills/phazurlabs/install-labs/npm-agent-packaging)
Your own site
<a href="https://agentmods.dev/skills/phazurlabs/install-labs/npm-agent-packaging"><img src="https://agentmods.dev/badge/skills/phazurlabs/install-labs/npm-agent-packaging.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,292 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.05292
Opus 5 $0.00054 $0.02646
Sonnet 5 $0.00022 $0.01058
Haiku 4.5 $0.00011 $0.00529

Measured 7d ago against content hash 1924f0a9198f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

npm-agent-packaging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/npm-agent-packaging/SKILL.md · 629 lines

How it starts

The opening of the file, as written. The whole thing — 629 lines — stays where its author put it; the contents beside it link to each section on GitHub.

npm Agent Packaging

When to Use npm Distribution

npm is the right distribution channel when:

  • Your agent is built with Node.js, TypeScript, or JavaScript.
  • You are packaging an MCP server (the primary consumer of npx-based distribution).
  • Your agent uses the Vercel AI SDK, LangChain.js, or any Node-based AI framework.
  • You want users to run your agent with a single npx command, zero prior setup.
  • You need cross-platform distribution (macOS, Windows, Linux) without separate binaries.
  • Your target audience is developers who already have Node.js installed.

npm gives you: a global registry, dependency resolution, semantic versioning, provenance attestation, and the npx zero-install runner. No other JavaScript distribution method matches this combination.


package.json Anatomy for Agent Distribution

Every field matters. Here is the annotated structure for a distributable AI agent.

{
  "name": "@your-org/agent-name",
  "version": "1.0.0",
  "description": "One-line description of what this agent does",
  "type": "module",
  "bin": {
    "agent-name": "./dist/cli.js"
  },
  "main": "./dist/index.js",
  "types": "./dist/index.d.ts",
  "files": [
    "dist/"
  ],
  "scripts": {
    "build": "tsc",
    "dev": "tsc --watch",
    "start": "node dist/cli.js",
    "inspect": "npx @modelcontextprotocol/inspector node dist/cli.js",
    "lint": "eslint src/",
    "test": "vitest run",
    "prepublishOnly": "npm run build && npm run test"
  },
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.12.0",
    "zod": "^3.23.0"
  },
  "devDependencies": {
    "@types/node": "^22.0.0",
    "typescript": "^5.7.0",
    "vitest": "^3.0.0"
  },
  "engines": {
    "node": ">=18.0.0"
  },
  "keywords": [
    "ai-agent",
    "mcp",
    "mcp-server",
    "cli",
    "automation"
  ],
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "https://github.com/your-org/agent-name"
  }
}

Field-by-Field Breakdown

name -- Use a scoped name (@your-org/agent-name). Scoped packages avoid name collisions on the npm registry and signal organizational ownership. Unscoped names are fine for personal projects but become a liability at scale.

Read the full file on GitHub · 629 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 629 lines · 108 tokens per session scan A 1924f0a9198f

Subscribe to this mod's changes

npm-agent-packaging is a skill published in the GitHub repository phazurlabs/install-labs (3 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 108 tokens to every session and 5,292 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.