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

brepjs-verify

v0.4.0

Published

Agent skill + verify/preview tooling for authoring parametric brepjs CAD code

Downloads

0

Readme

brepjs-verify

Agent skill + verify/preview tooling for authoring parametric CAD with brepjs.

It ships as two cooperating pieces on two rails — install both.

1. The skill (Claude Code plugin)

Teaches an agent the authoring workflow. Delivered via the brepjs marketplace (git), not npm — Claude Code discovers skills from plugins, never from node_modules:

/plugin marketplace add andymai/brepjs
/plugin install brepjs-verify@brepjs

2. The runtime (npm)

The CLI the skill invokes. Install it in your project, where brepjs + the WASM kernel resolve (Node module resolution is project-local, so the runtime can't live in the plugin dir):

npm i -D brepjs-verify brepjs occt-wasm

API reference

The package bundles brepjs's full API reference for offline/agent use — the complete export surface with signatures and examples:

  • reference/llms-full.txt — every export, full signatures (the deep reference)
  • reference/llms.txt — the same content as a quicker index

Point your agent at node_modules/brepjs-verify/reference/llms-full.txt for anything the skill's curated references don't cover.

The .brep.ts contract

A model is a module whose default export is a zero-arg function returning a shape (or a Result<shape>):

// bracket.brep.ts
import { box } from 'brepjs';
export default () => box(40, 20, 10, { centered: true });

Usage

npx -y brepjs-verify part.brep.ts --step part.step --json report.json   # primary STEP + deterministic report
npx -y brepjs-verify part.brep.ts --snapshot shots/                     # iso/front/top/right PNGs
npx -y brepjs-verify part.brep.ts --serve                               # clickable preview link (renders the real STEP)

--snapshot/--serve use the bundled viewer (shipped under viewer/dist, including the OCCT WASM). The viewer is read-only display + screenshot in v1.

CLI reference

The brepjs-verify bin is a multi-command CLI. verify is the default command, so brepjs-verify part.brep.ts runs it directly.

| Command | What it does | | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | brepjs-verify verify <file> | Default command. Loads the part, runs deterministic checks, prints the JSON report. Flags: --json <out>, --step <out>, --glb <out>, --snapshot <dir>, --serve. Exits non-zero when the report is not ok (unless --serve). | | brepjs-verify init <name> | Scaffolds a parameterized <name>.brep.ts + tsconfig.json + README.md into ./<name> (or --out <dir>). Never overwrites existing files. | | brepjs-verify watch <file> | Re-verifies on every save until Ctrl-C (debounced; watches the parent dir to survive editor rename-on-save). | | brepjs-verify export <file> | Batch artifacts behind a validity gate: --step, --glb, --stl, or --all; --out <dir> (default .). Exits non-zero on failure. | | brepjs-verify measure <a> [b] | Measurements for one part; with a second module, the distance between the two parts. | | brepjs-verify diff <a> <b> | Compares the measurements of a baseline and a comparison module. | | brepjs-verify snapshot | Multi-view PNG capture — surfaced via verify --snapshot <dir>. Requires the optional puppeteer/Chrome dependency; degrades with a clear message when absent. | | brepjs-verify serve | Preview server with a ?dir=&file= deep link — surfaced via verify --serve. |

Every command writes a single machine-readable JSON document to stdout; diagnostics (paths, kernel chatter, watch notices) go to stderr.

Examples gallery

Few-shot examples live under skill/examples/<name>.brep.ts, each with a <name>.expected.json baseline. Grouped by category:

  • Primitives + booleansmounting-bracket, flanged-coupler, transform-bracket
  • 2D sketch → solidextruded-bracket (extrude), revolved-pulley (revolve), swept-gasket (sweep)
  • Modifiersrounded-block (fillet), chamfered-block (chamfer), hollow-enclosure (shell)
  • Gridfinity primitivesgridfinity-baseplate, gridfinity-bin, gridfinity-divider

Eval / scorecard

npm run eval (bench/run.ts) replays every skill/examples/*.brep.ts with a sibling *.expected.json through the public runPart runtime, compares measured volume/area/validity/shape-type against the recorded baseline within each file's tolerance (default 0.5%), prints a PASS/FAIL scorecard, and exits non-zero on any regression. It is deterministic — no LLM or API key — so it runs in CI as the package's regression net. Refresh a baseline by re-recording the example's *.expected.json after an intentional geometry change.

Live eval (npm run eval:live)

The measurement flywheel: sends ~18 natural-language part prompts (bench/prompts.ts) to a real model — using the deployed SKILL.md as the system prompt, so it measures the actual skill — then verifies each generated part two ways:

  • Auto (objective): runPart --check → valid solid + any pinned dims within tolerance.
  • Judge (intent): a multimodal Claude call looks at the rendered iso/front/top/right snapshots and decides whether the part matches the request + rubric.

The scorecard reports per-category valid / judge / both rates and stamps the model + resolved brepjs version + date (so trend lines don't mix kernel versions).

ANTHROPIC_API_KEY=sk-... npm run eval:live -w brepjs-verify          # opus by default
ANTHROPIC_API_KEY=sk-... npm run eval:live -w brepjs-verify -- --model claude-sonnet-4-6
#   --only <id|category>   run a subset      --keep   keep the generated parts

Opt-in and billed (real API calls), so it does not run in CI — the deterministic replay above is the CI gate. Snapshots (hence the judge) need puppeteer/Chrome; without them the run scores on auto-verify alone and notes the skipped judge.

Programmatic API

import { runPart, runChecks, serializeReport } from 'brepjs-verify';

const { shape, report, step } = await runPart('part.brep.ts', { step: true });
console.log(serializeReport(report)); // { ok, shapeType, checks, measurements, errors }

How verification works

Deterministic checks are the source of truth — validity brands (validSolid), measureVolume/measureArea, and bounding box — surfaced as a JSON report. Multi-view PNG snapshots are a diagnostic layer, never a substitute for a measurement. STEP is the primary, validated artifact; GLB/STL are derived previews.