zod

Enforce correct Zod import conventions for tree-shaking in JavaScript and TypeScript projects.

Updated Nov 19, 2025
One-click install
npx skills add https://github.com/alexturpin/cf-app-starter --skill zod-alexturpin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zod
Source: https://github.com/alexturpin/cf-app-starter/tree/main/.opencode/skills/zod
Command: npx skills add https://github.com/alexturpin/cf-app-starter --skill zod-alexturpin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses potential issues with Zod imports that could lead to larger bundle sizes by ensuring correct import conventions are followed.

Core Features & Use Cases

  • Optimized Imports: Guides users on the correct way to import Zod to leverage tree-shaking.
  • Bundle Size Reduction: Helps maintain smaller application bundles by avoiding unnecessary code inclusion.
  • Use Case: When integrating Zod for data validation in a frontend application, using the recommended import ensures that only the necessary Zod functions are included in the final build.

Quick Start

Use the zod skill to import the zod library correctly.

Frequently Asked Questions about zod

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce my bundle size when importing Zod in a TypeScript project?

Reducing your bundle size with Zod requires following specific import conventions that enable tree shaking, ensuring only necessary Zod validation functions are included in your final JavaScript or TypeScript build.

What is the correct way to import Zod for tree shaking?

Importing Zod for tree shaking involves using the recommended import statement, which allows your bundler to eliminate unused code and maintain an optimal bundle size for your application.

Does Zod support tree shaking in JavaScript frontend applications?

Yes, Zod supports tree shaking in JavaScript frontend applications when you use the correct import conventions, preventing unnecessary code inclusion and maintaining smaller application bundles.

Why does importing Zod increase my bundle size?

Importing Zod increases your bundle size when correct import conventions are not followed, disabling tree shaking and causing unnecessary validation code to be included in your build.

Can I use Zod for schema validation without inflating my application bundle?

Yes, you can use Zod for schema validation without inflating your application bundle by adhering to the specified import statement, which leverages tree shaking for optimal bundle size.