pmcp

ow 3.x

Use ow ^3.0.0 for runtime validation in Node.js 20+ ESM code. Covers the v3 API, validation results, predicates, modifiers, custom predicates, TypeScript inference, and v2-to-v3 migration traps.

For
ow@3.1.1
Verified
2026-09-08, 4 examples executed
Package
@modootoday/pmcp-ow@3.0.0

What it covers

One example from this skill

This is the skill's own text, not a summary of it. It runs: that is what verifying means here.

import ow, {ArgumentError} from 'ow';
import assert from 'node:assert/strict';

assert.doesNotThrow(() => ow('hello', ow.string.minLength(5)));
assert.throws(
	() => ow('no', 'username', ow.string.minLength(5)),
	error => error instanceof ArgumentError,
);

assert.equal(ow.isValid(123, ow.number), true);
assert.equal(ow.isValid('123', ow.number), false);

const valid = ow.validate('hello', ow.string);
assert.equal(valid.success, true);
if (valid.success) {
	assert.equal(valid.value.length, 5);
}

const invalid = ow.validate(123, 'name', ow.string);
assert.equal(invalid.success, false);
if (!invalid.success) {
	assert.ok(invalid.error instanceof ArgumentError);
}

const longString = ow.create('value', ow.string.minLength(3));
assert.doesNotThrow(() => longString('abc'));
assert.throws(() => longString('a'), ArgumentError);

assert.equal(ow.isPredicate(ow.string), true);
assert.equal(ow.isPredicate('string'), false);
assert.equal(ow.isValid('abc', ow.any(ow.number, ow.string)), true);
assert.equal(ow.isValid(true, ow.any(ow.number, ow.string)), false);

What it did in the sandbox

Verifying this skill meant installing the package and running code against it with no route out. This is what happened, quoted from the run. The full ledger lists every package examined, including the ones that never became a skill.

Getting it

With a subscription:

npx -y @modootoday/pmcp login
npx -y @modootoday/pmcp install @modootoday/pmcp-ow

It installs as a dev dependency of your project, and the MCP server finds it there like any other skill.