config-schema-setup_skill

This skill validates and enforces type-safe environment configurations using a Zod-inspired schema, covering server and client fields, feature flags, and
  • TypeScript

8

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill andrelandgraf/fullstackrecipes --skill config-schema-setup

  • SKILL.md605 B

Overview

This skill provides a TypeScript-first, type-safe environment variable validation system using Zod with a Drizzle-like schema API. It organizes configuration into server-only and public fields, supports feature flags, either-or constraints, and includes client-side protection patterns. The goal is predictable runtime validation and clear compile-time types for full-stack AI apps. It ships as a set of production-ready patterns and step-by-step recipes.

How this skill works

You define a declarative schema using a Drizzle-style API that maps directly to Zod validators. The system generates strict runtime checks and infers TypeScript types so you get end-to-end type safety for env vars. It enforces server/public separation, validates mutually exclusive or either-or constraints, and produces client-safe subsets to avoid leaking secrets. Validation runs at startup and fails fast with descriptive errors.

When to use it

  • When you need strict, typed validation of environment variables in a TypeScript full-stack app.
  • When you must prevent accidental exposure of server-only secrets to the client.
  • When feature flags or mutually exclusive config options require formal validation.
  • When you want early-failure validation at app startup with readable error messages.
  • When you want a consistent schema-driven approach across multiple services or deployments.

Best practices

  • Declare separate server and public fields explicitly to avoid leaking secrets.
  • Use Zod refinements for complex constraints and either-or rules for mutual exclusion.
  • Keep feature flags as explicit booleans or typed enums and document their runtime behavior.
  • Run validation during the application bootstrap to fail fast and provide actionable logs.
  • Generate and export inferred TypeScript types from the schema for use throughout the codebase.

Example use cases

  • A full-stack AI app that validates API keys and exposes only non-secret settings to the browser.
  • A deployment pipeline that checks feature flags and either-or DB credentials before promoting releases.
  • A monorepo where multiple services consume a shared schema with consistent type guarantees.
  • A server-rendered app that must ensure environment shape consistency across staging and production.

FAQ

Yes. The API is Zod-compatible and can compose with existing Zod validators and refinements.

How does client-side protection work?

Schemas mark fields as public or server-only and the tool extracts only public fields for client bundles, preventing secret leakage.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
config-schema-setup skill by andrelandgraf/fullstackrecipes | VeilStrat