Agent Skillsvictorgarciaesgi/regle › regle-typescript

regle-typescript

GitHub

提供 Regle 表单库的 TypeScript 类型支持,包括从规则推断状态、验证输出类型安全、计算规则补全及组件 Props 类型提取。

skills/regle-typescript/SKILL.md victorgarciaesgi/regle

Trigger Scenarios

需要为 Regle 表单规则定义 TypeScript 类型 需要确保 $validate 返回值的类型安全 需要为使用 Regle 的 Vue/React 组件定义 Props 类型

Install

npx skills add victorgarciaesgi/regle --skill regle-typescript -g -y
More Options

Use without installing

npx skills use victorgarciaesgi/regle@regle-typescript

指定 Agent (Claude Code)

npx skills add victorgarciaesgi/regle --skill regle-typescript -a claude-code -g -y

安装 repo 全部 skill

npx skills add victorgarciaesgi/regle --all -g -y

预览 repo 内 skill

npx skills add victorgarciaesgi/regle --list

SKILL.md

Frontmatter
{
    "name": "regle-typescript",
    "license": "MIT",
    "metadata": {
        "author": "Victor Garcia",
        "source": "https:\/\/reglejs.dev",
        "version": "1.27.0"
    },
    "description": "TypeScript integration for Regle — type-safe validated output (`InferSafeOutput`, `$validate`), inferring state from rules (`InferInput`), typing computed rules (`inferRules`, `RegleComputedRules`), and typing component props (`InferRegleRoot`, `RegleRoot`, `RegleFieldStatus`, `SuperCompatibleRegleRoot`). Use when typing rules schemas, passing `r$` between components, or extracting validated data types.",
    "compatibility": "Requires Vue 3.3+ and TypeScript 5.1+. Works with any agent supporting the Agent Skills spec."
}

Regle TypeScript

Regle provides first-class TypeScript support with full type inference. This skill covers type-safe validation output, typing rules schemas, and typing component props.

Key Exports

Export Package Purpose
InferInput @regle/core Infer state type from rules
InferSafeOutput @regle/core Infer validated output type from r$
inferRules @regle/core Preserve autocompletion in computed rules
RegleComputedRules @regle/core Type helper for explicit rule typing
InferRegleRoot @regle/core Extract r$ type from a composable
RegleFieldStatus @regle/core Type for a single field status prop

References

Topic Description Reference
Type Safe Output $validate return types, InferSafeOutput typescript-type-safe-output
Typing Rules inferRules, RegleComputedRules, nested properties typescript-typing-rules
Typing Props InferRegleRoot, RegleFieldStatus, typing component props typescript-typing-props

Related skills

  • regle — form setup with useRegle, validation properties.
  • regle-rulesinferRules is used when typing computed rule objects.
  • regle-advanced — scoped validation and patterns where typed props matter.

Version History

  • aeafba7 Current 2026-07-24 22:00

Same Skill Collection

.cursor/skills/antfu/SKILL.md
.cursor/skills/caveman/SKILL.md
.cursor/skills/diagnose/SKILL.md
.cursor/skills/edit-article/SKILL.md
.cursor/skills/grill-me/SKILL.md
.cursor/skills/grill-with-docs/SKILL.md
.cursor/skills/improve-codebase-architecture/SKILL.md
.cursor/skills/prototype/SKILL.md
.cursor/skills/ts-memory-baseline/SKILL.md
.cursor/skills/tsdown/SKILL.md
.cursor/skills/turborepo/SKILL.md
.cursor/skills/vite-plus/SKILL.md
.cursor/skills/vite/SKILL.md
.cursor/skills/vitepress/SKILL.md
.cursor/skills/vitest/SKILL.md
.cursor/skills/vue/SKILL.md
.cursor/skills/write-a-skill/SKILL.md
.github/skills/code-review/SKILL.md
skills/regle-advanced/SKILL.md
skills/regle-migrate-vuelidate/SKILL.md
skills/regle-rules/SKILL.md
skills/regle-schemas/SKILL.md
skills/regle/SKILL.md
.cursor/skills/zoom-out/SKILL.md

Metadata

Files
0
Version
0df09b5
Hash
19b80f57
Indexed
2026-07-24 22:00

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 13:39
浙ICP备14020137号-1 $방문자$