ci-validation-gates

Validates semver, npm tokens, and release events in CI/CD publish workflows.

2|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill ci-validation-gates-elbruno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ci-validation-gates
Source: https://github.com/elbruno/ElBruno.MagenticUI/tree/main/.squad/templates/skills/ci-validation-gates
Command: npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill ci-validation-gates-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Release pipelines fail silently or catastrophically when versions are invalid, tokens lack permissions, or registry propagation is assumed instant. This Skill encodes defensive CI/CD patterns learned from a real npm publish outage so workflows catch these failures before they ship. ## Core Features & Use Cases - Semver Validation Gate: Blocks 4-part versions (e.g., 0.8.21.4) before npm publish using npx semver checks. - Token & Retry Safeguards: Enforces npm Automation tokens over 2FA user tokens and adds 5-attempt, 15-second-interval retry loops for registry propagation delays. - Draft Release & Build Protection: Detects draft releases that never emit release: published events and requires SKIP_BUILD_BUMP=1 to prevent version mutation during release builds. - Use Case: A team publishing a package to npm adds these gates to their GitHub Actions workflow, preventing the multi-hour outage caused by an invalid semver tag and an EOTP token error. ## Quick Start Add the semver validation gate and retry-based package verification steps from this Skill to my npm publish GitHub Actions workflow.

Frequently Asked Questions about ci-validation-gates

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

FAQPage Schema
How do I validate semver before npm publish in CI?▼

Run `npx semver "$VERSION"` against the release tag (stripped of the leading v) and exit with an error if validation fails. This blocks 4-part versions like 0.8.21.4, which npm mangles, allowing only X.Y.Z or X.Y.Z-tag.N formats.

Why does npm publish fail with EOTP in GitHub Actions?▼

EOTP occurs when NPM_TOKEN is a User token with 2FA enabled, since CI cannot supply the one-time password. Create an Automation token at npmjs.com under Settings → Access Tokens → Automation and use it for all publish workflows.

How do I handle npm registry propagation delay after publish?▼

npm registry is eventually consistent, so a package may not be queryable for 5-30 seconds (up to 2 minutes) after publish. Verify with a retry loop of 5 attempts at 15-second intervals using `npm view PACKAGE@VERSION`, failing only after all attempts.

Why didn't my release workflow trigger on a GitHub release?▼

Draft releases do not emit the `release: published` event, so workflows listening for it never run. Trigger on `release: published` rather than `created`, and for workflow_dispatch verify the release is published via the GitHub API first.

How do I prevent build scripts from mutating versions during release?▼

Set SKIP_BUILD_BUMP=1 (or $env:SKIP_BUILD_BUMP = "1" on Windows) before any release build. This disables dev-only version bump scripts like bump-build.mjs that silently mutate versions during release builds.