output-error-zod-import

output-error-zod-import is a skill for Claude Code from growthxai/output. It costs 45 tokens per session (1,175 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for schema errors in Output SDK workflows that use Zod, a TypeScript library for checking data shapes. It explains why schemas must come from the SDK's bundled source.

In plain words
What is it for?
Use it to diagnose incompatible-schema messages, step-boundary type errors, validation failures, and mismatched Zod types.
Why use it?
It helps resolve errors when workflow steps reject each other's data because their schemas were created from incompatible Zod sources.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the outputai plugin — 50 skills, 5 agents, 1 hook shipped together

Good fit Use it to diagnose incompatible-schema messages, step-boundary type errors, validation failures, and mismatched Zod types.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/growthxai/output/output-error-zod-import
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add growthxai/output --skill output-error-zod-import
Clone the repo
git clone --depth 1 https://github.com/growthxai/output

Made for: Claude Code.

Or install outputai, the plugin that ships this one along with the rest of its 50 skills, 5 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for output-error-zod-import

README.md
[![agentmods](https://agentmods.dev/badge/skills/growthxai/output/output-error-zod-import/github.svg)](https://agentmods.dev/skills/growthxai/output/output-error-zod-import)
Your own site
<a href="https://agentmods.dev/skills/growthxai/output/output-error-zod-import"><img src="https://agentmods.dev/badge/skills/growthxai/output/output-error-zod-import/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for output-error-zod-import

Your own site · 80×15
<a href="https://agentmods.dev/skills/growthxai/output/output-error-zod-import"><img src="https://agentmods.dev/badge/skills/growthxai/output/output-error-zod-import.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,175 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 148
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01175
Opus 5 $0.00023 $0.00588
Sonnet 5 $0.00009 $0.00235
Haiku 4.5 $0.00005 $0.00118

Measured 11d ago against content hash 49cee02e32a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

output-error-zod-import scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

coding_assistants/claude/plugins/outputai/skills/output-error-zod-import/SKILL.md · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fix Zod Import Source Issues

Overview

This skill helps diagnose and fix a common issue where Zod schemas are imported from the wrong source. Output SDK requires schemas to be imported from @outputai/core, not directly from zod.

When to Use This Skill

You're seeing:

  • "incompatible schema" errors
  • Type errors at step boundaries
  • Schema validation failures when passing data between steps
  • Errors mentioning Zod types not matching
  • "Expected ZodObject but received..." errors

Root Cause

The issue occurs when you import z from zod instead of @outputai/core. While both provide Zod schemas, they create different schema instances that aren't compatible with each other within the Output SDK context.

Why this matters: Output SDK uses a specific version of Zod internally for serialization and validation. When you use a different Zod instance, the schemas are technically different objects even if they define the same shape.

Symptoms

Error Messages

Error: Incompatible schema types
Error: Schema validation failed: expected compatible Zod instance
TypeError: Cannot read property 'parse' of undefined

Code Patterns That Cause This

// WRONG: Importing from 'zod' directly
import { z } from 'zod';

const inputSchema = z.object( {
  name: z.string()
} );

Solution

Step 1: Find All Zod Imports

Search your codebase for incorrect imports:

grep -r "from 'zod'" src/
grep -r 'from "zod"' src/

Step 2: Update Imports

Change all imports from:

// Wrong
import { z } from 'zod';

To:

// Correct
import { z } from '@outputai/core';

Step 3: Verify No Direct Zod Dependencies

Check your imports don't accidentally use zod elsewhere:

grep -r "import.*zod" src/

All matches should show @outputai/core, not zod.

Complete Example

Before (Wrong)

// src/workflows/my-workflow/steps/process.ts
import { z } from 'zod';  // Wrong!
import { step } from '@outputai/core';

export const processStep = step( {
  name: 'processData',
  inputSchema: z.object( {
    id: z.string()
  } ),
  outputSchema: z.object( {
    result: z.string()
  } ),
  fn: async input => {
    return { result: `Processed ${input.id}` };
  }
} );

Read the full file on GitHub · 210 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 210 lines · 45 tokens per session scan A 49cee02e32a2

Subscribe to this mod's changes

output-error-zod-import is a skill published in the GitHub repository growthxai/output (435 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 1,175 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ax-agent-rlm

This skill helps an LLM generate correct AxAgent RLM/runtime code using @ax-llm/ax. Use when the user asks about RLM code execution, AxJSRuntime, contextFields, contextPolicy, liveRuntimeState, promptLevel, stage prompt controls, executorModelPolicy, maxRuntimeChars, agent.test(...), llmQuery(...), recursionOptions…

ax-llm/ax · 88 tokens

ax-agent

This skill helps an LLM generate correct core AxAgent code using @ax-llm/ax. Use when the user asks about agent(), child agents, namespaced functions, discovery mode, clarification, bubbleErrors, host-side final/clarification protocol, or ordinary agent runtime behavior. For MCP clients, native runtime modules…

ax-llm/ax · 131 tokens

ax-ai

This skill helps an LLM generate correct AI provider setup and configuration code using @ax-llm/ax. Use when the user asks about ai(), providers, models, routing, adaptive balancing, presets, embeddings, batch audio with ai.transcribe() or ai.speak(), extended thinking, context caching, or mentions…

ax-llm/ax · 100 tokens

ax-flow

This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax. Use when the user asks about flow(), AxFlow, workflow orchestration, parallel execution, DAG workflows, conditional routing, map/reduce patterns, or multi-node AI pipelines.

ax-llm/ax · 59 tokens

ax-agent-memory-skills

This skill helps an LLM generate correct AxAgent memory retrieval, context-map, and dynamic skill-loading code using @ax-llm/ax. Use when the user asks about contextMap, AxAgentContextMap, onMemoriesSearch, memoriesCatalog, recall(...), inputs.memories, onLoadedMemories, onUsedMemories, onSkillsSearch, skillsCatalog…

ax-llm/ax · 128 tokens

ax-agent-optimize

This skill helps an LLM generate correct AxAgent tuning and evaluation code using @ax-llm/ax. Use when the user asks about agent.optimize(...), judgeOptions, eval datasets, optimization targets, saved optimizedProgram artifacts, or agent optimization guidance.

ax-llm/ax · 57 tokens