Agent skill

Output Dev Types File

by growthxai in growthxai/output

Create types.ts files with Zod schemas for Output SDK workflows.

Apache-2.0Auto-check passedFrontend & Design

Install Output Dev Types File

skills CLI
$ npx skills add growthxai/output --skill output-dev-types-file -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install growthxai/output output-dev-types-file --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/growthxai/output.git skills-src && mkdir -p .claude/skills && cp -r skills-src/coding_assistants/claude/plugins/outputai/skills/output-dev-types-file .claude/skills/output-dev-types-file && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
output-dev-types-file
GitHub stars
442
Token cost
~2.8k tokens
SKILL.md length
438 words
Files
1
Skills in repo
52
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create types.ts files with Zod schemas for Output SDK workflows.

  • Works in 4 steps: Use Descriptive Field Descriptions → Provide Sensible Defaults → Separate Workflow and Step Schemas → …
  • Defining input/output schemas
  • SKILL.md covers Overview, When to Use This Skill, Critical Import Rule and Basic Structure, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Output Dev Types File is an agent skill from growthxai/output. Create types.ts files with Zod schemas for Output SDK workflows. Use when defining input/output schemas, creating type definitions, or fixing schema-related errors.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Forms and validation. It works with Zod. The repository describes itself as: The open-source TypeScript framework for building AI workflows and agents. Designed for Claude Code describe what you want, Claude builds it, with all the best practices already… The licence is Apache-2.0.

When your agent uses it

  • Defining input/output schemas
  • Creating type definitions
  • Fixing schema-related errors

Example prompts

  • “/output-dev-types-file”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Use Descriptive Field Descriptions
  2. Provide Sensible Defaults
  3. Separate Workflow and Step Schemas
  4. Export Both Schemas and Types

What it can do on your machine

Read from SKILL.md and the folder at commit ff9e1ab. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Output Dev Types File loads about 2.8k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 438 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from growthxai/output at commit ff9e1ab, republished under its Apache-2.0 licence (© growthxai). 438 words, ~2,783 tokens.

Download SKILL.mdSave it as .claude/skills/output-dev-types-file/SKILL.md (or your agent's skills folder).
name
output-dev-types-file
description
Create types.ts files with Zod schemas for Output SDK workflows. Use when defining input/output schemas, creating type definitions, or fixing schema-related errors.
allowed-tools
Read, Write, Edit

Creating types.ts Files with Zod Schemas

Overview

This skill documents how to create types.ts files for Output SDK workflows. These files contain Zod schemas for input/output validation and their corresponding TypeScript types.

When to Use This Skill

  • Creating a new workflow's type definitions
  • Adding new schemas for steps
  • Fixing schema validation errors
  • Refactoring existing type definitions

Critical Import Rule

ALWAYS import z from @outputai/core, NEVER from zod directly:

typescript
// CORRECT
import { z } from '@outputai/core';

// WRONG - will cause runtime errors
import { z } from 'zod';

Related Skill: output-error-zod-import for troubleshooting import issues

Basic Structure

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

// 1. Workflow Input Schema
export const WorkflowInputSchema = z.object( {
  // Define input fields
} );

// 2. Workflow Output Type
export type WorkflowInput = z.infer<typeof WorkflowInputSchema>;
export type WorkflowOutput = /* output type */;

// 3. Step Schemas (for each step)
export const StepNameInputSchema = z.object( {
  // Step input fields
} );

export const StepNameOutputSchema = z.object( {
  // Step output fields
} );

// 4. Type Exports
export type StepNameInput = z.infer<typeof StepNameInputSchema>;
export type StepNameOutput = z.infer<typeof StepNameOutputSchema>;

CRITICAL: Schema Constraints for LLM Output

Schemas passed to aiSdk.Output.object() are sent to LLM providers as tool definitions. Anthropic rejects several JSON Schema constraints that Zod methods produce. Getting this wrong causes runtime errors.

What Is NOT Allowed in LLM Output Schemas
  • Numbers: .min(), .max() on z.number() produce minimum/maximum -- rejected by Anthropic.
  • Arrays: .min(), .max(), .length() on z.array() produce minItems/maxItems -- Anthropic only supports minItems of 0 or 1. Values like .length( 3 ) or .min( 2 ) will be rejected.
Use .describe() Instead

.describe() is the primary mechanism for guiding LLM output quality. LLM providers use field names and descriptions from the schema to understand what each field should contain. Write clear, specific descriptions that communicate your intent.

Important: .describe() replaces both unsupported constraints AND prompt-based format instructions. Do not also describe the schema in the prompt -- the schema is sent to the provider automatically, and duplicating it reduces performance and creates drift risk. See output-dev-prompt-file for details.

typescript
// LLM output schema (sent to provider via aiSdk.Output.object()) -- .describe() ONLY
const llmOutputSchema = z.object( {
  score: z.number().describe( 'Quality score 0-100' ),
  confidence: z.number().describe( 'Confidence 0-1' ),
  predictions: z.array( predictionSchema ).describe( 'Exactly 3 predictions' )
} );

// Workflow/step validation schema (Zod-only, NOT sent to LLM) -- .min()/.max()/.length() OK
const workflowOutputSchema = z.object( {
  score: z.number().min( 0 ).max( 100 ).describe( 'Quality score 0-100' ),
  confidence: z.number().min( 0 ).max( 1 ).describe( 'Confidence 0-1' ),
  predictions: z.array( predictionSchema ).length( 3 ).describe( 'Exactly 3 predictions' )
} );
When to Use Which
Context.min()/.max()/.length().describe()
Schema passed to aiSdk.Output.object()No (numbers or arrays)Yes
inputSchema / outputSchema on stepsOKOptional
inputSchema / outputSchema on workflowsOKOptional
outputSchema on evaluatorsOKOptional
Show full SKILL.md (172 more words)Show less
LLM Schemas Must Live in types.ts

Define all schemas used in aiSdk.Output.object() in types.ts and import them in step functions. Never define them inline -- this causes duplication and makes it harder to verify they follow the constraints above.

Common Schema Patterns

Basic Types
typescript
import { z } from '@outputai/core';

// Strings
const stringField = z.string();
const optionalString = z.string().optional();
const stringWithDefault = z.string().default( 'default value' );
const describedString = z.string().describe( 'Field description' );

// Numbers
const numberField = z.number();
const integerField = z.number().int();
const rangedNumber = z.number().min( 1 ).max( 100 ); // runtime only — NOT safe for aiSdk.Output.object() schemas

// Booleans
const booleanField = z.boolean();
const defaultBoolean = z.boolean().default( false );

// Enums
const enumField = z.enum( [ 'option1', 'option2', 'option3' ] );
const enumWithDefault = z.enum( [ 'small', 'medium', 'large' ] ).default( 'medium' );
Complex Types
typescript
import { z } from '@outputai/core';

// Arrays
const stringArray = z.array( z.string() );
const objectArray = z.array( z.object( { id: z.string(), name: z.string() } ) );

// Objects
const nestedObject = z.object( {
  user: z.object( {
    id: z.string(),
    email: z.string().email()
  } ),
  settings: z.object( {
    notifications: z.boolean()
  } )
} );

// Union Types
const flexibleInput = z.union( [
  z.string(),
  z.array( z.string() )
] );

// Records
const keyValueMap = z.record( z.string(), z.number() );
Validation Patterns
typescript
import { z } from '@outputai/core';

// String Validations
const emailField = z.string().email();
const urlField = z.string().url();
const uuidField = z.string().uuid();
const minLengthString = z.string().min( 1 );
const maxLengthString = z.string().max( 1000 );

// Number Validations
const positiveNumber = z.number().positive();
const nonNegativeNumber = z.number().nonnegative();
const percentageNumber = z.number().min( 0 ).max( 100 );

// Array Validations (runtime only — NOT safe for aiSdk.Output.object() schemas)
const nonEmptyArray = z.array( z.string() ).min( 1 );
const limitedArray = z.array( z.string() ).max( 10 );
const fixedLengthArray = z.array( z.string() ).length( 3 );

Complete Example

Based on a real workflow (image_infographic_nano):

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

// ============================================
// Workflow Schemas
// ============================================

export const WorkflowInputSchema = z.object( {
  content: z.string().describe( 'Text content to generate image ideas from' ),
  mode: z.enum( [ 'infographic' ] ).default( 'infographic' ).describe( 'Type of image to generate' ),
  colorPalette: z.string().optional().describe( 'Color palette preference for the images' ),
  artDirection: z.string().optional().describe( 'Art direction or style preference' ),
  numberOfIdeas: z.number().min( 1 ).max( 10 ).default( 1 ).describe( 'Number of image concepts to generate' ),
  referenceImageUrls: z.union( [
    z.string(),
    z.array( z.string() )
  ] ).optional().describe( 'Reference image URLs for style guidance (max 14)' ),
  aspectRatio: z.enum( [ '1:1', '16:9', '9:16', '4:3', '3:4' ] ).default( '1:1' ).describe( 'Aspect ratio for generated images' ),
  resolution: z.enum( [ '1K', '2K', '4K' ] ).default( '1K' ).describe( 'Resolution for generated images' ),
  numberOfGenerations: z.number().min( 1 ).max( 10 ).default( 1 ).describe( 'Number of images to generate per concept' ),
  storageNamespace: z.string().optional().describe( 'S3 folder path for storing images' )
} );

export type WorkflowInput = z.infer<typeof WorkflowInputSchema>;
export type WorkflowOutput = string[];

// ============================================
// Step Schemas
// ============================================

export const ValidateReferenceImagesInputSchema = z.object( {
  referenceImageUrls: z.array( z.string() ).optional()
} );

export const GenerateImageIdeasInputSchema = z.object( {
  content: z.string(),
  numberOfIdeas: z.number(),
  colorPalette: z.string().optional(),
  artDirection: z.string().optional()
} );

export const GenerateImagesInputSchema = z.object( {
  input: z.object( {
    referenceImageUrls: z.union( [ z.string(), z.array( z.string() ) ] ).optional(),
    aspectRatio: z.enum( [ '1:1', '16:9', '9:16', '4:3', '3:4' ] ),
    resolution: z.enum( [ '1K', '2K', '4K' ] ),
    numberOfGenerations: z.number(),
    storageNamespace: z.string().optional()
  } ),
  prompt: z.string()
} );

// Schema for LLM response validation
export const ImageIdeasSchema = z.object( {
  ideas: z.array( z.string() ).describe( 'Array of detailed image prompts for Gemini' )
} );

// ============================================
// Type Exports
// ============================================

export type ValidateReferenceImagesInput = z.infer<typeof ValidateReferenceImagesInputSchema>;
export type GenerateImageIdeasInput = z.infer<typeof GenerateImageIdeasInputSchema>;
export type GenerateImagesInput = z.infer<typeof GenerateImagesInputSchema>;
export type ImageIdeas = z.infer<typeof ImageIdeasSchema>;

Best Practices

1. Use Descriptive Field Descriptions
typescript
// Good - helps with documentation and error messages
z.string().describe( 'User email address for notifications' )

// Avoid - no context for errors
z.string()
2. Provide Sensible Defaults
typescript
// Good - workflow works without optional fields
numberOfIdeas: z.number().min( 1 ).max( 10 ).default( 1 )

// Avoid - forces users to provide every field
numberOfIdeas: z.number().min( 1 ).max( 10 )
3. Separate Workflow and Step Schemas
typescript
// Workflow input schema (what the user provides)
export const WorkflowInputSchema = z.object( { ... } );

// Step schemas (internal data shapes)
export const StepNameInputSchema = z.object( { ... } );
4. Export Both Schemas and Types
typescript
// Export schema for runtime validation
export const UserSchema = z.object( { ... } );

// Export type for TypeScript type checking
export type User = z.infer<typeof UserSchema>;

Verification Checklist

  • z is imported from @outputai/core
  • WorkflowInputSchema is defined and exported
  • WorkflowInput type is exported
  • WorkflowOutput type is defined
  • Each step has corresponding input/output schemas
  • All schemas have .describe() for important fields
  • Optional fields use .optional() or .default()
  • Numeric fields have appropriate constraints (.min()/.max() for runtime schemas, .describe() for aiSdk.Output.object() schemas)
  • Code follows style conventions (see output-dev-code-style)
  • output-dev-workflow-function - Using schemas in workflow definitions
  • output-dev-step-function - Using schemas in step definitions
  • output-dev-evaluator-function - Using schemas in evaluator definitions
  • output-dev-folder-structure - Where types.ts belongs in the project
  • output-error-zod-import - Troubleshooting schema import issues
  • output-dev-code-style - Code style conventions

© growthxai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in coding_assistants/claude/plugins/outputai/skills/output-dev-types-file of growthxai/output.

Open the folder on GitHubat commit ff9e1ab

Compare with similar skills

Output Dev Types File next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Output Dev Types File compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Output Dev Types File this skillgrowthxai/output442—~2.8kAutomated safety check: PassApache-2.0
World Book Skillecho-xianyu/worldbook-skill211—~1.8kAutomated safety check: PassCustom licence
Reglevictorgarciaesgi/regle506—~840Automated safety check: PassMIT
Buzzformbuildnbuzz/buzzform102—~1.5kAutomated safety check: PassMIT
Regle Migrate Vuelidatevictorgarciaesgi/regle506—~752Automated safety check: PassMIT
Shared SchemasInsForge/InsForge13k—~628Automated safety check: PassApache-2.0

Similar skills

  • World Book Skill

    echo-xianyu/worldbook-skill

    Create and manage SillyTavern Character Cards (角色卡) and World Books (世界书).

    211 GitHub stars~1.8k tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • Regle

    victorgarciaesgi/regle

    Core Regle form validation in Vue 3 — setup with useRegle, the reactive r$ object, validation properties, displaying errors, and modifiers.

    506 GitHub stars~840 tokensUpdated 11 days ago
    Frontend & DesignAuto-check passed
  • Buzzform

    buildnbuzz/buzzform

    A skill your agent uses when working with BuzzForm schema-driven forms, @buildnbuzz/form-core, @buildnbuzz/form-react, or any related APIs like defineSchema, InferType, FormProvider, useDataField…

    102 GitHub stars~1.5k tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • Regle Migrate Vuelidate

    victorgarciaesgi/regle

    Migrate Vuelidate form validation to Regle. An agent skill from victorgarciaesgi/regle.

    506 GitHub stars~752 tokensUpdated 11 days ago
    Frontend & DesignAuto-check passed
  • Shared Schemas

    InsForge/InsForge

    A skill your agent uses when contributing to InsForge's shared schema package.

    13k GitHub stars~628 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Sets the conventions for the Opik React frontend: TanStack Query for data, Zustand for shared state, one-way layer imports and a fix for Google Translate crashes.

    22k GitHub stars~1.1k tokensUpdated today
    Frontend & DesignAuto-check passed

More from growthxai/output

All 52 skills in this repo
  • Zod schema constraints that Anthropic rejects or silently ignores when sent as structured-output tool definitions via aiSdk.Output.object().

    442 GitHub stars~597 tokensUpdated today
    Auto-check passed
  • Output Build Workflow

    growthxai/output

    Implement an Output SDK workflow from a plan document. An agent skill from growthxai/output.

    442 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Output Credentials Edit

    growthxai/output

    View, edit, and set encrypted credentials in an Output.ai project.

    442 GitHub stars~1.1k tokensUpdated today
    Auto-check: notes
  • Wire encrypted credentials to environment variables using the credential: convention.

    442 GitHub stars~930 tokensUpdated today
    Auto-check: notes
  • Output Credentials Init

    growthxai/output

    Initialize encrypted credentials for an Output.ai project. An agent skill from growthxai/output.

    442 GitHub stars~803 tokensUpdated today
    Auto-check: notes
  • Output Debug Workflow

    growthxai/output

    Debug Output SDK workflow issues. An agent skill from growthxai/output.

    442 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Works with

Questions about Output Dev Types File

What does Output Dev Types File do?

Create types.ts files with Zod schemas for Output SDK workflows. Output Dev Types File is an agent skill from growthxai/output.ts files with Zod schemas for Output SDK workflows.

When should I use Output Dev Types File?

Output Dev Types File fits situations like: defining input/output schemas; creating type definitions; fixing schema-related errors.

How do I install Output Dev Types File in Claude Code?

Run `npx skills add growthxai/output --skill output-dev-types-file -a claude-code`. Or copy the skill folder (coding_assistants/claude/plugins/outputai/skills/output-dev-types-file in growthxai/output) into .claude/skills/output-dev-types-file in your project. Claude Code loads it when a task matches its description.

How do I install Output Dev Types File in Codex?

Run `npx skills add growthxai/output --skill output-dev-types-file -a codex`. Or copy the skill folder (coding_assistants/claude/plugins/outputai/skills/output-dev-types-file in growthxai/output) into .agents/skills/output-dev-types-file in your project. Codex loads it when a task matches its description.

Can I use Output Dev Types File in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add growthxai/output --skill output-dev-types-file -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/output-dev-types-file, .gemini/skills/output-dev-types-file, .github/skills/output-dev-types-file and .opencode/skills/output-dev-types-file in your project.

What does Output Dev Types File need to run?

SKILL.md names no scripts, command-line tools or credentials: Output Dev Types File is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit.

Does Output Dev Types File access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Output Dev Types File safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Output Dev Types File use?

Output Dev Types File is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Output Dev Types File use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Output Dev Types File?

Skills that share tags, products or a category with Output Dev Types File: World Book Skill (echo-xianyu/worldbook-skill, 211 stars), Regle (victorgarciaesgi/regle, 506 stars), Buzzform (buildnbuzz/buzzform, 102 stars) and Regle Migrate Vuelidate (victorgarciaesgi/regle, 506 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Output Dev Types File?

growthxai (a GitHub organization) maintains it in growthxai/output, which has 442 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 8, 2026.

Source: growthxai/output on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.