ai-core

A starting point for TanStack AI, a software toolkit for building applications that use AI models. It directs you to guidance for chat interfaces, tool use, generated media, typed JSON, provider setup, streaming, logging, and related tasks.

In plain words
What is it for?
Use it when building or configuring AI chat, tool calling, media generation, structured responses, streaming interfaces, analytics, locks, or custom model connections.
Why use it?
It helps you find the relevant instructions without having to know which TanStack AI package or feature handles your task.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tanstack/ai/ai-core
Any agent
npx skills add TanStack/ai --skill ai-core
Clone the repo
git clone --depth 1 https://github.com/TanStack/ai

Made for: Claude Code, Codex.

Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,742 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00108 $0.01742
Opus 5 $0.00054 $0.00871
Sonnet 5 $0.00022 $0.00348
Haiku 4.5 $0.00011 $0.00174

Measured 2d ago against content hash d69011d75ea8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-core scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/ai/skills/ai-core/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 130 lines · 108 tokens per session scan A d69011d75ea8

Subscribe to this mod's changes

ai-core is a skill published in the GitHub repository TanStack/ai (3,045 stars, last pushed 2d ago), licensed MIT. It adds 108 tokens to every session and 1,742 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.