Form gen

From berkcangumusisik/claude-code-practices · View interactive version

Form gen is an AI agent skill from the GitHub repository berkcangumusisik/claude-code-practices. Generates a form component with validation, error messages, and submit handling

How to use this skill

Skill file

Generate Form

Form description: $ARGUMENTS

  1. Detect form library:
cat package.json | grep -E '"react-hook-form"|"formik"|"react-final-form"|"@tanstack/form"'
cat package.json | grep -E '"zod"|"yup"|"joi"'
  1. Read an existing form component to match patterns.
  1. Generate the form with:
  1. TypeScript types for form values and submit handler.
  1. Example output for a login form:
const loginSchema = z.object({
  email: z.string().email('Invalid email'),
  password: z.string().min(8, 'At least 8 characters'),
})

export function LoginForm({ onSubmit }: LoginFormProps) {
  const form = useForm({ resolver: zodResolver(loginSchema) })
  // ...
}
  1. Place in the components directory following project conventions.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.