ci-validation-gates

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

1|Updated Jul 7, 2026
One-click install
npx skills add https://github.com/seiggy/maf-copilot-studio-demo --skill ci-validation-gates-seiggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ci-validation-gates
Source: https://github.com/seiggy/maf-copilot-studio-demo/tree/main/.squad/templates/skills/ci-validation-gates
Command: npx skills add https://github.com/seiggy/maf-copilot-studio-demo --skill ci-validation-gates-seiggy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Release pipelines fail in subtle ways: invalid semver versions get mangled by npm, 2FA-protected tokens cause EOTP errors, missing retry logic produces false verification failures, and draft releases never trigger workflows. This Skill encodes defensive CI/CD patterns learned from a real release incident to prevent these failures. ## Core Features & Use Cases - Semver Validation Gate: Blocks 4-part versions before npm publish using npx semver checks in GitHub Actions. - Token and 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 and Build Protection: Detects draft releases that never emit release: published events and sets SKIP_BUILD_BUMP=1 to stop version mutation during release builds. - Use Case: A team publishing an npm package via GitHub Actions adds these gates to their workflow so a malformed tag like v0.8.21.4 fails fast with a clear error instead of corrupting the published package. ## Quick Start Review my GitHub Actions npm publish workflow and add the semver validation, token verification, and retry logic gates from this skill.

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?

Add a workflow step that strips the leading v from the release tag and runs npx semver against it, exiting with an error if validation fails. This blocks 4-part versions like 0.8.21.4 that npm mangles during publish.

Why does npm publish fail with EOTP in GitHub Actions?

EOTP occurs when NPM_TOKEN is a User token protected by 2FA, which requires a one-time password CI cannot supply. Create an Automation token at npmjs.com under Settings, Access Tokens, and use that as the workflow secret instead.

How do I handle npm registry propagation delays after publish?

npm uses eventual consistency, so a published package may not be queryable for 5 to 30 seconds, occasionally up to 2 minutes. Verify with a retry loop of 5 attempts at 15-second intervals, exiting on the first successful npm view.

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

Draft releases do not emit the release: published event, so workflows listening for that event never run. Publish releases directly rather than saving drafts, or verify published status via the GitHub API when using workflow_dispatch.

When should I not use these CI validation patterns?

These patterns target npm package publishing via GitHub Actions release events. They do not apply to other registries, non-Node toolchains, or pipelines that publish on push rather than release tags.