Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add cass-2003/local-workflow-skill --skill validation-schemagit clone --depth 1 https://github.com/cass-2003/local-workflow-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cass-2003/local-workflow-skill/validation-schema)<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/validation-schema"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/validation-schema/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/validation-schema"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/validation-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00155 | $0.02931 |
| Opus 5 | $0.00077 | $0.01465 |
| Sonnet 5 | $0.00031 | $0.00586 |
| Haiku 4.5 | $0.00015 | $0.00293 |
Grade A, and why
validation-schema scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Validation Schema Skill — Schema 校验
何时使用
- API 边界校验请求 body / query / params
- 解析外部数据(JSON file / 第三方 API 响应 / env vars)
- 表单提交校验
- 配置文件校验启动时崩溃
- 想从一份 schema 同时拿到运行时校验 + TS 类型 + OpenAPI 文档
一、为什么需要 Schema 库
// ❌ 仅 TS 类型
interface User { id: string; email: string; age: number }
const user: User = JSON.parse(rawJSON)
// 编译通过 — 但运行时 rawJSON 可能根本不是 User 形状
user.email.toLowerCase() // 💥 cannot read of undefined
// ✅ 运行时校验 + 类型派生
import { z } from 'zod'
const User = z.object({
id: z.string(),
email: z.string().email(),
age: z.number().int().min(0),
})
type User = z.infer<typeof User> // 自动派生
const user = User.parse(rawJSON) // 失败抛
核心诉求:边界处一次定义,类型 + 运行时校验 + 错误信息一起拿。
二、TS 生态主流库对比
| 库 | 大小 | 性能 | 特色 |
|---|---|---|---|
| Zod | ~12KB | 中 | 业界标准,生态最大 |
| Valibot | ~1KB | 高 | 模块化,tree-shakable,体积小 90% |
| ArkType | ~30KB | 极高 | TS 字面量语法,类型推导极强 |
| Yup | ~50KB | 中 | 老牌,Formik 集成好 |
| Joi | ~150KB | 中 | Node 后端老牌,类型推导弱 |
| typia | 编译时 | 极高 | TS 转译时生成校验代码 |
Zod 示例
import { z } from 'zod'
const Order = z.object({
id: z.string().uuid(),
userId: z.string().min(1),
items: z.array(z.object({
sku: z.string(),
qty: z.number().int().positive(),
})).min(1),
total: z.number().nonnegative(),
createdAt: z.coerce.date(), // 字符串 → Date
status: z.enum(['pending','paid','shipped']),
metadata: z.record(z.string()).optional(),
})
type Order = z.infer<typeof Order>
// 严格 parse(失败抛)
const order = Order.parse(rawData)
// 软 parse(不抛)
const result = Order.safeParse(rawData)
if (!result.success) {
console.log(result.error.issues) // 详细错误数组
}
Valibot 示例(pipe-friendly)
import * as v from 'valibot'
const Order = v.object({
id: v.pipe(v.string(), v.uuid()),
total: v.pipe(v.number(), v.minValue(0)),
})
const result = v.safeParse(Order, rawData)
体积优势:bundle 只含用到的 validator(tree-shaking)。
ArkType 示例(TS 字面量)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 337 lines · 155 tokens per session scan A a7a3b68b762c
validation-schema is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 2mo ago), licensed MIT. It adds 155 tokens to every session and 2,931 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
copilotkit-upgrade
Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.
nextjs-pages-router
Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.
with-tanstack-query
Compose Angular Query with signal-owned Table filtering, sorting, and pagination state using reactive query options, manual row-model boundaries, direct query data, server counts, and valid injection context.
auth-web-cloudbase
CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and practical Web authentication solutions with multiple login methods and complete user management.
service-digital-engagement-channel-configure
Configures and deploys enhanced chat Messaging Channels for Messaging for In-App and Web (MIAW). Use when the user needs to create, deploy, and activate a messaging channel configured with Omni-Channel Flow, Omni-Channel Queue, User, or Agentforce Service Agent routing. Generates MessagingChannel metadata, deploys it…
om-system-extension
Extend installed Open Mercato modules through UMES enrichers, interceptors, mutation guards, widgets, menus, entity extensions, events, component/page replacements, and overrides. Use for "extend core", "add field/column/action", "hide page", "intercept API", "UMES", or "rozszerz moduł".