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

@baobox/skill-builder-contract

v0.2.1

Published

Shared BFF↔MFE HTTP contract (types + Zod) for the BaoBox Skill Studio. Reuses @baobox/sdk skill types.

Downloads

706

Readme

@baobox/skill-builder-contract

The shared BFF↔MFE HTTP contract for the BaoBox Skill Studio.

This package defines the small HTTP surface that the embedded <baobox-skill-builder> Web Component (@baobox/skill-builder, #249) fetches from the tenant's own backend (the BFF, @baobox/skill-builder-bff, #248). It is not the BaoBox API — the browser never calls BaoBox directly.

Payload shapes reuse @baobox/sdk's skill types (Skill, SkillWithFiles, SkillFileReference) so the server and the browser share one source of truth and cannot drift.

Part of Epic #244, Phase 1 (walking skeleton): list skills · get one · update one field. Sub-skill graphs, tools, and the create wizard are Phase 2.

Install

npm install @baobox/skill-builder-contract
# peer/runtime: zod, and @baobox/sdk (for the re-exported skill types)

The Phase-1 surface

All paths are relative to the BFF mount point (the api-base the host sets on <baobox-skill-builder>). They do not include BaoBox's /api/v1 prefix — this is the tenant BFF's own surface.

| Op | Method & path | Request (validated) | Response | | ------------- | ------------------ | --------------------------- | ------------------------- | | List skills | GET /skills | — | { data: SkillSummary[] }| | Get a skill | GET /skills/:id | — | { data: SkillDetail } | | Update field | PATCH /skills/:id| SkillUpdateRequest | { data: SkillDetail } |

import {
  skillStudioRoutes,
  skillUpdateRequestSchema,
  listSkillsResponseSchema,
  skillDetailResponseSchema,
  toSkillSummary,
  type SkillSummary,
  type SkillDetail,        // = @baobox/sdk SkillWithFiles
  type SkillUpdateRequest,
} from "@baobox/skill-builder-contract";

skillStudioRoutes.getSkill.build("sk_default"); // "/skills/sk_default"

Shapes

  • SkillSummary — lean list row: { id, name, description, model, tenantId, updatedAt } (a strict subset of @baobox/sdk's Skill; use toSkillSummary(skill)).
  • SkillDetail — re-export of @baobox/sdk's SkillWithFiles (full skill + files: { path, size }[]).
  • SkillUpdateRequestexactly one editable field per request (Phase 1 is a single-field edit), chosen from name, description, systemPrompt, model, temperature, maxTokens. The schema is .strict() — unknown keys (e.g. id, tenantId) are rejected so a client can't smuggle them through the BFF.

Validation at the BFF boundary

// In the BFF, validate the untrusted PATCH body before calling @baobox/sdk:
const parsed = skillUpdateRequestSchema.safeParse(await req.json());
if (!parsed.success) return badRequest(parsed.error);

Response schemas (listSkillsResponseSchema, skillDetailResponseSchema) are provided for the BFF to validate/normalize its own output and for tests.

Versioning

0.1.0. Published from the baobox-skill-studio monorepo via a tag-driven release (contract-v* → GitHub Actions → npm), mirroring @baobox/sdk.