form-builder

A guide for building accessible, validated forms with React Hook Form, Zod, and shadcn Form in a Next.js application. It uses one validation definition on both the browser and the server.

In plain words
What is it for?
Use it for contact, signup, checkout, or settings forms. It covers shared validation, server actions, loading and error feedback, spam protection, and links between fields and their errors.
Why use it?
It reduces mismatches between browser checks and server checks while ensuring that labels, error messages, keyboard use, and submission states work for more people.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/m-binimran/dev-pack/form-builder
Any agent
npx skills add m-binimran/dev-pack --skill form-builder
Clone the repo
git clone --depth 1 https://github.com/m-binimran/dev-pack

Made for: Claude Code, Codex.

Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 347 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00043 $0.00347
Opus 5 $0.00022 $0.00173
Sonnet 5 $0.00009 $0.00069
Haiku 4.5 $0.00004 $0.00035

Measured yesterday against content hash 29584384ef8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

form-builder 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 yesterday.

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.

skills/form-builder/SKILL.md · 29 lines

What it actually says

form-builder

One source of truth for validation (Zod), shared by client and server. Accessible by construction.

Process

  1. Define the Zod schema once. It validates on the client AND in the server action — no drift.
  2. React Hook Form + shadcn Form: useForm({ resolver: zodResolver(schema) }). Use FormField, FormLabel, FormControl, FormMessage so each input is labelled and errors are associated + announced.
  3. Server action does the real validation: re-parse with the same schema in the action; never trust the client.
  4. States: disabled while submitting, visible loading, success + error feedback (aria-live for errors).
  5. Honeypot / basic spam guard on public forms; rate-limit the action.

Accessibility

  • Every field has a real <label>. Errors are text (not color-only) and linked via aria-describedby.
  • Submit reachable by keyboard; focus moves to the first error on failed submit.

Output

  • The schema, the form component, and the server action — with the shared schema referenced in both.
  • Note what validation runs client-side vs. server-side.

Guardrails

  • No validation that exists only on the client.
  • Don't put secrets/keys in the form component (client code — the secret-scan hook will block it).
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. yesterday First seen · 29 lines · 43 tokens per session scan A 29584384ef8d

Subscribe to this mod's changes

form-builder is a skill published in the GitHub repository m-binimran/dev-pack (2 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 347 once invoked, about $0.0002 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-08-31.

Related

Other skills, from other repositories

test-conversion

Workflow for converting unit tests to browser tests for Project Bedrock. Invoke this when the user wants to remove complex Browser dependencies from tests.

chromium/chromium · 31 tokens

Apify

Scrapes social platforms, business data, and e-commerce via Apify actors — Instagram, LinkedIn, TikTok, YouTube, Facebook, Google Maps, Amazon, and web crawls — filtering in code. USE WHEN scrape Instagram, scrape LinkedIn, scrape TikTok, scrape YouTube, scrape Facebook, Google Maps leads, Amazon reviews, business…

danielmiessler/LifeOS · 150 tokens

amazon-product-detail

Amazon product detail page scraper: extract full product data from any open Amazon product detail URL (any /dp/{asin} or /gp/product/{asin} page across all Amazon regional TLDs) — returns asin, url, title, brand, price, listPrice, stars, reviewsCount, starsBreakdown (5/4/3/2/1 star percentages), answeredQuestions…

browser-act/skills · 472 tokens

amazon-search-listing

Amazon search and category listing scraper: extract product listings from any Amazon search results page, keyword search URL, or category browse page and return per-item cards (asin, title, url, image, price, listPrice, stars, reviewCount, badges, isAmazonChoice, isBestSeller, isSponsored, delivery, boughtInPast…

browser-act/skills · 341 tokens

ebay-search-listing

Extracts product listings from any eBay search or category page URL, returning per-item cards (itemNumber, url, title, subtitle, caption, price, priceWithCurrency, currency, wasPrice, bids, shipping, seller, sellerFeedbackCount, sellerPositiveRating, reviewsCount, starRating, image) plus pagination state (currentPage…

browser-act/skills · 221 tokens

etsy-product-detail

Etsy product detail scraper: given an Etsy listing URL, returns full product detail including listingId, title, priceCurrent, priceOriginal, currency, images (all), description, shopName, shopUrl, rating, reviewCount, favorites, inCartCount, variations (with per-option price ranges), highlights, listedDate…

browser-act/skills · 187 tokens