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

@skillsregistry/schema

v1.1.0

Published

Drizzle schema + migration runner for the SkillsRegistry data model. Runtime-agnostic (Node, Cloudflare Workers, edge).

Readme

@skillsregistry/schema

Drizzle schema + migration runner for the SkillsRegistry data model.

License: Apache-2.0. This package is shared between the open-source skillsregistry-local node and the proprietary mothership at api.skillsregistry.net. Both consume the same schema so migrations and column layouts never drift.

What's in the box

  • Drizzle table definitionsschema.skills, schema.skillEmbeddings, schema.compositions, schema.invocations, schema.publisherKeys, schema.mcpInvocations, schema.searchLogs, and the rest of the data model. Import the ones you need for type-safe queries.
  • 32 SQL migrations (00010032) bundled inside the package.
  • A runtime-agnostic migration runner — accepts any client with query(sql, values). Works with pg, pg-pool, and @neondatabase/serverless.
  • SCHEMA_VERSION constant — the highest migration number bundled in this SDK version. Fail-fast if the DB is behind.

Install

npm install @skillsregistry/schema
# or
pnpm add @skillsregistry/schema

pg is a peer dependency (optional) — install it if you're going to use runMigrations() via node-postgres:

pnpm add pg

Usage

Type-safe queries

import { schema } from '@skillsregistry/schema';
import { drizzle } from 'drizzle-orm/node-postgres';
import { eq } from 'drizzle-orm';
import { Pool } from 'pg';

const db = drizzle(new Pool({ connectionString: process.env.DATABASE_URL }));

const [row] = await db
  .select()
  .from(schema.skills)
  .where(eq(schema.skills.slug, 'anthropic-claude-code'));

Boot-time migration + version check

import { Pool } from 'pg';
import {
  loadBundledMigrations,
  runMigrations,
  assertSchemaAtLeast,
  SCHEMA_VERSION,
} from '@skillsregistry/schema';

const pool = new Pool({ connectionString: process.env.DATABASE_URL });
const client = await pool.connect();

const migrations = await loadBundledMigrations();
const { applied, skipped, finalVersion } = await runMigrations(
  client,
  migrations,
);
console.log(
  `[schema] applied ${applied.length}, skipped ${skipped.length}, at v${finalVersion}`,
);

await assertSchemaAtLeast(client, SCHEMA_VERSION);
client.release();

Design intent

Runtime-agnostic. No Env, no Cloudflare bindings, no Node globals in the public API. The migration runner takes a client interface, not a driver.

Append-only migrations. Numbers never repeat, files are never edited after landing. To change something old, add a new migration.

Version pinning. Downstream consumers (mothership, local node) pin exact versions — "1.0.0", not "^1.0.0". Breaking changes bump the major.

Semver rules

  • Major (2.0.0): renaming or dropping a column, dropping a table, renaming an exported Drizzle table binding
  • Minor (1.1.0): adding a table, adding a nullable column, adding a new migration file
  • Patch (1.0.1): docstring fixes, README, dep bumps that don't affect exports

License

Apache-2.0 — see LICENSE in the monorepo root.