@tanstack/ai-skills has 47,711 recorded weekly downloads on npm, an increase of 267% over the past 30 days, ranking #571 of 2,256 tracked listings.
About @tanstack/ai-skills
@tanstack/ai-skills
Portable Agent Skills (SKILL.md) as a first-class chat() middleware for TanStack AI
withSkills renders a short catalog of the skills you offer into the system prompt and gives the model a load_skill tool. The model reads the catalog, picks a skill, and pulls the full instructions only when it needs them — so a large skill library does not tax every request. This is the portable path: it runs on any tool-calling model, with no provider sandbox. For skills that run in a provider's own sandbox, see Provider Skills; the two do not mix in one call.
Installation
Usage
Define a skill and pass it to withSkills in the middleware array. The middleware handles the catalog and the load_skill tool for you.
Pass an array to offer several; they are sorted by name and deduped. Loading the same skill twice in one conversation returns a short "already loaded" marker instead of repeating the body.
Tuning the catalog
The catalog is rendered per model family — Anthropic models get the XML they are tuned for, everything else a plain markdown list — and you can override that with renderCatalog or an instructionTemplate.
Where skills come from
Inline skills are the quickest start, but skills usually live somewhere else. Each source is on its own entry point:
| Source | Import | Use when |
| inlineSkill(...) | @tanstack/ai-skills | Defining a skill in code | | skillDirectory(...) | @tanstack/ai-skills/node | Walking a folder of SKILL.md files — reads the filesystem, so server only | | staticSkills(catalog) | @tanstack/ai-skills/static | A build-time bundle, no filesystem at runtime (edge-safe). Pair with skillsCatalogPlugin from /node in your Vite config | | Your own SkillSource | — | Skills in S3, a database, a registry |
aggregate, dedupe, filter, cache, and combineSources compose these.
Writing your own source
Implement the SkillSource contract, then prove it with the conformance suite the package ships:
It checks the things that break in production: a missing skill throws rather than returning empty, resources load while a path like ../../etc/passwd is rejected, revision() is stable across identical content, and concurrent list() calls stay consistent. The optional parts of the contract are only checked when you implement them — the resource cases need both listResources and readResource, and the revision case needs revision — so a source that cannot represent them is skipped rather than failed. vitest is an optional peer dependency for this entry point.
Documentation
• Portable Agent Skills: what the model sees, catalog options, reading a skill's bundled files • Skill sources: folder, build-time bundle, your own store, and combining them • Writing a skill source: the SkillSource contract and the conformance suite
License
MIT
Description from the npm listing.
- ai
- ai-sdk
- typescript
- tanstack
- tanstack-intent
- skills
- agent-skills
- skill-md
- tool-calling
- llm
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (121)Similar npm AI SDKs plugins
All 20 @tanstack/ai-skills alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@tanstack/ai-skills. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.