rule-schemas — for Claude Code rule-schemas, methodology-rules, community, for Claude Code, ide skills, z.infer, schemas, whenever, touches, runtime

v1.0.0

Sobre este Skill

Perfeito para Agentes TypeScript que necessitam de validação de tempo de execução robusta e definições de tipo canônicas. Resumo localizado: Rule mapping for schemas # Rule schemas Apply this rule whenever work touches: .ts Zod is the runtime validation library for this project. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Recursos

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),

# Tópicos principais

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

Skill Overview

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

Perfeito para Agentes TypeScript que necessitam de validação de tempo de execução robusta e definições de tipo canônicas. Resumo localizado: Rule mapping for schemas # Rule schemas Apply this rule whenever work touches: .ts Zod is the runtime validation library for this project. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Por que usar essa habilidade

Habilita os agentes a garantir a integridade dos dados e automatizar fluxos de trabalho usando Zod, fornecendo validação em tempo de execução e inferência de tipo via `z.infer` para arquivos `.ts`.

Melhor para

Perfeito para Agentes TypeScript que necessitam de validação de tempo de execução robusta e definições de tipo canônicas.

Casos de Uso Práticos for rule-schemas

Validar dados nos limites de tempo de execução
Gerar definições de tipo canônicas para projetos TypeScript
Automatizar validação de fluxo de trabalho usando esquemas Zod

! Segurança e Limitações

  • Requer a biblioteca Zod
  • Limitado a projetos TypeScript com arquivos `.ts`

About The Source

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

Demo Labs

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 e etapas de instalação

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

? Perguntas frequentes

O que é rule-schemas?

Perfeito para Agentes TypeScript que necessitam de validação de tempo de execução robusta e definições de tipo canônicas. Resumo localizado: Rule mapping for schemas # Rule schemas Apply this rule whenever work touches: .ts Zod is the runtime validation library for this project. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Como instalar rule-schemas?

Execute o comando: npx killer-skills add carrot-foundation/methodology-rules/rule-schemas. Ele funciona com Cursor, Windsurf, VS Code, Claude Code e mais de 19 outros IDEs.

Quais são os casos de uso de rule-schemas?

Os principais casos de uso incluem: Validar dados nos limites de tempo de execução, Gerar definições de tipo canônicas para projetos TypeScript, Automatizar validação de fluxo de trabalho usando esquemas Zod.

Quais IDEs são compatíveis com rule-schemas?

Esta skill é compatível com 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. Use a CLI do Killer-Skills para uma instalação unificada.

rule-schemas tem limitações?

Requer a biblioteca Zod. Limitado a projetos TypeScript com arquivos `.ts`.

Como instalar este skill

  1. 1. Abra o terminal

    Abra o terminal ou linha de comando no diretório do projeto.

  2. 2. Execute o comando de instalação

    Execute: npx killer-skills add carrot-foundation/methodology-rules/rule-schemas. A CLI detectará sua IDE ou agente automaticamente e configurará a skill.

  3. 3. Comece a usar o skill

    O skill já está ativo. Seu agente de IA pode usar rule-schemas imediatamente no projeto atual.

! 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 comes 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 comes 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.

Habilidades Relacionadas

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

Ver tudo

openclaw-release-maintainer

Logo of openclaw
openclaw

Resumo localizado: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

widget-generator

Logo of f
f

Resumo localizado: 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. This AI agent skill supports Claude Code, Cursor, and

flags

Logo of vercel
vercel

Resumo localizado: 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. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
Navegador

pr-review

Logo of pytorch
pytorch

Resumo localizado: 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. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
Desenvolvedor