npm-monorepo-publish

Automate npm package publishing for Lerna monorepos with OTP handling.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/shawn-sandy/skills --skill npm-monorepo-publish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: npm-monorepo-publish
Source: https://github.com/shawn-sandy/skills/tree/main/npm-monorepo-publish
Command: npx skills add https://github.com/shawn-sandy/skills --skill npm-monorepo-publish

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires npm, lerna, and includes references (resource) components.

What problem does it solve?

Publishing monorepo packages to npm, especially with 2FA, pre-publish checks, and post-publish verification, is a multi-step, error-prone process. This skill automates the entire workflow, handling OTPs, validation, and error recovery, so you can publish with confidence and minimal effort.

Core Features & Use Cases

  • Automated Pre-flight Checks: Verifies npm authentication, runs builds, and lints code before publishing.
  • Smart OTP Handling: Prompts for 2FA codes with retry logic, eliminating manual input errors.
  • Lerna Integration: Seamlessly works with Lerna for version bumping, git tagging, and GitHub releases.
  • Use Case: You've made changes across several packages in your Lerna monorepo. Use this skill to automatically validate, preview, and publish all updated packages to npm, including handling your 2FA code, without leaving your AI environment.

Quick Start

Publish the updated packages in this monorepo to npm.

Frequently Asked Questions about npm-monorepo-publish

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

FAQPage Schema
How do I publish packages from a Lerna monorepo to npm with 2FA enabled?

Publishing Lerna monorepos to npm with 2FA requires automating OTP collection, validation, and package publishing in sequence. This skill handles pre-flight checks, prompts for your 2FA code with retry logic, executes the publish via Lerna, and verifies success—eliminating manual steps and errors.

Can I automate npm publishing with build and lint validation before release?

Yes. Pre-publish validation runs builds and lints code to catch errors before pushing to npm. This skill automatically verifies npm authentication, executes builds and lints, generates a dry-run preview, then proceeds to publish only if all checks pass.

What's the best way to handle 2FA codes during automated CI/CD npm publishing?

Smart OTP handling prompts for your 2FA code within the publish workflow, implements retry logic for failed attempts, and securely passes it to npm during publishing. This approach keeps 2FA active while automating the entire release process without manual intervention.

Does Lerna support automated version bumping and GitHub release creation during npm publishing?

Yes. Lerna integrates with this skill to automatically bump versions, create git tags, and coordinate GitHub releases alongside npm package publishing. The entire workflow runs end-to-end without leaving your environment.

Can I preview changes before publishing multiple packages to npm from a monorepo?

Yes. A dry-run preview shows what will be published—versions, packages, and changes—before execution. This lets you verify everything is correct before the skill proceeds with actual npm publishing and git tagging.

What happens if npm publishing fails during a monorepo release?

The skill includes error recovery and post-publish verification. If publishing fails, retry logic and detailed error reporting help diagnose the issue. Pre-flight validation and dry-run checks minimize failure risk by catching problems early.