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

v1.0.0

Об этом навыке

Идеально подходит для агентов TypeScript, которым необходима надежная проверка во время выполнения и канонические определения типов. Локализованное описание: 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.

Возможности

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

# Ключевые темы

carrot-foundation carrot-foundation
[3]
[0]
Обновлено: 3/18/2026

Skill Overview

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

Идеально подходит для агентов TypeScript, которым необходима надежная проверка во время выполнения и канонические определения типов. Локализованное описание: 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.

Зачем использовать этот навык

Наделяет агентов возможностью обеспечить целостность данных и автоматизировать рабочие процессы с помощью Zod, предоставляя проверку во время выполнения и вывод типов через `z.infer` для файлов `.ts`.

Подходит лучше всего

Идеально подходит для агентов TypeScript, которым необходима надежная проверка во время выполнения и канонические определения типов.

Реализуемые кейсы использования for rule-schemas

Проверка данных на границах времени выполнения
Генерация канонических определений типов для проектов TypeScript
Автоматизация проверки рабочих процессов с помощью схем Zod

! Безопасность и ограничения

  • Требует библиотеки Zod
  • Ограничен проектами TypeScript с файлами `.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.

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 и шаги установки

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

? Частые вопросы

Что такое rule-schemas?

Идеально подходит для агентов TypeScript, которым необходима надежная проверка во время выполнения и канонические определения типов. Локализованное описание: 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.

Как установить rule-schemas?

Выполните команду: npx killer-skills add carrot-foundation/methodology-rules. Она работает с Cursor, Windsurf, VS Code, Claude Code и более чем 19 другими IDE.

Для чего можно использовать rule-schemas?

Ключевые сценарии использования: Проверка данных на границах времени выполнения, Генерация канонических определений типов для проектов TypeScript, Автоматизация проверки рабочих процессов с помощью схем Zod.

Какие IDE совместимы с rule-schemas?

Этот навык совместим с 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. Для единой установки используйте CLI Killer-Skills.

Есть ли ограничения у rule-schemas?

Требует библиотеки Zod. Ограничен проектами TypeScript с файлами `.ts`.

Как установить этот skill

  1. 1. Откройте терминал

    Откройте терминал или командную строку в директории проекта.

  2. 2. Запустите команду установки

    Выполните: npx killer-skills add carrot-foundation/methodology-rules. CLI автоматически определит вашу IDE или агента и настроит навык.

  3. 3. Начните использовать skill

    Skill уже активен. Ваш AI-агент может сразу использовать rule-schemas в текущем проекте.

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

Связанные навыки

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

Показать все

openclaw-release-maintainer

Logo of openclaw
openclaw

Локализованное описание: 🦞 # 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

Локализованное описание: 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

flags

Logo of vercel
vercel

Локализованное описание: 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
Браузер

pr-review

Logo of pytorch
pytorch

Локализованное описание: 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
Разработчик