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.
git clone --depth 1 https://github.com/phazurlabs/install-labsnpx agentmods add skills/phazurlabs/install-labs/npm-agent-packagingWrote 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.
[](https://agentmods.dev/skills/phazurlabs/install-labs/npm-agent-packaging)<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>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.
| Model | Per session | Once 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 |
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.
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
npxcommand, 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.
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.
- 7d ago First seen · 629 lines · 108 tokens per session scan A 1924f0a9198f
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.
Other skills, from other repositories
local-ci
Run GitHub Actions workflows locally with pause-on-failure for AI-agent-driven CI iteration.
local-ci
Run GitHub Actions CI locally with Local CI to validate changes before pushing. Use when testing, running checks, or validating code changes.
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
generate-run-commands
Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
verify-behavior
Verify or reproduce visible product behavior by driving the real UI with pi-computer-use's checked tools, requiring verified expect postconditions and durable state evidence for meaningful UI flows. Use when triage needs visual reproduction, implementation needs behavioral proof, review needs interactive confirmation…
workflows
Author or run durable BB workflows when the user requests workflow execution or multi-agent orchestration.