Ai CoreSAFE
🤖 Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid.
Overview
🤖 Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid.
dafe8ab3bd88OBSERVED · 2026-10-08Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned | |
| codex | mentioned | |
| cursor | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: ai-core description: > Entry point for TanStack AI skills. Routes to chat-experience, tool-calling, media-generation, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, locks, custom-backend-integration, and debug-logging, plus the skills shipped by companion packages (@tanstack/ai-persistence, @tanstack/ai-code-mode). Use chat() not streamText(), openaiText() not createOpenAI(), toServerSentEventsResponse() not manual SSE, middleware hooks not onEnd callbacks. type: core library: tanstack-ai library_version: '0.42.0' --- # TanStack AI — Core Concepts TanStack AI is a type-safe, provider-agnostic AI SDK. Server-side functions live in `@tanstack/ai` and provider adapter packages. Client-side hooks live in framework packages (`@tanstack/ai-react`, `@tanstack/ai-solid`, etc.). Always import from the framework package on the client — never from `@tanstack/ai-client` directly (unless vanilla JS). ## Sub-Skills | Need to... | Read | | ------------------------------------------------- | --------------------------------------------- | | Build a chat UI with streaming | ai-core/chat-experience/SKILL.md | | Survive a browser reload (no extra package) | ai-core/client-persistence/SKILL.md | | Add tool calling (server, client, or both) | ai-core/tool-calling/SKILL.md | | Generate images, video, speech, or transcriptions | ai-core/media-generation/SKILL.md | | Get typed JSON responses from the LLM | ai-core/structured-outputs/SKILL.md | | Choose and configure a provider adapter | ai-core/adapter-configuration/SKILL.md | | Implement AG-UI streaming protocol server-side | ai-core/ag-ui-protocol/SKILL.md | | Add analytics, logging, or lifecycle hooks | ai-core/middleware/SKILL.md | | Coordinate multi-instance work with locks | ai-core/locks/SKILL.md | | Connect to a non-TanStack-AI backend | ai-core/custom-backend-integration/SKILL.md | | Turn on/off debug logging, pipe into pino/winston | ai-core/debug-logging/SKILL.md | | Persist chats server-side (history, runs) | See `@tanstack/ai-persistence` package skills | | Set up Code Mode (LLM code execution) | See `@tanstack/ai-code-mode` package skills | | Give the model a catalog of SKILL.md skills | See `@tanstack/ai-skills` package skills | ## Companion packages Some capabilities live in their own package and ship their own skills. Install the package, then read its skills — do not guess the API from this file. ### `@tanstack/ai-persistence` — durable chat state Makes a conversation survive a reload, a server restart, a second device, or a paused tool approval. It ships the **store contracts** (`MessageStore`, `RunStore`, `InterruptStore`, `MetadataStore`), the `withPersistence` / `withGenerationPersistence` middleware, `reconstructChat` for server-side hydrate, an in-memory reference backend, and a conformance testkit. Multi-instance locks are **not** in this package — `LockStore` / `withLocks` ship in `@tanstack/ai/locks`; see ai-core/locks. The `runs` store contract is typed against run lifecycle types (`RunStatus`, `RunRecord`, `RunStore`, `defineRunStore`, `InMemoryRunStore`), which ship in `@tanstack/ai` itself; see ai-core/middleware. It does **not** ship a backend for your database — you implement the stores against Postgres, SQLite, D1, Mongo, or whatever you run, and the package's skills walk you through it (including Drizzle, Prisma, and Cloudflare recipes). ```bash pnpm add @tanstack/ai-persistence npx @tanstack/intent@latest install ``` The skills ship **inside** the package, so they only exist on disk once it is installed — the second command re-scans `node_modules` and wires them into the agent config. Until then the paths below resolve to nothing. Entry point: `node_modules/@tanstack/ai-persistence/skills/ai-persistence/SKILL.md` | Need to... | Read | | ----------------------------------------------- | --------------------------------------- | | Wire server-side chat history, runs, interrupts | ai-persistence/server/SKILL.md | | Implement the store interfaces for your DB | ai-persistence/stores/SKILL.md | | Write the adapter for the DB your app runs | ai-persistence/build-*-adapter/SKILL.md | Browser-side persistence is **not** in this package — it ships with the framework packages, so read **ai-core/client-persistence** instead. ### `@tanstack/ai-code-mode` — LLM code execution See the `ai-code-mode` skill in that package. ### `@tanstack/ai-skills` — portable Agent Skills at runtime Gives the model a library of `SKILL.md` skills it can load on demand, on any provider, via the `withSkills` middleware and a `load_skill` tool. Skills come from `inlineSkill`, `skillDirectory`, or a build-time bundle. This is the runtime feature for the model **inside your app**, not the coding-assistant skills this file is part of, and not the hosted `codeExecutionTool` / `shellTool` skills (those run in a provider sandbox). ```bash pnpm add @tanstack/ai-skills npx @tanstack/intent@latest install ``` Entry point: `node_modules/@tanstack/ai-skills/skills/ai-skills/SKILL.md` ## Quick Decision Tree - Setting up a chatbot? → ai-core/chat-experience - Adding function calling? → ai-core/tool-calling - Generating media (images, audio, video)? → ai-core/media-generation - Need structured JSON output? → ai-core/structured-outputs - Choosing/configuring a provider? → ai-core/adapter-configuration - Building a server-only AG-UI backend? → ai-core/ag-ui-protocol - Adding analytics or post-stream events? → ai-core/middleware - Surviving reloads / multi-device / durable approvals
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
dafe8ab3bd88full audit observations/trust-audit/skill/tanstack__ai-core.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | dafe8ab3bd88 | SAFE | B | 89 | first audit |
Questions
What does the Ai Core skill do?
🤖 Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid.
Is Ai Core safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Ai Core access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Ai Core work with?
Its documentation mentions claude-code, codex and cursor. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (dafe8ab3bd88), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.