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

@hazeljs/skillgate

v2.0.3

Published

Turn OpenAPI / HazelJS REST surfaces into curated, governed agent skills

Readme

@hazeljs/skillgate

Turn selected OpenAPI / REST endpoints into governed agent skills.

Works with any OpenAPI 3 document (HazelJS APIs, third-party services, or a hand-written spec). Reads by default. Writes need approval. Agent OS runs the think loop. Skillgate is not a magic “learn every API” brain — it is a gate: allowlist / tags / x-hazel-skill, classify, harden, register. Use fromModule + @AgentSkill when the API is a HazelJS app.

npm version npm downloads License: Apache-2.0

Features

  • Opt-in curation — only operations with tag agent / skillgate, x-hazel-skill, or an explicit allowlist
  • Safe defaults — reads are read-only; writes require approval; DELETE and admin paths denied unless opted in
  • OpenAPI + decoratorsfromOpenApi, fromModule, and @AgentSkill
  • Agent OS ready — register into @hazeljs/agent ToolRegistry / AgentRuntime
  • Optional MCP exporttoMcpServer() for Cursor / Claude Desktop
  • CLIhazel skillgate from-openapi and hazel skillgate init

Installation

npm install @hazeljs/skillgate @hazeljs/agent

Quick Start

import { Skillgate } from '@hazeljs/skillgate';
import { ToolRegistry } from '@hazeljs/agent';

const gate = Skillgate.fromOpenApi(spec, {
  include: { tags: ['agent'], operationIds: ['getOrder', 'createTicket'] },
  classify: { writeRequiresApproval: true },
  invoke: {
    baseUrl: 'http://127.0.0.1:3000',
    headers: { Authorization: 'Bearer ${API_TOKEN}' },
  },
});

const registry = new ToolRegistry();
gate.register(registry, 'api-concierge');

console.log(gate.report());
// → included skills + denied destructive/admin + warnings

OpenAPI extension

paths:
  /orders/{id}:
    get:
      operationId: getOrder
      tags: [agent]
      summary: Fetch an order by id
      x-hazel-skill:
        readOnly: true
  /refunds:
    post:
      operationId: createRefund
      x-hazel-skill:
        requiresApproval: true

Decorator

import { AgentSkill } from '@hazeljs/skillgate';

class OrdersController {
  @AgentSkill({ description: 'Fetch an order by id', readOnly: true })
  getOrder() {}

  @AgentSkill({ requiresApproval: true })
  createRefund() {}
}

Use toXHazelSkill(getAgentSkillMetadata(...)) when generating OpenAPI (x-hazel-skill).

fromModule + MCP

const gate = Skillgate.fromModule(AppModule, {
  swagger: { title: 'API', servers: [{ url: 'http://127.0.0.1:3000' }] },
  invoke: { baseUrl: 'http://127.0.0.1:3000' },
});

// Optional MCP export for Cursor / Claude Desktop
const server = gate.toMcpServer({ name: 'hazel-api-skills', version: '1.0.0' });
server.listenStdio();

Safety defaults

| Class | Default | | --------------------------------------- | ------------------------------------------------ | | GET / HEAD | readOnly, no approval | | POST / PUT / PATCH | requiresApproval: true | | DELETE | denied unless classify.allowDestructive | | /admin, /internal, /debug, health | denied unless classify.allowAdmin | | Tool count | warn > 12, fail > 24 (force: true to override) |

CLI

hazel skillgate from-openapi ./openapi.json
hazel skillgate init

Related

  • @hazeljs/agentopenApiToSkills, createSkillInvoker, AgentRuntime
  • @hazeljs/swagger — OpenAPI from controllers
  • @hazeljs/mcp — export ToolRegistry to MCP

License

Apache-2.0