Skip to main content
skill CX Codex

regle — Claude Code skill for Vue 3 forms and installation

regle is a Claude Code skill for adding and editing Regle-validated forms in Vue 3. It covers field bindings through r$ and displaying validation errors.

MIT 269 installs ★ 730 updated 2026-11-10

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add onmax/nuxt-skills --skill regle -a claude-code
Open on GitHub

What regle does

regle guides the setup of useRegle, form state, and per-field rules. Its reactive r$ object exposes field values and errors along with validation and reset methods.

The skill covers $error, $errors, $invalid, $validate, and $reset, plus error display and modifiers. It applies to form changes such as binding v-model to r$.$value. Projects need Vue 3.3+ and TypeScript 5.1+.

What it helps with

  • configure useRegle with form state and field rules
  • bind a form field through v-model and r$.$value
  • render validation messages from $errors
  • reset form state with $reset

Example prompts for the agent

  • Add Regle validation to this Vue form with useRegle.
  • Bind the form fields to r$.$value and display their errors.
  • Show how to validate this form with $validate and reset it with $reset.

How to install regle

1Skills CLI (Vercel)

npx skills add onmax/nuxt-skills --skill regle -a claude-code

2Manually: put the files in place

~/.claude/skills/regle/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/regle/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about regle

How do I install regle in Claude Code?

Run npx skills add onmax/nuxt-skills --skill regle -a claude-code. The skill file is at ~/.claude/skills/regle/SKILL.md.

What does the regle skill do?

It explains Regle form validation in Vue 3, including form state, field rules, the reactive r$ object, error display, and validation methods.

What does regle require?

The project needs Vue 3.3+ and TypeScript 5.1+. Core validation uses @regle/core and @regle/rules; schema support is available through the separate @regle/schemas package.

Source text

SKILL.md · MIT
---
name: regle
description: Core Regle form validation in Vue 3 — setup with `useRegle`, the reactive `r$` object, validation properties, displaying errors, and modifiers. Use when adding or editing Regle forms, binding `v-model` to `r$.$value`, or reading `$error`/`$errors`/`$invalid`/`$validate`/`$reset`. For validation rules see regle-rules; for advanced patterns see regle-advanced.
license: MIT
compatibility: Requires Vue 3.3+ and TypeScript 5.1+. Works with any agent supporting the Agent Skills spec.
metadata:
  author: Victor Garcia
  version: "1.27.0"
  source: https://reglejs.dev
---

# Regle

Regle is a type-safe, model-based, headless form validation library for Vue 3. It provides full TypeScript inference, reactive validation, and works with any UI framework or design system.

## MCP Server

Regle provides an MCP server that can be used to get documentation and autocomplete for Regle. If it's available, use it to get up-to-date information on the API.

```json
{
  "mcpServers": {
    "regle": {
      "command": "npx",
      "args": ["@regle/mcp-server"]
    }
  }
}

## Installation

```sh
# Core + built-in rules
pnpm add @regle/core @regle/rules

# Optional: schema support (Zod, Valibot, ArkType)
pnpm add @regle/schemas
```

Requires Vue 3.3+ and TypeScript 5.1+.

## Quick Start

```ts
import { useRegle } from '@regle/core';
import { required, email, minLength } from '@regle/rules';

const { r$ } = useRegle(
  { name: '', email: '' },
  {
    name: { required, minLength: minLength(3) },
    email: { required, email },
  }
);
```

```vue
<template>
  <input v-model="r$.$value.name" placeholder="Name" />
  <ul v-if="r$.$errors.name.length">
    <li v-for="error of r$.$errors.name" :key="error">{{ error }}</li>
  </ul>

  <button @click="r$.$validate()">Submit</button>
</template>
```

## Key Concepts

- **State**: first argument -- raw object, `reactive`, `ref`, or single value
- **Rules**: second argument -- mirrors the data structure, each field gets a rules object
- **`r$`**: returned reactive object with values, errors, dirty state, and validation methods
- All rules are optional by default; add `required` to enforce a field

## Core

| Topic | Description | Reference |
|-------|-------------|-----------|
| useRegle | State definition, rules declaration, dynamic rules, `r$` object | [core-use-regle](references/core-use-regle.md) |
| Validation Properties | `$invalid`, `$dirty`, `$error`, `$errors`, `$pending`, `$validate`, `$touch`, `$reset` | [core-validation-properties](references/core-validation-properties.md) |
| Displaying Errors | Showing errors, custom messages, `getErrors`, `flatErrors` | [core-displaying-errors](references/core-displaying-errors.md) |
| Modifiers | `autoDirty`, `lazy`, `silent`, `rewardEarly`, `disabled`, `validationGroups`, per-field modifiers | [core-modifiers](references/core-modifiers.md) |

## Related skills

- **regle-rules** — built-in rules, custom rules (`createRule`), rule wrappers (`withMessage`, `withParams`, `withAsync`), and rule operators (`and`, `or`, `applyIf`, `assignIf`).
- **regle-advanced** — collections, async, server errors, reset, scoped validation, variants, global config.
- **regle-schemas** — Zod, Valibot, ArkType, and Standard Schema integration.
- **regle-typescript** — type-safe output, typing rules schemas and component props.

© Victor Garcia · MIT · onmax/nuxt-skills

Similar skills

All skills for Frontend and UI →

From the same set13

The whole set →
nuxthub nuxthub is a Claude Code skill that configures databases, KV storage, and blob handling for NuxtHub v0.10.12 applications. Activates when editing Drizzle schemas, migrations, or cloud bindings. CX Codex +1 2,300installs nuxt-better-auth nuxt-better-auth guides Nuxt authentication with @nuxtjs/better-auth, including route guards, session handling, and Better Auth plugins. CX Codex +1 2,100installs nuxt-studio Walks you through self-hosted Nuxt Studio: auth, media, drafts and Git publishing. Useful when the content editor has to live on your own domain. CX Codex +1 1,700installs nuxt-i18n nuxt-i18n — a skill that walks your coding agent through @nuxtjs/i18n setup: locales, translated routes, language detection and locale SEO. CX Codex +1 741installs comark The comark skill parses markdown with Comark component support and renders it in Vue, React, Svelte or Angular. Fits projects with custom blocks in documentation or content. CX Codex +1 306installs nuxt-users Skill for Claude Code, Cursor and GitHub Copilot: configures the nuxt-users module — full authentication for Nuxt with roles, password reset and SQLite, MySQL or PostgreSQL support. CX Codex +1 292installs arkenv Helps configure ArkEnv, define typed environment schemas, and add validation to JavaScript and TypeScript projects. CX Codex +1 282installs t3-code-continue-thread t3-code-continue-thread resumes work from an earlier T3 Code session by parsing its UUID, checking git worktrees, and writing a fresh handoff document. CX Codex +1 187installs

Project sponsors

Companies that keep this analytics open