npm-publish

Publish the agent-bank CLI to npm with 2FA-compliant tokens and verify via npm view.

249|47|Updated Nov 5, 2024
One-click install
npx skills add https://github.com/different-ai/agent-bank --skill npm-publish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: npm-publish
Source: https://github.com/different-ai/agent-bank/tree/main/.opencode/skill/npm-publish
Command: npx skills add https://github.com/different-ai/agent-bank --skill npm-publish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the publishing of the agent-bank CLI to npm, ensuring 2FA-compliant authentication tokens are applied and the version is verified after publish.

Core Features & Use Cases

  • Automated npm publish: Builds the CLI, configures npm with a granular token, and publishes the package to the public npm registry.
  • Credential management: Reads NPM_TOKEN and optional NPM_SCOPE from the .env.skill file for secure automation.
  • Use Case: In CI/CD pipelines, after a successful release build, publish a new version of agent-bank and verify it with npm view.

Quick Start

Load credentials from .env.skill, configure npm, build the CLI, publish from the packages/cli directory, and verify the new version with npm view agent-bank version.

Frequently Asked Questions about npm-publish

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate npm publish with 2FA-compliant tokens in CI/CD?

To automate npm publish with 2FA-compliant tokens, load NPM_TOKEN from a local .env.skill file, configure the registry, build the artifact, and push the package. The process verifies success by checking the new version with npm view.

What credentials do I need to configure before publishing an npm package via automation?

You need an NPM_TOKEN configured in a .env.skill file to authenticate npm publish automation. An optional NPM_SCOPE can also be defined to manage scoped package credentials securely during the CI/CD pipeline execution.

Does the npm publish automation process verify the new package version on the registry?

Yes, npm publish automation verifies the new package version on the registry. After publishing the built artifact, it runs npm view to validate that the newly pushed version is successfully available on the public npm registry.

How do I publish a pre-built CLI artifact to the npm registry?

To publish a pre-built CLI artifact to npm, ensure the build output exists in packages/cli/dist. Configure npm with your credentials, execute the publish command from the packages/cli directory, and verify the deployment via npm view.

Can I use pnpm to publish packages with 2FA authentication tokens?

Publishing packages with 2FA authentication tokens supports both npm and pnpm environments. The automation reads NPM_TOKEN credentials from .env.skill, configures the package manager, and executes the publish command for the built CLI artifact.

Why does my automated npm publish fail if the dist build output is missing?

Automated npm publish fails if the dist build output is missing because the process requires a built artifact located in packages/cli/dist. Without this pre-built directory, the package manager has no files to bundle and publish to the npm registry.