form-create

form-create is a command for Claude Code from smicolon/ai-kit. It costs 12 tokens per session (2,225 once invoked), scanned A, original, MIT.

A command for creating TanStack Form components with Zod, a library that checks whether submitted values match defined rules.

In plain words
What is it for?
It helps create forms, define typed fields and schemas, validate values such as names and emails, and optionally connect forms to data-changing hooks.
Why use it?
It turns field requirements into reusable validation rules and connects them to form submission handling.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { {name}Schema, type {Name}FormData } from '../schemas/{name}Schema'.

Good fit It helps create forms, define typed fields and schemas, validate values such as names and emails, and optionally connect forms to data-changing hooks.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit
agentmods
npx agentmods add commands/smicolon/ai-kit/form-create

Made for: Claude Code.

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 form-create

README.md
[![agentmods](https://agentmods.dev/badge/commands/smicolon/ai-kit/form-create/github.svg)](https://agentmods.dev/commands/smicolon/ai-kit/form-create)
Your own site
<a href="https://agentmods.dev/commands/smicolon/ai-kit/form-create"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/form-create/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 form-create

Your own site · 80×15
<a href="https://agentmods.dev/commands/smicolon/ai-kit/form-create"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/form-create.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,225 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.
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.00012 $0.02225
Opus 5 $0.00006 $0.01112
Sonnet 5 $0.00002 $0.00445
Haiku 4.5 $0.00001 $0.00222

Measured 6d ago against content hash 7e79a351de08, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

form-create 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 6d 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/tanstack-router/commands/form-create.md · 314 lines

How it starts

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

Create TanStack Form

Create a form component with TanStack Form and Zod validation.

Instructions

  1. Gather Information (if not provided via args):

    • Ask for the form name (e.g., CreatePostForm, EditUserForm)
    • Ask for the feature it belongs to
    • Ask for the fields the form should have
    • Ask if it should integrate with a mutation hook
  2. Create Zod Schema in src/features/{feature}/schemas/{name}Schema.ts:

    import { z } from 'zod'
    
    export const {name}Schema = z.object({
      title: z.string().min(3, 'Title must be at least 3 characters'),
      content: z.string().min(10, 'Content must be at least 10 characters'),
      email: z.string().email('Invalid email address'),
      // Add more fields as needed
    })
    
    export type {Name}FormData = z.infer<typeof {name}Schema>
    
  3. Create Form Component in src/features/{feature}/components/{Name}Form.tsx:

    For a create form:

    import { useForm } from '@tanstack/react-form'
    import { zodValidator } from '@tanstack/zod-form-adapter'
    import { {name}Schema, type {Name}FormData } from '../schemas/{name}Schema'
    import { useCreate{Feature} } from '../hooks'
    import { FormField } from '@/components/ui/FormField'
    
    interface {Name}FormProps {
      onSuccess?: () => void
    }
    
    export function {Name}Form({ onSuccess }: {Name}FormProps) {
      const create{Feature} = useCreate{Feature}()
    
      const form = useForm({
        defaultValues: {
          title: '',
          content: '',
          // ... default values for all fields
        } satisfies {Name}FormData,
        onSubmit: async ({ value }) => {
          await create{Feature}.mutateAsync(value)
          onSuccess?.()
        },
        validatorAdapter: zodValidator(),
        validators: {
          onChange: {name}Schema,
        },
      })
    
      return (
        <form
          onSubmit={(e) => {
            e.preventDefault()
            form.handleSubmit()
          }}
          className="space-y-4"
        >
          <form.Field
            name="title"
            children={(field) => (
              <div className="form-field">
                <label htmlFor={field.name}>Title</label>
                <input
                  id={field.name}
                  value={field.state.value}
                  onChange={(e) => field.handleChange(e.target.value)}
                  onBlur={field.handleBlur}
                  aria-invalid={field.state.meta.errors.length > 0}
                  aria-describedby={`${field.name}-error`}
                />
                {field.state.meta.isTouched && field.state.meta.errors.length > 0 && (
                  <span id={`${field.name}-error`} className="error" role="alert">
                    {field.state.meta.errors[0]}
                  </span>
                )}
              </div>
            )}
          />
    
          <form.Field
            name="content"
            children={(field) => (
              <div className="form-field">
                <label htmlFor={field.name}>Content</label>
                <textarea
                  id={field.name}
                  value={field.state.value}
                  onChange={(e) => field.handleChange(e.target.value)}
                  onBlur={field.handleBlur}
                  rows={5}
                  aria-invalid={field.state.meta.errors.length > 0}
                />
                {field.state.meta.isTouched && field.state.meta.errors.length > 0 && (
                  <span className="error" role="alert">
                    {field.state.meta.errors[0]}
                  </span>
                )}
              </div>
            )}
          />
    
          {/* Add more fields as needed */}
    
          <form.Subscribe
            selector={(state) => [state.canSubmit, state.isSubmitting]}
            children={([canSubmit, isSubmitting]) => (
              <button
                type="submit"
                disabled={!canSubmit || isSubmitting}
                className="btn btn-primary"
              >
                {isSubmitting ? 'Saving...' : 'Save'}
              </button>
            )}
          />
    
          {create{Feature}.isError && (
            <div className="error" role="alert">
              {create{Feature}.error.message}
            </div>
          )}
        </form>
      )
    }
    

Read the full file on GitHub · 314 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. 6d ago First seen · 314 lines · 12 tokens per session scan A 7e79a351de08

Subscribe to this mod's changes

form-create is a command published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 6d ago), licensed MIT. It adds 12 tokens to every session and 2,225 once invoked, about $0.0001 per session on Opus 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.