スキル一覧に戻る
0xsend

send-schema-form

by 0xsend

The Send App monorepo.

33🍴 18📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: send-schema-form description: Standardize typed forms in this repo. Use whenever a feature needs a form or an existing form is being refactored. Prefer SchemaForm + formFields + zod for typed inputs and consistent UI/validation; use react-hook-form Controller only for custom fields that SchemaForm cannot render.

Send Schema Form

Overview

Use SchemaForm as the default form primitive in this repo. Define a zod schema with formFields, derive types via z.infer, and render fields through SchemaForm so validation and UI stay consistent.

Workflow

  1. Define a zod schema using formFields (text, textarea, number, boolean, select, note, date, etc.).
  2. Create a form instance with useForm<z.infer>().
  3. Render SchemaForm with schema, defaultValues, props, and a render function for layout.
  4. Submit via form.handleSubmit and handle server errors with form.setError on a field.
  5. Wrap in FormProvider only if child components use useFormContext/useController.

SchemaForm vs Controller

  • Prefer SchemaForm + formFields for standard inputs. It wires validation, error display, and UI conventions in one place.
  • Use Controller/useFormContext when a field is not supported by formFields or needs custom wiring (composite inputs, third-party components, complex formatting). Keep the field in the schema and validate manually or with a form-level resolver if needed.
  • Avoid local state for field values. Let react-hook-form own the field state and use form.watch for derived UI.

Resources

  • references/schema-form-example.tsx: example form using SchemaForm, zod, and typed values.
  • assets/schema-form-template.tsx: skeleton to copy when starting a new form.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

0/5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です