All skills
skilld-dev avatar

/tanstack-ai-vue-skilld

@b9c39cb

Use when writing or debugging Vue code that imports @tanstack/ai-vue. Covers useChat, createChatHook, the generation composables (image, audio, speech, video, transcription, summarize), useAudioRecorder, useByok, useWebMCPTools, and the @tanstack/ai-vue/ui and /byok subpaths. Provides current API shapes, reactive-state rules, and version limits for @tanstack/ai-vue 0.24.x.

Use this Skill: https://skilld.dev/gh/skilld-dev/vue-ecosystem-skills/tanstack-ai-vue-skilld

This session only. Nothing lands on disk.

referencesbyok-and-webmcp.md

≈609 tokens on demand. Your agent reads this file only when SKILL.md points to it.

BYOK and WebMCP

useByok(client)

From the root entry. Takes a ByokClient instance and returns a reactive DeepReadonly<ShallowRef<ByokSnapshot>> that updates on every keyring change and unsubscribes on scope dispose (source: src/use-byok.ts:5-14).

import { useByok } from '@tanstack/ai-vue'
import { ByokClient } from '@tanstack/ai-vue/byok'

const client = new ByokClient({ /* storage, provider registry */ })
const snapshot = useByok(client)

The /byok subpath

Re-exports the BYOK toolkit from @tanstack/ai-client/byok (source: src/byok.ts:1-25):

  • Classes and factories: ByokClient, defineByok, defineByokProvider.
  • Storage: passkeyStorage, memoryStorage, defaultByokStorage, isPasskeyStorageSupported, PasskeyStorageOptions.
  • Crypto: encryptKeyring, decryptKeyring, deriveAesKey, EMPTY_BYOK_SNAPSHOT.
  • Types: ByokSnapshot, ByokProvider, ByokProviderInit, ByokPrompt, DefineByokOptions, KeyPreview, KeyStatus, Keyring, KeyringStorage.

Wiring BYOK into hooks

Both useChat and every generation composable accept byok?: ByokClient and byokProvider?: () => ProviderId | undefined. Keys travel in x-byok-* request headers, never the body. byokProvider is a getter: if it returns a slug only that key is sent; if no slug resolves (byokProvider, then body.provider), generation throws (source: src/use-generation.ts:35-38).

const { generate, result } = useGenerateImage({
  connection: fetchServerSentEvents('/api/generate/image'),
  byok: client,
  byokProvider: () => selectedProvider.value,
})

useWebMCPTools(tools, options?)

From the root entry. Registers executable client tools with WebMCP for the current Vue scope; scope disposal aborts registration and removes every tool registered by the call (source: src/use-web-mcp-tools.ts:27-55).

useWebMCPTools([searchProducts], {
  onError: (error) => console.error('WebMCP registration failed', error),
})
  • tools: the executable client tools to expose (build with clientTools or individual .client() implementations).
  • options: RegisterWebMCPToolsOptions minus signal (managed internally) plus onError?: (error: unknown) => void for async registration failures (source: src/use-web-mcp-tools.ts:9-16).
  • Options are optional when the inferred options type is empty (conditional tuple parameter, source: src/use-web-mcp-tools.ts:18-24).

Source: SKILL.md on GitHub

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill provides documentation and implementation rules for the @tanstack/ai-vue library, focusing on Vue 3 composables for chat and media generation. It contains no malicious patterns, credentials, or unauthorized network operations.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at b9c39cb. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated last week

README badge

README badge for skilld-dev/vue-ecosystem-skills/tanstack-ai-vue-skilld