Form creator
Skill ComeOnOliver/skillshub/skills/aiskillstore/marketplace/aayushbaniya2006/form-creator
Create forms, validation schemas, and CRUD API endpoints. Use when building new data entry features or managing existing forms.From its SKILL.md
npx -y skills add ComeOnOliver/skillshub --skill form-creatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.1 KB, 259 tokens by cl100k_base, as published. Nobody here has run it
Form Creator
Instructions
1. Validation Schema
- File:
src/lib/validations/{feature}.schema.ts - Action: Define Zod schema and export inferred type.
export const featureSchema = z.object({ ... }); export type FeatureFormValues = z.infer<typeof featureSchema>;
2. Form Component
- File:
src/components/forms/{feature}-form.tsx - Directives:
"use client";required. - Setup: Use
useFormwithzodResolver. - Props: Accept
initialDataandonSubmit. - UI: Use Shadcn components (
Form,FormField,Input).
3. API Routes
- File:
src/app/api/{feature}/route.ts - Security: Wrap with
withAuthRequiredorwithSuperAdminAuthRequired. - Logic:
GET: Handle pagination/search.POST: Validate body against schema -> Insert to DB.PATCH: Validate partial body -> Update DB.
Reference
For code patterns, best practices, and examples, see reference.md.
What ships with it
12.9 KB alongside SKILL.md
GitHub clipped this repository’s file list, so this is at least 2 files and may be more.
- reference.md991 B
- skill-report.json11.9 KB