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

ai-sdk-skills

v0.1.1

Published

AI SDK tools for finding and loading SKILL.md content from the open skills ecosystem

Readme

ai-sdk-skills

AI SDK tools for discovering and loading SKILL.md content from the open skills ecosystem.

What this package provides

  • findSkillsTool: find and rank skill candidates (preconfig or search mode)
  • readSkillTool: resolve and load a skill's SKILL.md into model-ready context

Install

pnpm add ai-sdk-skills ai zod

Quick start

import { generateText, stepCountIs } from 'ai';
import { initSkillsTools } from 'ai-sdk-skills';

const { tools } = initSkillsTools({
  find: {
    defaultMode: 'search',
    rankingStrategy: 'hybrid',
    preconfiguredSkills: [
      { name: 'playwright', source: 'vercel-labs/agent-skills' },
      { name: 'prisma-expert', source: 'vercel-labs/agent-skills' },
    ],
  },
  read: { maxChars: 16000 },
});

await generateText({
  model: 'anthropic/claude-sonnet-4.5',
  messages,
  tools,
  stopWhen: stepCountIs(6),
});

Configuration reference

findSkillsTool

  • mode: "preconfig" | "search"
  • query?: text query used in search/ranking
  • limit?: 1..25

find config highlights:

  • defaultMode, allowedModes
  • searchLimit, minConfidence, closeScoreDelta
  • rankingStrategy: deterministic | hybrid | ai
  • skillsApiBaseUrl, fetchFn
  • preconfiguredSkills, aiRanker
  • cache (enabled, ttlMs, optional custom store)
  • debug (true for console debug or custom logger)
  • metrics hooks (onSearchComplete, onError)
  • rankingWeights for deterministic scoring weights

readSkillTool

  • source?, skillName?, slug?, preferredPath?, maxChars?

read config highlights:

  • maxChars, maxCandidatesToRead
  • githubToken, fetchFn
  • preconfiguredSkills
  • cache, debug, metrics
  • localSkillsPath for offline/local SKILL.md loading

Examples

See examples/:

  • basic.ts
  • advanced-ai-ranker.ts
  • custom-fetch.ts
  • token-auth.ts
  • error-handling.ts

Troubleshooting

GitHub API rate limits

  • Unauthenticated requests are limited.
  • Set githubToken in read config for higher limits.

Invalid source format

  • source must be owner/repo (for example vercel-labs/agent-skills).

Search returns no candidates

  • Ensure query length is at least 2 characters.
  • Lower minConfidence or use preconfig mode with known skills.

FAQ

Does this support offline reads?

Yes. Set read.localSkillsPath to a directory containing <skill>/SKILL.md.

Can I customize ranking?

Yes. Use rankingStrategy: "ai" or "hybrid" with an aiRanker. You can also tune deterministic ranking with rankingWeights.

Can I load metadata only before full content?

Yes. Call readSkillTool with previewOnly: true to get metadata and estimated size.

Is this package ESM/CJS compatible?

Yes. The package exports both ESM and CJS builds from dist/.

Development

pnpm install
pnpm type-check
pnpm build
pnpm test

Docs site

A one-page documentation site is available in docs/index.html.