Skip to content
Back to skills

Ai Core

ASecurity

Entry point for TanStack AI skills. Routes to chat-experience, tool-calling, media-generation, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, custom-backend-integration, and debug-logging. Use chat() not streamText(), openaiText() not createOpenAI(), toServerSentEventsResponse() not manual SSE, middleware hooks not onEnd callbacks.

  • 3,166 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 26, 2026
ai-agentsreactvuedebuggingbackend

Works with

  • cli

Security analysis

A100/100

Pro scans all 17 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add TanStack/ai --skill ai-core --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Core?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai Core
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tanstack-ai-core/badge)](https://www.skillsdirectory.com/skills/tanstack-ai-core)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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, custom-backend-integration, and debug-logging. Use chat() not
  streamText(), openaiText() not createOpenAI(), toServerSentEventsResponse()
  not manual SSE, middleware hooks not onEnd callbacks.
type: core
library: tanstack-ai
library_version: '0.10.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            |
| 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                 |
| 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              |
| Set up Code Mode (LLM code execution)             | See `@tanstack/ai-code-mode` package skills |

## 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
- 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 })`, client gets the definition in `useChat({ clientTools })`.

## Version

Targets TanStack AI v0.10.0.

Files in this skill

  • SKILL.md3.5 KB
  • adapter-configuration/SKILL.md12.4 KB
  • adapter-configuration/references/anthropic-adapter.md2.9 KB
  • adapter-configuration/references/gemini-adapter.md3.1 KB
  • adapter-configuration/references/grok-adapter.md2.3 KB
  • adapter-configuration/references/groq-adapter.md3.3 KB
  • adapter-configuration/references/ollama-adapter.md2.5 KB
  • adapter-configuration/references/openai-adapter.md3.2 KB
  • adapter-configuration/references/openrouter-adapter.md2.7 KB
  • ag-ui-protocol/SKILL.md11.6 KB
  • chat-experience/SKILL.md12.9 KB
  • custom-backend-integration/SKILL.md12.9 KB
  • debug-logging/SKILL.md8.4 KB
  • media-generation/SKILL.md18.5 KB
  • middleware/SKILL.md19 KB
  • structured-outputs/SKILL.md22.5 KB
  • tool-calling/SKILL.md11.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.