react-form-validator

react-form-validator is a skill for Claude Code from smicolon/ai-kit. It costs 56 tokens per session (4,491 once invoked), scanned A, original, MIT.

A React and Next.js form helper that uses React Hook Form to manage form state and Zod to check submitted values against a schema.

In plain words
What is it for?
Use it for login, signup, data-entry, and other forms that need typed fields, validation, submission handling, and error feedback.
Why use it?
It prevents inconsistent or missing validation and makes form errors, loading states, and accessible messages part of the standard implementation.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the nextjs plugin — 3 skills shipped together

Good fit Use it for login, signup, data-entry, and other forms that need typed fields, validation, submission handling, and error feedback.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smicolon/ai-kit/react-form-validator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add smicolon/ai-kit --skill react-form-validator
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

Or install nextjs, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-form-validator

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/react-form-validator/github.svg)](https://agentmods.dev/skills/smicolon/ai-kit/react-form-validator)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/react-form-validator"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/react-form-validator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-form-validator

Your own site · 80×15
<a href="https://agentmods.dev/skills/smicolon/ai-kit/react-form-validator"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/react-form-validator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,491 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.04491
Opus 5.5 $0.00022 $0.01796
Sonnet 5.5 $0.00011 $0.00898
Haiku 4.5 $0.00006 $0.00449

Measured 2mo ago against content hash 80dac708ff9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-form-validator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/nextjs/skills/react-form-validator/SKILL.md · 674 lines

How it starts

The opening of the file, as written. The whole thing — 674 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React Form Validator

Auto-enforces React Hook Form + Zod validation pattern for ALL forms in Next.js/React applications.

Activation Triggers

This skill activates when:

  • Creating form components
  • Using <form>, <input>, form elements
  • Mentioning "form", "validation", "submit", "input"
  • Handling form state or submission
  • Creating login, signup, or data entry forms

Required Form Pattern (MANDATORY)

ALL forms MUST use:

  • ✅ React Hook Form for form state management
  • ✅ Zod for schema validation
  • ✅ TypeScript types inferred from Zod schema
  • ✅ Error handling with accessible error messages
  • ✅ Loading states during submission

Auto-Validation Process

Step 1: Detect Form Without Pattern

When detecting a form being created:

// ❌ WRONG - Uncontrolled form, no validation
function LoginForm() {
  const handleSubmit = (e) => {
    e.preventDefault()
    const email = e.target.email.value  // No validation!
    const password = e.target.password.value
    // Submit...
  }

  return (
    <form onSubmit={handleSubmit}>
      <input name="email" type="email" />
      <input name="password" type="password" />
      <button>Login</button>
    </form>
  )
}

Step 2: Identify Missing Requirements

Detect:

  • ❌ No React Hook Form
  • ❌ No Zod validation
  • ❌ No TypeScript types
  • ❌ No error display
  • ❌ No loading state

Step 3: Auto-Fix to Correct Pattern

After (Correct Pattern):

'use client'
import { useForm } from 'react-hook-form'
import { zodResolver } from '@hookform/resolvers/zod'
import * as z from 'zod'

// 1. Define Zod schema
const loginSchema = z.object({
  email: z.string().email('Invalid email address'),
  password: z.string().min(8, 'Password must be at least 8 characters'),
})

// 2. Infer TypeScript type from schema
type LoginFormData = z.infer<typeof loginSchema>

function LoginForm() {
  // 3. Set up React Hook Form with Zod resolver
  const {
    register,
    handleSubmit,
    formState: { errors, isSubmitting },
  } = useForm<LoginFormData>({
    resolver: zodResolver(loginSchema),
  })

  // 4. Type-safe submit handler
  const onSubmit = async (data: LoginFormData) => {
    try {
      await loginUser(data)
      // Handle success
    } catch (error) {
      // Handle error
    }
  }

  return (
    <form onSubmit={handleSubmit(onSubmit)} className="space-y-4">
      {/* Email field */}
      <div>
        <label htmlFor="email" className="block text-sm font-medium">
          Email
        </label>
        <input
          {...register('email')}
          id="email"
          type="email"
          className="mt-1 block w-full rounded-md border-gray-300"
          aria-invalid={!!errors.email}
          aria-describedby={errors.email ? 'email-error' : undefined}
        />
        {errors.email && (
          <p id="email-error" className="mt-1 text-sm text-red-600" role="alert">
            {errors.email.message}
          </p>
        )}
      </div>

      {/* Password field */}
      <div>
        <label htmlFor="password" className="block text-sm font-medium">
          Password
        </label>
        <input
          {...register('password')}
          id="password"
          type="password"
          className="mt-1 block w-full rounded-md border-gray-300"
          aria-invalid={!!errors.password}
          aria-describedby={errors.password ? 'password-error' : undefined}
        />
        {errors.password && (
          <p id="password-error" className="mt-1 text-sm text-red-600" role="alert">
            {errors.password.message}
          </p>
        )}
      </div>

      {/* Submit button with loading state */}
      <button
        type="submit"
        disabled={isSubmitting}
        className="w-full py-2 px-4 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50"
      >
        {isSubmitting ? 'Logging in...' : 'Login'}
      </button>
    </form>
  )
}

Read the full file on GitHub · 674 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 674 lines · 56 tokens per session scan A 80dac708ff9e

Subscribe to this mod's changes

react-form-validator is a skill published in the GitHub repository smicolon/ai-kit (7 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 4,491 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

react-form-validator compared with skills from other repositories

react-form-validator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
react-form-validatorsmicolon/ai-kitSkill72mo agoMITA56Claude Code
panel-app-react-vite-creatorPeiiii/nextclawSkill266yesterdayMITA73Claude Code, Codex
frontend-code-reviewsangrokjung/claude-forgeSkill8862mo agoMITA42Claude Code
design-taste-frontendfigueroaignacio/ignaciofigueroa.devSkill7todayMITA228Claude Code, Codex
aio-xstateaiocean/claude-pluginsSkill44d agoMITA103Claude Code
claude-remotion-skillbest-of-ai/best-of-aiSkill790todaynoneA55Claude Code, Codex
readme-i18nfigueroaignacio/ignaciofigueroa.devSkill7todayMITA49Claude Code, Codex