Agent skill · Audited from source
Ai Code Mode
skill · TanStack/aiMIT licenceAudited 8 Oct 2026 · source dafe8ab3bd88
Is it safe? No — BLOCK, grade D (69/100). We read this skill's source at commit dafe8ab3bd88 and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 1 finding, 1 critical or high. What it does: LLM-generated TypeScript execution in sandboxed environments: createCodeModeTool() with isolate drivers (createNodeIsolateDriver, createQuickJSIsolateDriver, createQuickJSBunIsolateDriver,…
Cite
Cite this page
ModelsAtlas. “Ai Code Mode (TanStack/ai)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/tanstack/ai-code-mode
Blocked. The page stays public so you can check this skill if someone recommended it to you. The audit found 1 critical or high finding, starting with “Prompt injection” in SKILL.md:489. Do not install it without reading them.
Trust audit
Audit 0.4.1 · source read 8 Oct 2026
BLOCK means the audit found something that could harm you or your machine. Grade D is shared by 749 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | FAIL | 1 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: critical finding, no behavioural pass, undeclared transfer.
Findings (1)
CRITICALPrompt injectionprompt.transfer_instruction · SKILL.md:489
Code Mode executes LLM-generated code. Any secrets available in the sandbox context are accessible to generated code, which could exfiltrate them via tool calls. Never pass API keys, database credenti
- Why
- an instruction to move sensitive data to an outside destination
- Fix
- remove; a skill never needs the user's secrets off the machine
Audit 0.4.1 · source sha dafe8ab3bd88 · 8 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- PublisherTanStack GitHub organizationOwner of the repository this skill is read from
- Source folderTanStack/ai/packages/ai-code-mode/skills/ai-code-modeThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdictdafe8ab3bd88A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: LLM-generated TypeScript execution in sandboxed environments: createCodeModeTool() with isolate drivers (createNodeIsolateDriver, createQuickJSIsolateDriver, createQuickJSBunIsolateDriver,…
---
name: ai-code-mode
description: >
LLM-generated TypeScript execution in sandboxed environments:
createCodeModeTool() with isolate drivers (createNodeIsolateDriver,
createQuickJSIsolateDriver, createQuickJSBunIsolateDriver,
createCloudflareIsolateDriver),
codeModeWithSnippets() for persistent snippet libraries, trust strategies,
snippet storage (FileSystem, LocalStorage, InMemory, Mongo), client-side
execution progress via code_mode:* custom events in useChat.
type: core
library: tanstack-ai
library_version: '0.3.8'
sources:
- 'TanStack/ai:docs/code-mode/code-mode.md'
- 'TanStack/ai:docs/code-mode/code-mode-isolates.md'
- 'TanStack/ai:docs/code-mode/code-mode-with-snippets.md'
- 'TanStack/ai:docs/code-mode/client-integration.md'
- 'TanStack/ai:docs/code-mode/lazy-tools.md'
---
> **Note**: This skill requires familiarity with ai-core and ai-core/chat-experience. Code Mode is always used on top of a chat experience.
## Setup
Complete Code Mode setup with Node.js isolate driver:
```typescript
import { chat, toServerSentEventsResponse, toolDefinition } from '@tanstack/ai'
import { openaiText } from '@tanstack/ai-openai'
import { createCodeModeTool } from '@tanstack/ai-code-mode'
import { createNodeIsolateDriver } from '@tanstack/ai-isolate-node'
import { z } from 'zod'
// Define a tool that code can call
const fetchWeather = toolDefinition({
name: 'fetchWeather',
description: 'Get current weather for a city',
inputSchema: z.object({ city: z.string() }),
outputSchema: z.object({ temp: z.number(), condition: z.string() }),
}).server(async ({ city }) => {
const res = await fetch(`https://api.weather.com/${city}`)
return res.json()
})
// Create code mode tool with Node isolate
const codeModeTool = createCodeModeTool({
driver: createNodeIsolateDriver({
memoryLimit: 128,
timeout: 30000,
}),
tools: [fetchWeather],
})
// Use in chat
export async function POST(request: Request) {
const { messages } = await request.json()
const stream = chat({
adapter: openaiText('gpt-5.5'),
messages,
tools: [codeModeTool],
})
return toServerSentEventsResponse(stream)
}
```
The recommended higher-level entry point is `createCodeMode()`, which returns both the tool and a matching system prompt:
```typescript
import { chat, toServerSentEventsResponse, toolDefinition } from '@tanstack/ai'
import { createCodeMode } from '@tanstack/ai-code-mode'
import { createNodeIsolateDriver } from '@tanstack/ai-isolate-node'
import { openaiText } from '@tanstack/ai-openai'
import { z } from 'zod'
const fetchWeather = toolDefinition({
name: 'fetchWeather',
description: 'Get current weather for a city',
inputSchema: z.object({ city: z.string() }),
outputSchema: z.object({ temp: z.number(), condition: z.string() }),
}).server(async ({ city }) => {
const res = await fetch(`https://api.weather.com/${city}`)
return res.json()
})
const { tool, systemPrompt } = createCodeMode({
driver: createNodeIsolateDriver(),
tools: [fetchWeather],
timeout: 30_000,
})
export async function POST(request: Request) {
const { messages } = await request.json()
const stream = chat({
adapter: openaiText('gpt-5.5'),
systemPrompts: ['You are a helpful assistant.', systemPrompt],
tools: [tool],
messages,
})
return toServerSentEventsResponse(stream)
}
```
`createCodeMode` calls `createCodeModeTool` and `createCodeModeSystemPrompt` internally. The system prompt includes generated TypeScript type stubs for each tool so the LLM writes correct calls.
## Core Patterns
### 1. Choosing an Isolate Driver
Four drivers implement the `IsolateDriver` interface. All are interchangeable.
**Node.js** (`createNodeIsolateDriver`) -- Full V8 with JIT. Fastest option. Requires `isolated-vm` native C++ addon.
```typescript
import { createNodeIsolateDriver } from '@tanstack/ai-isolate-node'
const driver = createNodeIsolateDriver({
memoryLimit: 128, // MB, default 128
timeout: 30_000, // ms, default 30000
// skipProbe: false -- set true only after verifying compatibility
})
```
**QuickJS** (`createQuickJSIsolateDriver`) -- WASM-based, no native deps. Works in Node.js, browsers, Deno, Bun, and edge runtimes. Slower (interpreted, no JIT). Limited stdlib (no File I/O).
```typescript
import { createQuickJSIsolateDriver } from '@tanstack/ai-isolate-quickjs'
const driver = createQuickJSIsolateDriver({
memoryLimit: 128, // MB, default 128
timeout: 30_000, // ms, default 30000
maxStackSize: 524288, // bytes, default 512 KiB
})
```
**QuickJS Bun** (`createQuickJSBunIsolateDriver`) -- Native QuickJS on the Bun runtime via `bun:ffi`. Requires Bun >= 1.3.14 (throws a descriptive error on Node.js). No native deps or build step. Each context gets a dedicated QuickJS runtime with its own memory limit, stack size, and interrupt-based timeout. Recommended QuickJS option on Bun, where the WASM driver's asyncify bridge is unreliable for async host tool calls.
```typescript
import { createQuickJSBunIsolateDriver } from '@tanstack/ai-isolate-quickjs-bun'
const driver = createQuickJSBunIsolateDriver({
memoryLimit: 128, // MB, default 128
timeout: 30_000, // ms, default 30000
maxStackSize: 524288, // bytes, default 512 KiB
})
```
**Cloudflare** (`createCloudflareIsolateDriver`) -- Edge execution via a deployed Cloudflare Worker. Requires a `workerUrl` pointing to your deployed worker. Network latency on each tool call.
```typescript
import { createCloudflareIsolateDriver } from '@tanstack/ai-isolate-cloudflare'
const driver = createCloudflareIsolateDriver({
workerUrl: 'https://my-code-mode-worker.my-account.workers.dev',
authorization: process.env.CODE_MODE_WORKER_SECRET,
timeout: 30_000, // ms, default 30000
maxToolRounds: 10, // max tool-call/result cycles, default 10
})
```
| Driver | Best for | Native deps | Browser support | Performance |
| ----------- | --------------------------- | ---------------Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit dafe8ab
git clone https://github.com/TanStack/ai git -C ai checkout dafe8ab3bd88
The author documents no install command, so this uses the repository directly. Our verdict covers commit dafe8ab3bd88 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✕BLOCK D 69 / 100
first audit · source
dafe8ab3bd88
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/tanstack/ai-code-mode/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
TanStack/ai
Provider adapter selection and configuration: openaiText, anthropicText, geminiText, ollamaText, grokText, groqText, openRouterText, bedrockText, byteplusText, openaiCompatible. Per-model type safety with modelOptions,…
TanStack/ai
Server-side AG-UI streaming protocol implementation: StreamChunk event types (RUN_STARTED, TEXT_MESSAGE_START/CONTENT/END, TOOL_CALL_START/ARGS/END, RUN_FINISHED, RUN_ERROR, STEP_STARTED/STEP_FINISHED,…
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,…
TanStack/ai
End-to-end chat implementation: server endpoint with chat() and toServerSentEventsResponse(), client-side useChat hook with fetchServerSentEvents(), message rendering with UIMessage parts, multimodal content,…
TanStack/ai
Connect useChat to a non-TanStack-AI backend through custom connection adapters. ConnectConnectionAdapter (single async iterable) vs SubscribeConnectionAdapter (separate subscribe/send). Customize…
TanStack/ai
Pluggable, category-toggleable debug logging for TanStack AI activities. Toggle with `debug: true | false | DebugConfig` on chat(), summarize(), generateImage(), generateSpeech(), generateTranscription(),…
Add this badge to your README
[](https://modelsatlas.com/skills/tanstack/ai-code-mode/)
<a href="https://modelsatlas.com/skills/tanstack/ai-code-mode/"><img src="https://modelsatlas.com/skills/tanstack/ai-code-mode/badge.svg" alt="ModelsAtlas: BLOCK D"></a>
Questions about Ai Code Mode
What does the Ai Code Mode skill do?
Is Ai Code Mode safe to install?
What can Ai Code Mode access on my machine?
What do I need installed to use Ai Code Mode?
How current is this page?
Sources
- github.com/TanStack/ai/tree/main/packages/ai-code-mode/skills/ai — the audited source at commit dafe8ab3bd88 and every finding aboveObserved · 8 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Ai Code Mode skill do?
- Is Ai Code Mode safe to install?
- What can Ai Code Mode access on my machine?