Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

skill_tree.yaml

251 lines10.0 KB

1# skills/_artifacts/skill_tree.yaml
2library:
3 name: '@tanstack/ai'
4 version: '0.10.0'
5 repository: 'https://github.com/TanStack/ai'
6 description: 'Type-safe, provider-agnostic AI SDK for building chat, tool calling, media generation, and code execution features.'
7generated_from:
8 domain_map: '_artifacts/domain_map.yaml'
9 skill_spec: '_artifacts/skill_spec.md'
10generated_at: '2026-04-08'
11​
12skills:
13 # ── Core skills (in @tanstack/ai package) ──
14​
15 - name: 'TanStack AI — Core'
16 slug: 'ai-core'
17 type: 'core'
18 domain: 'chat-experiences'
19 path: 'skills/ai-core/SKILL.md'
20 package: 'packages/ai'
21 description: >
22 Entry point for TanStack AI skills. Routes to chat-experience,
23 tool-calling, media-generation, structured-outputs, adapter-configuration,
24 ag-ui-protocol, middleware, and custom-backend-integration based on
25 developer task. Covers chat(), toolDefinition(), generateImage(),
26 outputSchema, openaiText(), toServerSentEventsResponse(), middleware hooks.
27 requires: []
28​
29 - name: 'Chat Experience'
30 slug: 'ai-core/chat-experience'
31 type: 'sub-skill'
32 domain: 'chat-experiences'
33 path: 'skills/ai-core/chat-experience/SKILL.md'
34 package: 'packages/ai'
35 description: >
36 End-to-end chat implementation: server endpoint with chat() and
37 toServerSentEventsResponse(), client-side useChat hook with
38 fetchServerSentEvents(), message rendering with UIMessage parts,
39 multimodal content, thinking/reasoning display. Covers streaming
40 states, connection adapters, and message format conversions.
41 NOT Vercel AI SDK — uses chat() not streamText().
42 requires:
43 - 'ai-core'
44 sources:
45 - 'TanStack/ai:docs/getting-started/quick-start.md'
46 - 'TanStack/ai:docs/chat/streaming.md'
47 - 'TanStack/ai:docs/chat/connection-adapters.md'
48 - 'TanStack/ai:docs/chat/thinking-content.md'
49 - 'TanStack/ai:docs/advanced/multimodal-content.md'
50 - 'TanStack/ai:packages/ai/src/core/chat.ts'
51 - 'TanStack/ai:packages/ai-client/src/chat-client.ts'
52​
53 - name: 'Tool Calling'
54 slug: 'ai-core/tool-calling'
55 type: 'sub-skill'
56 domain: 'tool-system'
57 path: 'skills/ai-core/tool-calling/SKILL.md'
58 package: 'packages/ai'
59 description: >
60 Isomorphic tool system: toolDefinition() with Zod schemas,
61 .server() and .client() implementations, passing tools to both
62 chat() on server and useChat/clientTools on client, tool approval
63 flows with needsApproval and addToolApprovalResponse(), lazy tool
64 discovery with lazy:true, rendering ToolCallPart and ToolResultPart
65 in UI. Requires @standard-schema/spec for type inference.
66 requires:
67 - 'ai-core'
68 sources:
69 - 'TanStack/ai:docs/tools/tools.md'
70 - 'TanStack/ai:docs/tools/server-tools.md'
71 - 'TanStack/ai:docs/tools/client-tools.md'
72 - 'TanStack/ai:docs/tools/tool-approval.md'
73 - 'TanStack/ai:docs/tools/lazy-tool-discovery.md'
74 - 'TanStack/ai:docs/tools/tool-architecture.md'
75 - 'TanStack/ai:packages/ai/src/tools/'
76​
77 - name: 'Media Generation'
78 slug: 'ai-core/media-generation'
79 type: 'sub-skill'
80 domain: 'media-generation'
81 path: 'skills/ai-core/media-generation/SKILL.md'
82 package: 'packages/ai'
83 description: >
84 Image, video, speech (TTS), and transcription generation using
85 activity-specific adapters: generateImage() with openaiImage/geminiImage,
86 generateVideo() with async polling, generateSpeech() with openaiSpeech,
87 generateTranscription() with openaiTranscription. React hooks:
88 useGenerateImage, useGenerateSpeech, useTranscription, useGenerateVideo.
89 TanStack Start server function integration with toServerSentEventsResponse.
90 requires:
91 - 'ai-core'
92 sources:
93 - 'TanStack/ai:docs/media/generations.md'
94 - 'TanStack/ai:docs/media/generation-hooks.md'
95 - 'TanStack/ai:docs/media/image-generation.md'
96 - 'TanStack/ai:docs/media/video-generation.md'
97 - 'TanStack/ai:docs/media/text-to-speech.md'
98 - 'TanStack/ai:docs/media/transcription.md'
99 subsystems:
100 - 'image-generation'
101 - 'video-generation'
102 - 'text-to-speech'
103 - 'transcription'
104​
105 - name: 'Structured Outputs'
106 slug: 'ai-core/structured-outputs'
107 type: 'sub-skill'
108 domain: 'chat-experiences'
109 path: 'skills/ai-core/structured-outputs/SKILL.md'
110 package: 'packages/ai'
111 description: >
112 Type-safe JSON schema responses from LLMs using outputSchema on chat().
113 Supports Zod, ArkType, and Valibot schemas. The adapter handles
114 provider-specific strategies transparently — never configure structured
115 output at the provider level. convertSchemaToJsonSchema() for manual
116 schema conversion.
117 requires:
118 - 'ai-core'
119 sources:
120 - 'TanStack/ai:docs/chat/structured-outputs.md'
121 - 'TanStack/ai:packages/ai/src/tools/schema-converter.ts'
122​
123 - name: 'Adapter Configuration'
124 slug: 'ai-core/adapter-configuration'
125 type: 'sub-skill'
126 domain: 'adapter-management'
127 path: 'skills/ai-core/adapter-configuration/SKILL.md'
128 package: 'packages/ai'
129 description: >
130 Provider adapter selection and configuration: openaiText, anthropicText,
131 geminiText, ollamaText, grokText, groqText, openRouterText. Per-model
132 type safety with modelOptions, reasoning/thinking configuration,
133 runtime adapter switching, extendAdapter() for custom models, createModel().
134 API key env vars: OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY/GEMINI_API_KEY,
135 XAI_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY, OLLAMA_HOST.
136 requires:
137 - 'ai-core'
138 sources:
139 - 'TanStack/ai:docs/adapters/openai.md'
140 - 'TanStack/ai:docs/adapters/anthropic.md'
141 - 'TanStack/ai:docs/adapters/gemini.md'
142 - 'TanStack/ai:docs/adapters/ollama.md'
143 - 'TanStack/ai:docs/adapters/grok.md'
144 - 'TanStack/ai:docs/adapters/groq.md'
145 - 'TanStack/ai:docs/adapters/openrouter.md'
146 - 'TanStack/ai:docs/advanced/per-model-type-safety.md'
147 - 'TanStack/ai:docs/advanced/runtime-adapter-switching.md'
148 - 'TanStack/ai:docs/advanced/extend-adapter.md'
149 subsystems:
150 - 'openai'
151 - 'anthropic'
152 - 'gemini'
153 - 'ollama'
154 - 'grok'
155 - 'groq'
156 - 'openrouter'
157 references:
158 - 'references/openai-adapter.md'
159 - 'references/anthropic-adapter.md'
160 - 'references/gemini-adapter.md'
161 - 'references/ollama-adapter.md'
162 - 'references/grok-adapter.md'
163 - 'references/groq-adapter.md'
164 - 'references/openrouter-adapter.md'
165​
166 - name: 'AG-UI Protocol'
167 slug: 'ai-core/ag-ui-protocol'
168 type: 'sub-skill'
169 domain: 'transport-protocol'
170 path: 'skills/ai-core/ag-ui-protocol/SKILL.md'
171 package: 'packages/ai'
172 description: >
173 Server-side AG-UI streaming protocol implementation: StreamChunk event
174 types (RUN_STARTED, TEXT_MESSAGE_START/CONTENT/END, TOOL_CALL_START/ARGS/END,
175 RUN_FINISHED, RUN_ERROR, STEP_STARTED/STEP_FINISHED, STATE_SNAPSHOT/DELTA,
176 CUSTOM), toServerSentEventsStream() for SSE format, toHttpStream() for
177 NDJSON format. For backends serving AG-UI events without client packages.
178 requires:
179 - 'ai-core'
180 sources:
181 - 'TanStack/ai:docs/protocol/chunk-definitions.md'
182 - 'TanStack/ai:docs/protocol/sse-protocol.md'
183 - 'TanStack/ai:docs/protocol/http-stream-protocol.md'
184​
185 - name: 'Middleware'
186 slug: 'ai-core/middleware'
187 type: 'sub-skill'
188 domain: 'extensibility'
189 path: 'skills/ai-core/middleware/SKILL.md'
190 package: 'packages/ai'
191 description: >
192 Chat lifecycle middleware hooks: onConfig, onStart, onChunk,
193 onBeforeToolCall, onAfterToolCall, onUsage, onFinish, onAbort, onError.
194 Use for analytics, event firing, tool caching (toolCacheMiddleware),
195 logging, and tracing. Middleware array in chat() config, left-to-right
196 execution order. NOT onEnd/onFinish callbacks on chat() — use middleware.
197 requires:
198 - 'ai-core'
199 sources:
200 - 'TanStack/ai:docs/advanced/middleware.md'
201 - 'TanStack/ai:packages/ai/src/middlewares/'
202​
203 - name: 'Custom Backend Integration'
204 slug: 'ai-core/custom-backend-integration'
205 type: 'composition'
206 domain: 'transport-protocol'
207 path: 'skills/ai-core/custom-backend-integration/SKILL.md'
208 package: 'packages/ai'
209 description: >
210 Connect useChat to a non-TanStack-AI backend through custom connection
211 adapters. ConnectConnectionAdapter (single async iterable) vs
212 SubscribeConnectionAdapter (separate subscribe/send). Customize
213 fetchServerSentEvents() and fetchHttpStream() with auth headers,
214 custom URLs, and request options. Import from framework package,
215 not @tanstack/ai-client.
216 requires:
217 - 'ai-core'
218 - 'ai-core/chat-experience'
219 sources:
220 - 'TanStack/ai:docs/chat/connection-adapters.md'
221 - 'TanStack/ai:packages/ai-client/src/connection-adapters.ts'
222​
223 # ── Code Mode skills (in @tanstack/ai-code-mode package) ──
224​
225 - name: 'Code Mode'
226 slug: 'ai-code-mode'
227 type: 'core'
228 domain: 'code-execution'
229 path: 'skills/ai-code-mode/SKILL.md'
230 package: 'packages/ai-code-mode'
231 description: >
232 LLM-generated TypeScript execution in sandboxed environments:
233 createCodeModeTool() with isolate drivers (createNodeIsolateDriver,
234 createQuickJSIsolateDriver, createCloudflareIsolateDriver),
235 codeModeWithSkills() for persistent skill libraries, trust strategies,
236 skill storage (FileSystem, LocalStorage, InMemory, Mongo), client-side
237 execution progress via code_mode:* custom events in useChat.
238 requires:
239 - 'ai-core'
240 - 'ai-core/chat-experience'
241 sources:
242 - 'TanStack/ai:docs/code-mode/code-mode.md'
243 - 'TanStack/ai:docs/code-mode/code-mode-isolates.md'
244 - 'TanStack/ai:docs/code-mode/code-mode-with-skills.md'
245 - 'TanStack/ai:docs/code-mode/client-integration.md'
246 - 'TanStack/ai:packages/ai-code-mode/src/'
247 - 'TanStack/ai:packages/ai-code-mode-skills/src/'
248 subsystems:
249 - 'node-isolate'
250 - 'quickjs-isolate'
251 - 'cloudflare-isolate'