ci-validation-gates

Enforce defensive CI/CD gates for npm release workflows.

9|1|Updated Jul 21, 2025
One-click install
npx skills add https://github.com/usepowershell/PoshMcp --skill ci-validation-gates-usepowershell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ci-validation-gates
Source: https://github.com/usepowershell/PoshMcp/tree/main/.copilot/skills/ci-validation-gates
Command: npx skills add https://github.com/usepowershell/PoshMcp --skill ci-validation-gates-usepowershell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defensive CI/CD patterns centralize and enforce checks across release pipelines to prevent faulty deployments and outages.

Core Features & Use Cases

  • Semver Validation Gate: Enforce correct version formats before publish; prevents invalid semver entries from reaching npm.
  • NPM Token Type Verification: Ensure tokens used in CI are Automation tokens, not user tokens requiring OTP.
  • Retry Logic for Registry Propagation: Handle eventual consistency by retrial checks after publish.
  • Draft Release Detection: Trigger only on published releases, avoiding actions on drafts or pre-releases.
  • Build Script Protection: Guard against unintended version bumps during releases (e.g., SKIP_BUILD_BUMP).

Quick Start

Integrate these checks into your CI workflow to automatically validate versions, tokens, retries, and draft statuses before publishing.

Frequently Asked Questions about ci-validation-gates

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

FAQPage Schema
How do I enforce semver validation in GitHub Actions before publishing to npm?

Semver validation in GitHub Actions prevents invalid version formats from reaching npm. You enforce it by adding CI steps that check version strings before publish, ensuring only compliant semver entries trigger deployment.

Why does my npm publish workflow fail with OTP prompts in CI?

npm publish workflows fail with OTP prompts when using user tokens instead of Automation tokens. You must verify the NPM token type in CI to ensure it is an Automation token, which bypasses OTP requirements for automated environments.

Can I trigger GitHub Actions only on published releases and skip drafts?

Draft release detection triggers GitHub Actions only on published releases. It checks the release status in CI to avoid executing workflow actions on drafts or pre-releases, preventing unintended pipeline executions.

What is the best way to handle npm registry propagation delays after publishing?

Retry logic for registry propagation handles npm propagation delays by rechecking the registry after publish. It addresses eventual consistency by automatically retrying verification steps until the new version appears.

How do I prevent unintended version bumps during a CI build script?

Build script protection prevents unintended version bumps during CI by guarding against environment variables like SKIP_BUILD_BUMP. You enforce this check in your release workflow to ensure build scripts do not alter versions unexpectedly.