·arktype-validation
{}

arktype-validation

使用 TypeScript 原生语法进行 ArkType 运行时验证。使用字符串表达式、变形、范围和泛型的类型安全模式。包括 ArkEnv,用于通过自动强制和 Vite 插件进行类型安全环境变量验证。在定义模式、验证数据、转换输入、使用 ArkType 构建类型安全 API 或使用 ArkEnv 验证环境变量时使用。

28安装·2热度·@oakoss

安装

$npx skills add https://github.com/oakoss/agent-skills --skill arktype-validation

如何安装 arktype-validation

通过命令行快速安装 arktype-validation AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/oakoss/agent-skills --skill arktype-validation
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:oakoss/agent-skills。

SKILL.md

查看原文

ArkType is a TypeScript-native runtime validation library that defines schemas using string expressions mirroring TypeScript syntax, providing editor autocomplete, syntax highlighting, and optimized validators. Use when building type-safe APIs, validating JSON payloads, or replacing Zod with a more TypeScript-idiomatic approach. Not suitable for projects that need Zod ecosystem compatibility or JSON Schema output.

| type({ key: "string" }) | Define object schema | | type("string") | Primitive type | | "string.email", "string.url" | Built-in string validators | | "string.trim", "string.lower" | Built-in string morphs (transforms) | | "string.json.parse" | Parse JSON string to validated object | | "number > 0", "string >= 1" | Inline constraints |

| "string \| number" | Union types | | "'a' \| 'b' \| 'c'" | String literal unions | | "string[]" | Array types | | "key?": "string" | Optional properties | | "key = 'default'" | Default values | | .pipe(), .to() | Transform output (morphs) | | .narrow() | Custom validation (like Zod refine) | | .pick(), .omit() | Object property selection |

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/oakoss/agent-skills --skill arktype-validation
分类
{}数据分析
认证
收录时间
2026-02-22
更新时间
2026-03-11

Browse more skills from oakoss/agent-skills

快速解答

什么是 arktype-validation?

使用 TypeScript 原生语法进行 ArkType 运行时验证。使用字符串表达式、变形、范围和泛型的类型安全模式。包括 ArkEnv,用于通过自动强制和 Vite 插件进行类型安全环境变量验证。在定义模式、验证数据、转换输入、使用 ArkType 构建类型安全 API 或使用 ArkEnv 验证环境变量时使用。 来源:oakoss/agent-skills。

如何安装 arktype-validation?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/oakoss/agent-skills --skill arktype-validation 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/oakoss/agent-skills

详情

分类
{}数据分析
来源
skills.sh
收录时间
2026-02-22