conform
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "conform":https://skillpi.com/zh/skills/deepskill-daff808d5f868be13d61df12585e6b903de5dd3ea59c51a55afaebade27dc1fb。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
使用 Conform 构建渐进式表单,适合创建无需 JavaScript 即可运行的表单、在 Remix/Next.js 中实现服务端验证表单,或构建支持渐进增强的可访问表单。
介绍来源: third_party · TerminalSkills · 1.0.0 参考来源
SkillPi 解读
- 实测状态
- 未测试
文件浏览
Frontmatter
name: conform
description: >-
Build progressive forms with Conform. Use when creating forms that work
without JavaScript, implementing server-validated forms in Remix/Next.js,
or building accessible forms with progressive enhancement.
license: Apache-2.0
compatibility: 'React 18+, Remix, Next.js'
metadata:
author: terminal-skills
version: 1.0.0
category: development
tags: [conform, forms, remix, progressive-enhancement, server-validation]Conform
Overview
Conform is a progressive enhancement form library. Forms work without JavaScript (server-side validation), then enhance with client-side validation when JS loads. Native to Remix and Next.js Server Actions. Uses Zod schemas for shared client/server validation.
Instructions
Step 1: Next.js Server Action Form
// app/actions.ts — Server action with Conform
'use server'
import { parseWithZod } from '@conform-to/zod'
import { z } from 'zod'
const schema = z.object({
name: z.string().min(2),
email: z.string().email(),
message: z.string().min(10).max(1000),
})
export async function submitContact(prevState: unknown, formData: FormData) {
const submission = parseWithZod(formData, { schema })
if (submission.status !== 'success') {
return submission.reply() // return errors to form
}
await db.contacts.create(submission.value)
return submission.reply({ resetForm: true })
}
// app/contact/page.tsx — Client form with progressive enhancement
'use client'
import { useForm } from '@conform-to/react'
import { parseWithZod } from '@conform-to/zod'
import { useActionState } from 'react'
import { submitContact } from '../actions'
export default function ContactPage() {
const [lastResult, action] = useActionState(submitContact, undefined)
const [form, fields] = useForm({
lastResult,
onValidate({ formData }) {
return parseWithZod(formData, { schema }) // client-side validation
},
shouldValidate: 'onBlur',
shouldRevalidate: 'onInput',
})
return (
<form id={form.id} onSubmit={form.onSubmit} action={action} noValidate>
<div>
<label htmlFor={fields.name.id}>Name</label>
<input {...getInputProps(fields.name, { type: 'text' })} />
<p>{fields.name.errors}</p>
</div>
<div>
<label htmlFor={fields.email.id}>Email</label>
<input {...getInputProps(fields.email, { type: 'email' })} />
<p>{fields.email.errors}</p>
</div>
<div>
<label htmlFor={fields.message.id}>Message</label>
<textarea {...getTextareaProps(fields.message)} />
<p>{fields.message.errors}</p>
</div>
<button type="submit">Send</button>
</form>
)
}
Guidelines
- Conform forms work without JS — server validates and returns errors via form resubmission.
- Share Zod schema between client and server — single source of truth for validation.
shouldValidate: 'onBlur'validates when user leaves field — less aggressive than onChange.- Native form attributes (required, minLength) work as fallback when JS is disabled.
- Ideal for Remix and Next.js Server Actions — designed for their form patterns.
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的渐进式表单解决方案,适用于Remix/Next.js开发者
- 支持服务端验证和客户端增强,提升用户体验
- 使用Zod schema实现前后端验证一致性
亮点
- 触发词覆盖全面,包含conform、forms、remix等核心关键词
- description清晰描述了适用场景和核心功能
亮点
- 文档结构清晰,包含Overview、Instructions、Guidelines等完整章节
- 提供了完整的端到端代码示例,便于理解和实现
- frontmatter信息完整,包含兼容性、许可证等必要信息
亮点
- 代码示例完整,包含服务端action和客户端组件实现
- 错误处理机制完善,支持表单重置和错误回显
- 遵循渐进增强原则,确保无JavaScript时仍能正常工作
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。