# Npmpublish

> Publish npm packages with sensible defaults. Automatically sets private access and bumps patch version (0.0.1). Use when publishing packages to npm, especially for internal/private packages.

- **Type:** Skill
- **Install:** `agentstack add skill-hasna-skills-npmpublish`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [hasna](https://agentstack.voostack.com/s/hasna)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [hasna](https://github.com/hasna)
- **Source:** https://github.com/hasna/skills/tree/main/skills/npmpublish

## Install

```sh
agentstack add skill-hasna-skills-npmpublish
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# npm Publish

Publish npm packages to the npm registry with sensible defaults:
- **Private by default** - Sets `publishConfig.access: restricted`
- **Patch bump by default** - Increments version by 0.0.1

## Usage

```bash
# Publish with defaults (private, patch bump)
npmpublish

# Specify bump type
npmpublish --bump minor    # 0.1.0
npmpublish --bump major    # 1.0.0
npmpublish --bump patch    # 0.0.1 (default)

# Publish as public (use carefully!)
npmpublish --public

# Dry run (see what would happen)
npmpublish --dry-run

# Publish from a different directory
npmpublish --dir /path/to/package
```

## Options

| Option | Description | Default |
|--------|-------------|---------|
| `-b, --bump ` | Version bump: patch, minor, major | patch |
| `--public` | Publish as public package | false (private) |
| `--dry-run` | Preview without publishing | false |
| `-d, --dir ` | Package directory | current dir |

## Requirements

- `NPM_TOKEN` in `~/.secrets` for authentication
- Valid `package.json` in target directory

## What It Does

1. Reads `package.json`
2. Ensures `publishConfig.access: restricted` (unless --public)
3. Bumps version by specified amount (default: patch/0.0.1)
4. Updates `package.json`
5. Runs `bun publish`
6. Confirms private access on npm registry

## Examples

```bash
# Standard publish for internal package
npmpublish

# Release new feature version
npmpublish --bump minor

# Breaking change release
npmpublish --bump major

# Check what would be published
npmpublish --dry-run
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [hasna](https://github.com/hasna)
- **Source:** [hasna/skills](https://github.com/hasna/skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-hasna-skills-npmpublish
- Seller: https://agentstack.voostack.com/s/hasna
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
