W Form

blockmatic/basilic-skills/skills/workflow/w-form

作者 blockmatic7e05e2abd052dc6b526e8a28e36d102d42bfd635無授權條款1 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫6 天前更新

Build a Next.js form using the app's existing mutation path, not a second stack.

AI 產生的概覽

使用應用程式現有的變更路徑與共用 Zod 驗證,在 Next.js 中實作表單。

功能
此技能會引導代理在現有的 Next.js 應用程式中加入表單。它要求代理先檢視鄰近表單的提交方式並沿用同一條變更路徑,在用戶端與伺服器端驗證之間共用一個 Zod schema,並以現有 UI 基礎元件串接無障礙標籤、錯誤、待處理以及空白/錯誤/成功狀態。它也涵蓋執行 lint、驗證提交、驗證失敗與鍵盤操作路徑,並在行為或指令變更時更新文件。
適用情境
適用於需要為已有既定變更模式的 Next.js 應用程式加入表單的情況。它針對的是與現有提交流程保持一致比導入新表單 API 更重要的情境。
執行需求
需要一個具備現有 UI 基礎元件與 Zod schema 設定的 Next.js 應用程式;涉及 next-v16 與 shadcn-v3 慣例,以及可選的 /w-docs 步驟。不附帶指令碼,僅為說明性內容。

Implement a form in the current Next app. Follow next-v16 and shadcn-v3. If the app already mutates through an API client (Fastify + TanStack Query), do not introduce Server Actions, useFormStatus, or useOptimistic for those flows.

  1. Inspect how neighboring forms submit. Reuse that path.
  2. Share one Zod schema for client UX and server validation.
  3. Wire accessible labels, errors, pending, and empty/error/success states with existing UI primitives.
  4. Run lint and exercise submit, validation failure, and keyboard path.
  5. Docs: /w-docs if behavior or commands changed.

來源與署名

來源:blockmatic/basilic-skills位於skills/workflow/w-form提交7e05e2a

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架