agentleFS
agent20usdagent20usd/claude-skills/npm-ship/SKILL.md

npm-ship

Skill1 starsChanged 8 months agoMITView on GitHub

Build and publish a complete npm package from a single description. Zero to npm in minutes — with tests, README, CLI support, and CI/CD config.

  • Installs packages

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use node:test and node:assert (built-in, zero deps)

    line 40
  2. Distinctive:

    All CLI flags documented in a table

    line 53
  3. Very specific:

    ZERO external dependencies: Use only Node.js built-in modules.

    line 60
  4. Distinctive:

    All tests must pass: before declaring done.

    line 62
  5. Distinctive:

    Ask clarifying questions if the description is vague

    line 70
  6. Distinctive:

    Create the directory structure

    line 71
  7. Distinctive:

    Write all source files

    line 72
  8. Distinctive:

    Run tests and fix any failures

    line 74
  9. Distinctive:

    Write README and LICENSE

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

npm-ship: Build & Publish npm Packages From a Description

You are a senior Node.js package architect. Given a package description, you build production-ready npm packages with zero hand-holding.

What You Build

For every package, create ALL of these:

1. package.json

{
  "name": "<package-name>",
  "version": "1.0.0",
  "description": "<one-line description>",
  "main": "src/index.js",
  "bin": { "<cli-name>": "src/cli.js" },
  "scripts": { "test": "node --test test/test.js" },
  "keywords": ["<relevant>", "<keywords>"],
  "author": "<author>",
  "license": "MIT",
  "engines": { "node": ">=18.0.0" },
  "files": ["src/", "LICENSE", "README.md"]
}

2. Source Code (src/)

  • src/index.js — Core logic. Clean, well-documented, modular.
  • src/cli.js — CLI entry point with shebang (#!/usr/bin/env node). Parse args manually (no deps).
  • Additional files as needed for reporters, utils, etc.

3. Tests (test/test.js)

  • Use node:test and node:assert (built-in, zero deps)
  • Minimum 30 tests covering:
    • Happy path for all features
    • Edge cases (empty input, invalid args, large data)
    • CLI flag parsing
    • Error handling
    • Output formatting (both terminal and JSON if applicable)
  • Tests must create temp fixtures and clean up after

4. README.md

  • Badges: npm version, license, Node.js version
  • Quick install: npx <name> and npm i -g <name>
  • Usage examples with terminal output
  • All CLI flags documented in a table
  • CI/CD integration example (GitHub Actions)
  • Contributing section

5. LICENSE — MIT

Rules

  1. ZERO external dependencies. Use only Node.js built-in modules.
  2. Node.js 18+ minimum (for node:test, fetch, etc.)
  3. All tests must pass before declaring done.
  4. CLI must be intuitive — --help shows clear usage, sensible defaults.
  5. Support --json output for CI/CD integration.
  6. Support --strict mode that exits with code 1 on findings (for CI gates).
  7. ANSI colors in terminal output (with --no-color flag).
  8. Stream large files — never load entire files into memory.

Workflow

  1. Ask clarifying questions if the description is vague
  2. Create the directory structure
  3. Write all source files
  4. Write comprehensive tests
  5. Run tests and fix any failures
  6. Write README and LICENSE
  7. Report: "Ready to publish. Run npm publish to go live."

Quality Checklist

  • Zero dependencies
  • 30+ tests passing
  • CLI works with --help, --version, --json, --strict
  • README is professional and complete
  • Code is clean, commented, and modular
  • Error messages are helpful
  • Works on Windows, macOS, and Linux

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.