Ai Core logo

Ai Core

OrganizationPopular
TanStack
ai-core

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.

Overview

PublisherTanStack
Repositoryai
Skill nameai-core
Stars
3.1K
Forks
330
Bundled files
8
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by TanStack on GitHub. Read the source before you install it.

Installation

Install the Ai Core AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TanStack/ai.git /tmp/ai
mkdir -p .claude/skills
cp -r /tmp/ai/packages/ai/skills/ai-core .claude/skills/ai-core
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ai Core in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ai Core on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ai Core is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

@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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ai Core AI skill do?

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.

Why use Ai Core on TypingMind?

Because you install it once and use it with any model. Ai Core is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ai Core in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TanStack/ai/tree/main/packages/ai/skills/ai-core. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ai Core?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ai Core?

As many as you like. As long as a model supports skills, you can use Ai Core with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ai Core AI skill free?

Yes. It is published on GitHub by TanStack under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇