Agent skill

AI Core

by TanStack in TanStack/ai

Entry point for TanStack AI skills. An agent skill from TanStack/ai.

MITAuto-check passedAI & LLM Engineering

Install AI Core

skills CLI
$ npx skills add TanStack/ai --skill ai-core -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TanStack/ai ai-core --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TanStack/ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/ai/skills/ai-core .claude/skills/ai-core && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ai-core
GitHub stars
3.2k
Token cost
~1.8k tokens
SKILL.md length
676 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Entry point for TanStack AI skills. An agent skill from TanStack/ai.

  • Works in 6 steps: This is NOT the Vercel AI SDK. Use… → Import from framework package on client.… → Use toServerSentEventsResponse() to… → …
  • Tasks that involve Structured output and tool calling
  • SKILL.md covers Sub-Skills, Companion packages, Quick Decision Tree and Critical Rules, plus 1 more section
  • Calls pnpm and npx

What it does

AI Core is an agent skill from TanStack/ai. 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.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Structured output and tool calling. It works with TanStack. The repository describes itself as: 🤖 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. The licence is MIT.

When your agent uses it

  • Tasks that involve Structured output and tool calling

Example prompts

  • “/ai-core”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. This is NOT the Vercel AI SDK. Use chat() not streamText(). Use openaiText() not createOpenAI(). Import from @tanstack/ai, not ai.
  2. Import from framework package on client. Use @tanstack/ai-react (or solid/vue/svelte/preact), not @tanstack/ai-client.
  3. Use toServerSentEventsResponse() to convert streams to HTTP responses. Never implement SSE manually.
  4. Use middleware for lifecycle events. No onEnd/onFinish callbacks on chat() — use middleware: [{ onFinish: ... }].
  5. Ask the user which adapter and model they want. Suggest the latest model. Also ask if they want Code Mode.
  6. Tools must be passed to both server and client. Server gets the tool in chat({ tools }); the client passes the .client() implementation…

What it can do on your machine

Read from SKILL.md and the folder at commit 68aeada. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AI Core loads about 1.8k tokens when it runs. Until then it costs about 118 tokens; SKILL.md has 676 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TanStack/ai at commit 68aeada, republished under its MIT licence (© TanStack). 676 words, ~1,822 tokens.

Download SKILL.mdSave it as .claude/skills/ai-core/SKILL.md (or your agent's skills folder).
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 streamingai-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 transcriptionsai-core/media-generation/SKILL.md
Get typed JSON responses from the LLMai-core/structured-outputs/SKILL.md
Choose and configure a provider adapterai-core/adapter-configuration/SKILL.md
Implement AG-UI streaming protocol server-sideai-core/ag-ui-protocol/SKILL.md
Add analytics, logging, or lifecycle hooksai-core/middleware/SKILL.md
Coordinate multi-instance work with locksai-core/locks/SKILL.md
Connect to a non-TanStack-AI backendai-core/custom-backend-integration/SKILL.md
Turn on/off debug logging, pipe into pino/winstonai-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 skillsSee @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, interruptsai-persistence/server/SKILL.md
Implement the store interfaces for your DBai-persistence/stores/SKILL.md
Write the adapter for the DB your app runsai-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.

Show full SKILL.md (274 more words)Show less
@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? → @tanstack/ai-persistence skills
  • Connecting to a custom backend? → ai-core/custom-backend-integration
  • Turning on debug logging to trace chunks/tools/middleware? → ai-core/debug-logging
  • Debugging mistakes? → Check Common Mistakes in the relevant sub-skill

Critical Rules

  1. This is NOT the Vercel AI SDK. Use chat() not streamText(). Use openaiText() not createOpenAI(). Import from @tanstack/ai, not ai.
  2. Import from framework package on client. Use @tanstack/ai-react (or solid/vue/svelte/preact), not @tanstack/ai-client.
  3. Use toServerSentEventsResponse() to convert streams to HTTP responses. Never implement SSE manually.
  4. Use middleware for lifecycle events. No onEnd/onFinish callbacks on chat() — use middleware: [{ onFinish: ... }].
  5. Ask the user which adapter and model they want. Suggest the latest model. Also ask if they want Code Mode.
  6. Tools must be passed to both server and client. Server gets the tool in chat({ tools }); the client passes the .client() implementation through the clientTools() helper into the tools option — useChat({ tools: clientTools(myTool.client(...)) }). There is no clientTools option. See ai-core/tool-calling.

Version

Targets TanStack AI v0.42.0.

© TanStack, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/ai/skills/ai-core of TanStack/ai.

Open the folder on GitHubat commit 68aeada

Compare with similar skills

AI Core next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AI Core compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI Core this skillTanStack/ai3.2k—~1.8kAutomated safety check: PassMIT
Tanstack AIsecondsky/claude-skills2271 repos~3.6kAutomated safety check: NotesMIT
Build Agentchmonitor/chmonitor299—~1.8kAutomated safety check: PassGPL-3.0
Planning With Filesjarrodwatts/claude-code-config1.1k5 repos~967Automated safety check: PassNone
Tool Use Data Synthesissunny-glow/Auto-BenchMax1.3k—~3.3kAutomated safety check: PassNone
Agent Harness ConstructionKartikLabhshetwar/mind-mentor1477 repos~500Automated safety check: PassApache-2.0

Similar skills

  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    AI & LLM EngineeringAuto-check: notes
  • Build Agent

    chmonitor/chmonitor

    Build an AI-agent application end-to-end — from an empty repo or an existing codebase.

    299 GitHub stars~1.8k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Planning With Files

    jarrodwatts/claude-code-config

    Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage.

    1.1k GitHub starsUsed in 5 repos~967 tokens
    AI & LLM EngineeringAuto-check passed
  • Tool Use Data Synthesis

    sunny-glow/Auto-BenchMax

    Synthesize training data for ANY tool-use / agentic benchmark, in ANY repo.

    1.3k GitHub stars~3.3k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Agent Harness Construction

    KartikLabhshetwar/mind-mentor

    Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.

    147 GitHub starsUsed in 7 repos~500 tokens
    AI & LLM EngineeringAuto-check passed
  • Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.

    40k GitHub stars~1.3k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed

More from TanStack/ai

All 24 skills in this repo
  • I Have Adhd

    TanStack/ai

    A skill your agent uses when the user invokes /i-have-adhd, says they have ADHD, or asks for ADHD-friendly output.

    3.2k GitHub starsUsed in 5 repos~1.8k tokens
    Auto-check passed
  • PR Sweep

    TanStack/ai

    Sweep open (or listed) PRs with up to 100 parallel agents: security-scan outside contributors, rebase onto main when behind (push --force-with-lease), approve pending first-time-contributor CI when…

    3.2k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • A skill your agent uses when wiring honcho() from @tanstack/ai-memory/honcho — a hosted memory adapter where recall is a dialectic answer over the user's representation (no discrete fragments).

    3.2k GitHub starsUsed in 1 repo~457 tokens
    Auto-check passed
  • A skill your agent uses when wiring inMemory() from @tanstack/ai-memory/in-memory — explains setup, options (embedder, extract, topK/minScore), when to pick it (dev/tests/single-process demos), and…

    3.2k GitHub starsUsed in 1 repo~448 tokens
    Auto-check passed
  • A skill your agent uses when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking…

    3.2k GitHub starsUsed in 1 repo~840 tokens
    Auto-check passed
  • A skill your agent uses when adding a public teaching example or a docs tutorial.

    3.2k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Works with

Questions about AI Core

What does AI Core do?

Entry point for TanStack AI skills. An agent skill from TanStack/ai. AI Core is an agent skill from TanStack/ai. Entry point for TanStack AI skills.

When should I use AI Core?

AI Core fits situations like: tasks that involve Structured output and tool calling.

How do I install AI Core in Claude Code?

Run `npx skills add TanStack/ai --skill ai-core -a claude-code`. Or copy the skill folder (packages/ai/skills/ai-core in TanStack/ai) into .claude/skills/ai-core in your project. Claude Code loads it when a task matches its description.

How do I install AI Core in Codex?

Run `npx skills add TanStack/ai --skill ai-core -a codex`. Or copy the skill folder (packages/ai/skills/ai-core in TanStack/ai) into .agents/skills/ai-core in your project. Codex loads it when a task matches its description.

Can I use AI Core in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TanStack/ai --skill ai-core -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-core, .gemini/skills/ai-core, .github/skills/ai-core and .opencode/skills/ai-core in your project.

What does AI Core need to run?

Going by SKILL.md and its folder, AI Core needs the command-line tools its instructions call (pnpm and npx). Our summary lists: Node.js.

Does AI Core access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is AI Core safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does AI Core use?

AI Core is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AI Core use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to AI Core?

Skills that share tags, products or a category with AI Core: Tanstack AI (secondsky/claude-skills, 227 stars), Build Agent (chmonitor/chmonitor, 299 stars), Planning With Files (jarrodwatts/claude-code-config, 1.1k stars) and Tool Use Data Synthesis (sunny-glow/Auto-BenchMax, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AI Core?

TanStack (a GitHub organization) maintains it in TanStack/ai, which has 3,172 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 8, 2026.

Source: TanStack/ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.