aiskillstore/marketplace / skills/aayushbaniya2006/form-creator
form-creator
VerifiedCreate forms, validation schemas, and CRUD API endpoints. Use when building new data entry features or managing existing forms.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.1 KB |
| reference.md | markdown | 991 B |
| skill-report.json | config | 17.2 KB |
reference.md
View on GitHub# Form Architecture Reference
## Reference Implementation
**Canonical Example:** `src/components/forms/plan-form.tsx`
Refer to this file for:
- TypeScript interfaces
- Loading states (`isSubmitting`)
- UI layout and Shadcn usage
## Architecture
### 1. Schema
- Handle nullable/optional fields explicitly.
- Reuse DB schemas where possible but prefer specific form schemas.
### 2. Form Component
- **Dependencies**: `react-hook-form`, `@hookform/resolvers/zod`, `lucide-react`, `sonner`.
- **State**: Track `isSubmitting`.
- **Structure**: `<Form {...form}>` wrapper -> `<form>` -> `<FormField>`.
### 3. API Routes
- **GET (List)**: Return `{ data, pagination }`.
- **Error Handling**: Wrap in `try/catch`. Return JSON `{ error: "Message" }` with status code.
## Best Practices
1. **Type Safety**: No `any`. Use Zod inferred types.
2. **DRY Forms**: Use the same component for Create and Edit (differentiate via `initialData`).
3. **UX**: Show loading states. Use toast notifications.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |