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

@openbooklet/sdk

v0.3.0

Published

Official OpenBooklet SDK for programmatic skill fetching, search, and publishing

Downloads

149

Readme

@openbooklet/sdk

The official OpenBooklet SDK for Node.js and TypeScript. Fetch, search, publish, and manage AI skills, workflows, and memory packs programmatically.

  • Zero runtime dependencies (uses native fetch)
  • Full TypeScript support with detailed type definitions
  • Clean error handling with typed error classes
  • Requires Node.js 18+

Installation

npm install @openbooklet/sdk

Quick Start

import { OpenBooklet } from "@openbooklet/sdk";

const ob = new OpenBooklet();

// Fetch a skill
const skill = await ob.getSkill("code-review-pro");
console.log(skill.name, skill.version);

// Pull raw content
const content = await ob.pullSkill("code-review-pro");
console.log(content);

Authentication

An API key is required for publishing, rating, and policy management. Public endpoints (fetching, searching) work without one.

const ob = new OpenBooklet({ apiKey: "ob_live_..." });

You can also point the SDK at a custom API endpoint:

const ob = new OpenBooklet({
  apiKey: "ob_live_...",
  baseUrl: "https://my-instance.example.com/api/v1",
});

API Reference

Fetching Skills

getSkill(name, options?)

Fetch a skill by name. Returns the full Skill object.

const skill = await ob.getSkill("code-review-pro");

// Fetch a specific version
const skill = await ob.getSkill("code-review-pro", { version: "2.1.0" });

pullSkill(name, options?)

Pull the raw content of a skill as a string.

const content = await ob.pullSkill("code-review-pro");

getSkillInfo(name)

Get skill metadata without the full content payload.

const info = await ob.getSkillInfo("code-review-pro");
console.log(info.publisher.displayName, info.stats.totalPulls);

Searching

searchSkills(query, options?)

Search for skills by keyword.

const results = await ob.searchSkills("code review", {
  category: "code-quality",
  limit: 10,
});

for (const item of results.results) {
  console.log(`${item.name} — ${item.description}`);
}

semanticSearch(query, options?)

Search using natural language with embedding-based similarity.

const results = await ob.semanticSearch("help me write better tests", {
  threshold: 0.7,
  limit: 5,
});

getTrending(options?)

Get trending skills.

const { trending } = await ob.getTrending({ limit: 10 });

for (const skill of trending) {
  console.log(`${skill.name} — ${skill.weeklyPulls} pulls this week`);
}

Dependency Resolution

resolveDependencies(skills)

Resolve the dependency tree for a list of skills and get them in installation order.

const deps = await ob.resolveDependencies([
  "full-stack-review",
  "security-audit",
]);

console.log("Install order:", deps.installOrder);

for (const [name, data] of Object.entries(deps.skills)) {
  console.log(`${name}@${data.version}`);
}

Publishing

Requires an API key.

publishSkill(input)

Publish a new skill or update an existing one.

const ob = new OpenBooklet({ apiKey: "ob_live_..." });

const result = await ob.publishSkill({
  name: "my-skill",
  displayName: "My Skill",
  description: "Does cool things",
  content: "You are an expert at...",
  category: "general",
  tags: ["productivity", "coding"],
  license: "MIT",
  versionBump: "minor",
  changelog: "Added new capabilities",
});

console.log(`Published ${result.skill.name}@${result.skill.version}`);

Ratings

Requires an API key.

rateSkill(skillName, ratings)

Rate a skill across multiple dimensions (1-5 scale).

const result = await ob.rateSkill("code-review-pro", {
  effectiveness: 5,
  reliability: 4,
  compatibility: 5,
  documentation: 4,
});

console.log(`Overall: ${result.overall} (${result.totalRatings} ratings)`);

Update Policies

Requires an API key. Control how skills are updated in your environment.

setUpdatePolicy(skillName, policy)

// Pin to a specific version
await ob.setUpdatePolicy("code-review-pro", {
  policy: "pinned",
  pinnedVersion: "2.1.0",
});

// Allow patch updates only
await ob.setUpdatePolicy("code-review-pro", {
  policy: "patch",
});

getUpdatePolicies()

const policies = await ob.getUpdatePolicies();

for (const p of policies) {
  console.log(`${p.skillName}: ${p.policy}`);
}

Error Handling

The SDK throws typed errors that you can catch and handle individually.

import {
  OpenBooklet,
  NotFoundError,
  AuthenticationError,
  RateLimitError,
  ValidationError,
  OpenBookletError,
} from "@openbooklet/sdk";

const ob = new OpenBooklet({ apiKey: "ob_live_..." });

try {
  const skill = await ob.getSkill("nonexistent-skill");
} catch (error) {
  if (error instanceof NotFoundError) {
    console.log("Skill not found");
  } else if (error instanceof AuthenticationError) {
    console.log("Invalid or missing API key");
  } else if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);
  } else if (error instanceof ValidationError) {
    console.log(`Invalid request: ${error.message}`);
  } else if (error instanceof OpenBookletError) {
    console.log(`API error ${error.status}: ${error.message}`);
  }
}

All error classes extend OpenBookletError, which includes:

| Property | Type | Description | |----------|------|-------------| | message | string | Human-readable error message | | status | number | HTTP status code | | code | string | Machine-readable error code |

RateLimitError also includes retryAfter (seconds to wait).

TypeScript

All types are exported and available for use:

import type { Skill, SearchResult, PublishInput } from "@openbooklet/sdk";

License

MIT