npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opsx-gherkin

v1.0.1

Published

Deterministic OpenSpec and Gherkin conversion with a self-contained syntax compatibility skill.

Readme

opsx-gherkin

Deterministic conversion between OpenSpec and Gherkin, with a self-contained skill explaining compatible syntax. Requires Node.js 22.18+.

Convert a specification

npx opsx-gherkin mdg-to-opsx input.feature.md -o spec.md
npx opsx-gherkin opsx-to-mdg spec.md -o output.feature.md
npx opsx-gherkin opsx-to-feature spec.md -o output.feature

The supported directions are Markdown with Gherkin to OpenSpec, OpenSpec to Markdown with Gherkin, and OpenSpec to plain Gherkin. Plain .feature input is available for direct validation only.

Each converter accepts one input path, inline --text, or stdin. With no -o, the result goes to stdout. Existing destinations require --force; successful file writes are atomic. Invalid conversions leave the destination unchanged.

npx opsx-gherkin mdg-to-opsx < input.feature.md
npx opsx-gherkin opsx-to-feature --text "$(cat spec.md)"
npx opsx-gherkin opsx-to-mdg --help

--name supplies a name when OpenSpec input lacks a title or usable source-path context. --project-root supplies main-spec context for delta validation. --output is an alias for -o. Standalone mdg-to-opsx, opsx-to-mdg, and opsx-to-feature executables accept the same options after installation.

Compatibility

Read the complete contract before authoring compatible documents:

npx opsx-gherkin profile

instructions is an alias. Both print the same canonical contract owned by the bundled skill.

Conversions validate both endpoints with the pinned official OpenSpec and Cucumber validators and compare their normalized models. They preserve the documented structure and values while normalizing formatting. Syntax outside the compatibility profile produces a diagnostic instead of an inferred mapping. Supported delta operations include ADDED, MODIFIED, REMOVED, and RENAMED; the contract defines their allowed content.

Complete examples: account access and authentication delta.

Validate syntax directly

npx --package opsx-gherkin validate-spec --format openspec spec.md
npx --package opsx-gherkin validate-spec --format mdg input.feature.md
npx --package opsx-gherkin validate-spec --format feature output.feature

The validator emits JSON. Without --format, .feature.md selects MDG, .feature selects plain Gherkin, and other suffixes select OpenSpec. The legacy --format gherkin alias selects MDG for .feature.md and plain Gherkin otherwise. Direct OpenSpec validation checks a main specification; converters also validate supported deltas. Valid endpoint syntax alone does not establish convertibility.

Exit codes: 0 success, 1 invalid syntax/profile/conversion, 2 usage or I/O failure. Conversion diagnostics go to stderr; stdout remains usable as a document.

Use the syntax skill

The package contains skills/opsx-gherkin, including its contract and examples. To obtain it locally:

npm install --save-dev opsx-gherkin

Copy the complete node_modules/opsx-gherkin/skills/opsx-gherkin directory to the skill location supported by your agent. Keep the references beside SKILL.md. The skill explains syntax and conversion independently; installing the npm package does not activate it or change agent settings automatically.

Development

pnpm install --frozen-lockfile
pnpm verify

Verification includes lint, types, tests and coverage, build, package checks, and a production installation of the actual tarball. It needs registry access to install dependencies and does not publish. pnpm test:package runs the package checks separately. Supported Node versions are tested in CI.

See CONTRIBUTING.md for contract changes and release setup, SECURITY.md for security reporting, and LICENSE for MIT terms.