regle-rules
Skill508 starsChanged 8 months agoMITView on GitHub
Regle validation rules — built-in rules from `@regle/rules`, custom rules with `createRule`, rule wrappers (`withMessage`, `withParams`, `withAsync`, `withTooltip`), and rule operators (`and`, `or`, `xor`, `not`, `applyIf`, `assignIf`, `pipe`). Use when declaring, customizing, composing, or conditionally applying validation rules in a Regle form. For form setup see regle.
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
All rules are optional by default.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Regle Rules
Validation rules for Regle. Rules come from @regle/rules, but you can also write your own with createRule, customize them with wrappers, and combine them with operators.
import { useRegle } from '@regle/core';
import { required, email, minLength } from '@regle/rules';
const { r$ } = useRegle(
{ email: '' },
{ email: { required, email, minLength: minLength(5) } }
);Key Concepts
- All rules are optional by default; add
requiredto enforce a field. - Built-in rules are imported from
@regle/rules; some are factories that take parameters (e.g.minLength(3)). - Custom rules use
createRulefor reusability, or an inline function for one-offs. - Wrappers adapt an existing rule (message, params, async, tooltip) without rewriting it.
- Operators combine or conditionally apply rules.
References
| Topic | Description | Reference |
| Built-in Rules | All validation rules from @regle/rules | rules-built-in |
| Custom Rules | Inline rules, createRule, reactive parameters, async rules, metadata | rules-custom |
| Rule Wrappers | withMessage, withParams, withAsync, withTooltip, chaining | rules-wrappers |
| Rule Operators | and, or, xor, not, applyIf, assignIf, pipe | rules-operators |
Related skills
- regle — form setup with
useRegle, validation properties, displaying errors, modifiers. - regle-typescript — typing rules schemas with
inferRulesandRegleComputedRules.
In this repository25 other files it gives its agents.
- .cursor/rules/documentation.mdCursor rule
- antfuSkill
- cavemanSkill
- diagnoseSkill
- edit-articleSkill
- grill-meSkill
- grill-with-docsSkill
- improve-codebase-architectureSkill
- prototypeSkill
- tsdownSkill
- ts-memory-baselineSkill
- turborepoSkill
- vite-plusSkill
- vitepressSkill
- viteSkill
- vitestSkill
- vueSkill
- write-a-skillSkill
- zoom-outSkill
- code-reviewSkill
- regle-advancedSkill
- regle-migrate-vuelidateSkill
- regle-schemasSkill
- regleSkill
- regle-typescriptSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

