Skip to content
Back to skills

Regle Schemas

ASecurity

Validate Regle forms with schema libraries via `@regle/schemas` — Zod, Valibot, ArkType, and any Standard Schema spec library using `useRegleSchema`, `useRules`, `refineRules`, and `InferInput`. Use when a form's validation is defined by an external schema instead of `@regle/rules`. For native rules see regle-rules; for form setup see regle.

  • 520 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added August 31, 2026
developmenttypescriptvue

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add victorgarciaesgi/regle --skill regle-schemas --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Regle Schemas?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Regle Schemas
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/victorgarciaesgi-regle-schemas/badge)](https://www.skillsdirectory.com/skills/victorgarciaesgi-regle-schemas)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: regle-schemas
description: Validate Regle forms with schema libraries via `@regle/schemas` — Zod, Valibot, ArkType, and any Standard Schema spec library using `useRegleSchema`, `useRules`, `refineRules`, and `InferInput`. Use when a form's validation is defined by an external schema instead of `@regle/rules`. For native rules see regle-rules; for form setup see regle.
license: MIT
compatibility: Requires Vue 3.5+, TypeScript 5.1+, and `@regle/schemas`. Works with any agent supporting the Agent Skills spec.
metadata:
  author: Victor Garcia
  version: "1.27.0"
  source: https://reglejs.dev
---

# Regle Schemas

Regle can drive validation from a schema library instead of `@regle/rules`. Install `@regle/schemas` and use `useRegleSchema` with a Zod, Valibot, or ArkType schema (or any Standard Schema compliant validator).

```ts
import { useRegleSchema } from '@regle/schemas';
import { z } from 'zod';

const { r$ } = useRegleSchema(
  { email: '' },
  z.object({ email: z.string().email() })
);
```

## Key Concepts

- `useRegleSchema(state, schema)` replaces `useRegle`; the `r$` object behaves the same.
- Works with any Standard Schema library; Zod, Valibot, and ArkType are first-class.
- `useRules` / `refineRules` let you mix schema validation with native Regle rules.
- `InferInput` infers the state type from the schema.

## References

| Topic | Description | Reference |
|-------|-------------|-----------|
| Schema Libraries | `useRegleSchema` with Zod, Valibot, ArkType | [schemas-libraries](references/schemas-libraries.md) |
| Standard Schema | Standard Schema spec, `useRules`, `refineRules`, `InferInput` | [schemas-standard-schema](references/schemas-standard-schema.md) |

## Related skills

- **regle** — form setup with `useRegle`, validation properties, displaying errors.
- **regle-rules** — native rules when not using a schema library.
- **regle-typescript** — type-safe output and typing props.

Files in this skill

  • SKILL.md1.9 KB
  • references/schemas-libraries.md2.3 KB
  • references/schemas-standard-schema.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.