Logo van Valibot

Valibot

Community
tuanductran
valibot

Repositoryrichtlijnen voor het gebruik van Valibot als bibliotheek voor schemavalidatie binnen de hr-skills-monorepo. Gebruik deze richtlijnen bij het schrijven of aanpassen van schema's in packages/hr-skills-ref/src/client/schema.ts of packages/hr-skills-build/src/client/shared/schema.ts, bij het valideren van geparseerde YAML-frontmatter, bij het verwerken van safeParse-resultaten of bij het afleiden van typen uit schema's.

Add to TypingMind

Overzicht

Uitgevertuanductran
Repositoryhr-skills
Skillnaamvalibot
Sterren
78
Forks
20
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door tuanductran op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Valibot in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/tuanductran/hr-skills/tree/main/.agents/skills/valibot
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tuanductran/hr-skills.git /tmp/hr-skills
mkdir -p .claude/skills
cp -r /tmp/hr-skills/.agents/skills/valibot .claude/skills/valibot
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Valibot in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Valibot automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Valibot niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Valibot in hr-skills

This skill covers how Valibot is used within the hr-skills monorepo specifically. It is not a general Valibot reference — see valibot.dev for the full API. The focus here is on the patterns, conventions, and pitfalls that appear in this codebase.

Where Valibot is used

Two files define schemas; all other packages consume them:

  • packages/hr-skills-ref/src/client/schema.ts — SkillPropertiesSchema, the generic Agent Skills shape used by readProperties() in loader.ts
  • packages/hr-skills-build/src/client/shared/schema.ts — MarketplaceJsonSchema (validates .claude-plugin/marketplace.json), SkillFrontmatterSchema (used by parseSkillFrontmatter() in parser.ts), and RegistrySchema (used by validateRegistryConsistency() in validate-registry.ts to check registry/skills.json against its schema)

Import pattern used throughout the repo:

typescript
import * as v from 'valibot';

Never use named imports (import { object, string } from 'valibot') — the wildcard * as v is the established convention here.

Supported tasks

  • Write or extend a schema in schema.ts for a new frontmatter field
  • Add a v.pipe(v.string(), v.trim()) field to an existing object schema
  • Handle a v.safeParse() result correctly in parser.ts or loader.ts
  • Infer the output type from a schema with v.InferOutput<typeof Schema>
  • Add an optional field to SkillPropertiesSchema or SkillFrontmatterSchema
  • Validate marketplace.json shape against MarketplaceJsonSchema in sync.ts
  • Add a v.record() field for arbitrary string metadata
  • Debug a failed v.safeParse() result using v.summarize(result.issues)
  • Make a field optional without breaking the existing type contract
  • Understand why v.safeParse is used instead of v.parse in this repo

Key prompts

Schema authoring

  1. "Add an optional [field] field to SkillPropertiesSchema that accepts a trimmed string."
  2. "Write the Valibot schema for a new marketplace plugin entry with fields [list]."
  3. "I need to validate a [shape] object in hr-skills-build. Write the schema."
  4. "Add a required string field [name] to SkillFrontmatterSchema with trim applied."

Parsing and results

  1. "Show me how parseSkillFrontmatter handles a v.safeParse failure in this repo."
  2. "When should I use v.safeParse vs v.parse in hr-skills-build?"
  3. "How does loader.ts throw a ValidationError from a failed v.safeParse result?"
  4. "Show me the correct way to check result.success and access result.output."

Type inference

  1. "How do I infer the output type from SkillPropertiesSchema?"
  2. "What is the difference between v.InferOutput and v.InferInput in this repo?"
  3. "How do I export both the schema and its type from schema.ts following repo conventions?"
  4. "Show me how SkillFrontmatter is inferred and used in parser.ts."

Optional and record fields

  1. "How is v.optional used in this repo for nullable frontmatter fields?"
  2. "Show me how v.record is used for the metadata field in SkillPropertiesSchema."
  3. "Add an optional field to SkillFrontmatterSchema that defaults to undefined."
  4. "How does toStringRecord convert unknown metadata values before passing to v.safeParse?"

Valibot vs Zod — critical differences

  1. "I accidentally wrote Zod-style chaining. Show me the correct Valibot equivalent."
  2. "How do I use v.pipe with v.trim and v.minLength like the existing schemas do?"
  3. "What is the Valibot equivalent of Zod's z.string().optional()?"
  4. "Show me how v.summarize works on result.issues for error reporting."

Tips

  • Prefer v.safeParse for anything derived from user-authored content (parser.ts's parseSkillFrontmatter, loader.ts) — parser.ts returns an empty object on failure, and loader.ts throws a typed ValidationError using v.summarize(result.issues). Throwing directly from v.parse bypasses that error handling pattern. One deliberate exception: build/sync.ts#syncMarketplace() uses v.parse directly against MarketplaceJsonSchema, since .claude-plugin/marketplace.json is a repo-committed file expected to always be valid — an unhandled throw there is the intended fail-fast behavior, not a bug to fix.
  • Apply v.pipe(v.string(), v.trim()) to every string field that comes from user-authored YAML — frontmatter values frequently have trailing whitespace or newlines that would silently fail downstream string comparisons.
  • Use v.optional() wrapping, not chained methods — v.optional(v.string()) not v.string().optional(). Valibot does not chain; it composes.
  • Infer types with v.InferOutput<typeof Schema> and export the type alongside the schema in the same file. See how SkillProperties and SkillFrontmatter are exported in their respective schema.ts files as the pattern to follow.
  • Never add a new schema file — both packages already have one schema.ts each. Add fields to the existing schemas unless there is a genuinely separate data shape that doesn't belong in either existing file.
  • When a v.safeParse result fails, log v.summarize(result.issues) for a human-readable summary — that is what ValidationError in loader.ts uses and what @clack/prompts surfaces to the terminal.

Common mistakes

  • Using Zod-style chaining such as v.string().trim().email() — Valibot has no method chaining. Use v.pipe(v.string(), v.trim(), v.email()) instead.
  • Calling v.parse(Schema, data) on user-authored content (SKILL.md frontmatter, etc.) instead of v.safeParse — this throws a raw ValiError that bypasses the typed error hierarchy in errors.ts. Use v.safeParse and handle result.success explicitly. (sync.ts's v.parse against a repo-committed marketplace.json is the one intentional exception — see Tips.)
  • Forgetting v.trim() in the pipeline for string fields parsed from YAML — without it, fields with trailing newlines or spaces will pass validation but cause subtle mismatch bugs in downstream string comparisons like author name normalization.
  • Adding v.InferInput instead of v.InferOutput when the schema has no transforms — in this repo all schemas use v.trim() which counts as a transform, so input and output types differ slightly. Prefer InferOutput.

Veelgestelde vragen

Wat doet de AI-skill Valibot?

Repositoryrichtlijnen voor het gebruik van Valibot als bibliotheek voor schemavalidatie binnen de hr-skills-monorepo. Gebruik deze richtlijnen bij het schrijven of aanpassen van schema's in packages/hr-skills-ref/src/client/schema.ts of packages/hr-skills-build/src/client/shared/schema.ts, bij het valideren van geparseerde YAML-frontmatter, bij het verwerken van safeParse-resultaten of bij het afleiden van typen uit schema's.

Waarom Valibot gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Valibot bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Valibot in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/tuanductran/hr-skills/tree/main/.agents/skills/valibot. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Valibot gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Valibot gebruiken?

Zoveel als je wilt. Je kunt Valibot gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Valibot gratis?

Ja. Deze skill is door tuanductran op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇