valibot-schema-generator
Valibot Schema Generator
Generates type-safe Valibot validation schemas from ClaudeMix YAML spec files.
When to Use
This skill automatically activates when:
- User says: "Generate schema for authentication"
- User says: "Create Valibot schema from spec"
- User says: "Setup form validation for {section}"
- User mentions: "I need schemas for forms"
- After completing
section-spec.yamlin development flow
実行フロー概要
Phase 1: Schema Generation → prompts/01-generate.md
↓
完成
Phase 1: Schema Generation
参照: prompts/01-generate.md
- Read spec files (section-spec.yaml, validation-spec.yaml)
- Extract form definitions and validation rules
- Generate schema file using template
- Verify output and export types
自動実行: このスキルはフェーズ1のみで完結し、ユーザー介入なしで実行されます。
成果物
app/specs/{service}/{section}-schema.server.ts- 型安全なValibotスキーマ- Console log: "✅ Schema generated: {path}"
参照ドキュメント
| ファイル | 役割 |
|---|---|
prompts/01-generate.md |
スキーマ生成の実行可能プロンプト |
scripts/generate-schema.js |
スキーマ生成の自動化スクリプト |
docs/schema-structure.md |
スキーマ構造の詳細仕様 |
docs/troubleshooting.md |
トラブルシューティングガイド |
docs/examples.md |
実装例と良い例/悪い例 |
templates/schema.server.ts.template |
スキーマテンプレート |
注意事項
- 必ず
.server.ts拡張子を使用(クライアントバンドル除外) - エラーメッセージはSpec YAMLから取得(ハードコーディング禁止)
- 生成後は必ず
InferOutputで型をエクスポート
Integration with Development Flow
📋️ section-spec.yaml
↓
🔐 [THIS SKILL] Generate Schema
↓
🗂️ file_list.md & 🧬 data-flow-diagram.md
↓
🪨 Route implementation with Conform
関連ドキュメント
Note: Valibot/Conform の詳細ルールは .claude/rules/validation/valibot-conform-flow.md で自動的に適用されます。
More from tezuka-akihiro/claudemix
skill-refactor
既存スキルをベストプラクティスに沿ってリファクタリングする。3層構成(SKILL.md/prompts/docs)への再構成、SSoT違反の解消、プロンプト品質の向上を行う。
15code-reviewer
Reviews code for ClaudeMix project, verifying adherence to 3-layer architecture, TDD principles, and coding standards. Generates detailed review reports with scoring and improvement recommendations.
14izanami-product-writer
Izanamiプラットフォーム向けのプロダクト紹介記事を生成する。project-spec.yamlなどのSSoTから情報を収集し、5パート構成(概要・主要機能・料金プラン・始め方・FAQ)のテンプレートに基づいて記事を生成・統合する。Use when generating Izanami product introduction articles for ClaudeMix.
14debugger
Diagnose runtime errors, test failures, and unexpected behavior. Use when encountering errors, test failures, build issues, or performance problems. Provides root cause analysis and fix proposals.
13ssot-refactor
Spec Loaderシステムが正しく使われているかをチェックし、未導入のファイルをリファクタリングする。実装でloadSpecを使っていないファイル、テストでtests/utils/loadSpecを使っていないファイルを検出し、spec loader経由に修正する。
13architecture-guardian
Design architecture proposals and detect violations for ClaudeMix project. Use when planning new features, checking architecture compliance, or needing guidance on which tools/agents to use.
12