borghei/Claude-Skills / engineering/senior-frontend
senior-frontend
VerifiedScaffold Next.js 16 or React + Vite 8 apps, generate components with tests and stories, and flag heavy bundle dependencies. Use when starting a React project, adding components or hooks, or reviewing frontend code or performance.
assets/templates/scaffold/files/form_utils.ts
View on GitHubimport { useForm, type FieldValues, type UseFormProps } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
/** react-hook-form wired to a Zod schema: values are typed from the schema. */
export function useZodForm<TInput extends FieldValues, TOutput extends FieldValues>(
schema: z.ZodType<TOutput, TInput>,
options?: Omit<UseFormProps<TInput, unknown, TOutput>, 'resolver'>
) {
return useForm<TInput, unknown, TOutput>({
...options,
resolver: zodResolver<TInput, unknown, TOutput>(schema),
});
}
export const emailSchema = z.email('Enter a valid email address');
export const passwordSchema = z
.string()
.min(8, 'Use at least 8 characters')
.max(128, 'Use at most 128 characters');
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |