Rule Schemas

z.infer

v1.0.0

Über diesen Skill

Install Rule Schemas, an AI agent skill for AI agent workflows and automation. Explore features, use cases, limitations, and setup guidance.

Funktionen

Apply this rule whenever work touches:
Define schemas close to the types they describe. A common pattern is to export both from the same
import { z } from 'zod';
export const VehicleSchema = z.object({
plate: z.string().min(7),

# Kernthemen

carrot-foundation carrot-foundation
[3]
[0]
Aktualisiert: 3/18/2026

Skill Overview

Start with fit, limitations, and setup before diving into the repository.

Install Rule Schemas, an AI agent skill for AI agent workflows and automation. Explore features, use cases, limitations, and setup guidance.

Warum diese Fähigkeit verwenden

Ermöglicht es den Agents, die Datenintegrität sicherzustellen und Workflows zu automatisieren, indem sie Zod verwenden, um eine Laufzeitvalidierung und eine Typinferenz über `z.infer` für `.ts`-Dateien bereitzustellen.

Am besten geeignet für

Perfekt für TypeScript-Agents, die eine robuste Laufzeitvalidierung und kanonische Typdefinitionen benötigen.

Handlungsfähige Anwendungsfälle for Rule Schemas

Daten an Laufzeitgrenzen überprüfen
Kanonische Typdefinitionen für TypeScript-Projekte generieren
Workflow-Validierung mit Zod-Schemata automatisieren

! Sicherheit & Einschränkungen

  • Benötigt die Zod-Bibliothek
  • Begrenzt auf TypeScript-Projekte mit `.ts`-Dateien

About The Source

The section below is adapted from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Labs-Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ und Installationsschritte

These questions and steps mirror the structured data on this page for better search understanding.

? Häufige Fragen

Was ist Rule Schemas?

Install Rule Schemas, an AI agent skill for AI agent workflows and automation. Explore features, use cases, limitations, and setup guidance.

Wie installiere ich Rule Schemas?

Führen Sie den Befehl aus: npx killer-skills add carrot-foundation/methodology-rules/rule-schemas. Er funktioniert mit Cursor, Windsurf, VS Code, Claude Code und mehr als 19 weiteren IDEs.

Wofür kann ich Rule Schemas verwenden?

Wichtige Einsatzbereiche sind: Daten an Laufzeitgrenzen überprüfen, Kanonische Typdefinitionen für TypeScript-Projekte generieren, Workflow-Validierung mit Zod-Schemata automatisieren.

Welche IDEs sind mit Rule Schemas kompatibel?

Dieser Skill ist mit Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer kompatibel. Nutzen Sie die Killer-Skills CLI für eine einheitliche Installation.

Gibt es Einschränkungen bei Rule Schemas?

Benötigt die Zod-Bibliothek. Begrenzt auf TypeScript-Projekte mit `.ts`-Dateien.

So installieren Sie den Skill

  1. 1. Terminal öffnen

    Öffnen Sie Ihr Terminal oder die Kommandozeile im Projektverzeichnis.

  2. 2. Installationsbefehl ausführen

    Führen Sie aus: npx killer-skills add carrot-foundation/methodology-rules/rule-schemas. Die CLI erkennt Ihre IDE oder Ihren Agenten automatisch und richtet den Skill ein.

  3. 3. Skill verwenden

    Der Skill ist jetzt aktiv. Ihr KI-Agent kann Rule Schemas sofort im aktuellen Projekt verwenden.

! Source Notes

This page is still useful for installation and source reference. Before using it, compare the fit, limitations, and upstream repository notes above.

Upstream Repository Material

The section below is adapted from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Upstream Source

Rule Schemas

Install Rule Schemas, an AI agent skill for AI agent workflows and automation. Explore features, use cases, limitations, and setup guidance.

SKILL.md
Readonly
Upstream Repository Material
The section below is adapted from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.
Upstream Source

Rule schemas

Apply this rule whenever work touches:

  • *.ts

Zod is the runtime validation library for this project. Schemas serve a dual purpose: they validate data at runtime boundaries and provide the canonical type definition via z.infer.

Schema definition

Define schemas close to the types they describe. A common pattern is to export both from the same file:

ts
1import { z } from 'zod'; 2 3export const VehicleSchema = z.object({ 4 plate: z.string().min(7), 5 weightKg: z.number().positive(), 6 type: z.enum(['truck', 'van', 'car']), 7}); 8 9export type Vehicle = z.infer<typeof VehicleSchema>;

Never create a separate interface Vehicle that duplicates the schema shape.

Validation strategy

Choose the right parse method based on the trust level of the data:

ts
1// External input (API payload, S3 object, SQS message) - handle errors 2const result = VehicleSchema.safeParse(rawPayload); 3if (!result.success) { 4 logger.warn('Invalid vehicle payload', result.error.flatten()); 5 return { error: 'INVALID_INPUT' }; 6} 7const vehicle = result.data; 8 9// Internal data (already validated upstream) - let it throw 10const vehicle = VehicleSchema.parse(trustedData);

Schema composition

Reuse schemas through composition rather than copy-pasting fields:

ts
1const BaseDocumentSchema = z.object({ 2 id: z.string().uuid(), 3 createdAt: z.string().datetime(), 4}); 5 6const CertificateSchema = BaseDocumentSchema.extend({ 7 issuer: z.string(), 8 validUntil: z.string().datetime(), 9});

Test data generation

Use zocker and the shared testing utilities to generate test data from schemas:

ts
1import { createStubFromSchema } from '@carrot-fndn/shared/testing'; 2 3const stubVehicle = createStubFromSchema(VehicleSchema);

This ensures test data always conforms to the current schema shape and evolves automatically when the schema changes.

Verwandte Fähigkeiten

Looking for an alternative to Rule Schemas or another community skill for your workflow? Explore these related open-source skills.

Alle anzeigen

openclaw-release-maintainer

Logo of openclaw
openclaw

Lokalisierte Zusammenfassung: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. Claude Code, Cursor, and Windsurf workflows.

333.8k
0
Künstliche Intelligenz

widget-generator

Logo of f
f

Lokalisierte Zusammenfassung: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat. It covers ai, artificial-intelligence, awesome-list workflows. Claude Code

149.6k
0
Künstliche Intelligenz

flags

Logo of vercel
vercel

Lokalisierte Zusammenfassung: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. Claude Code, Cursor, and Windsurf workflows.

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Lokalisierte Zusammenfassung: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review. It covers autograd, deep-learning, gpu workflows. Claude Code, Cursor, and Windsurf workflows.

98.6k
0
Entwickler