new-form

new-form is a command for Claude Code from MohammadShehadeh/agent-skills. It costs 34 tokens per session (558 once invoked), scanned A, original, MIT.

A command for building a form with a validation schema, chosen controls, structured fields, and a submit path that reports errors consistently.

In plain words
What is it for?
Use it for forms with multiple fields, validation, or submit state, using React Hook Form and Zod when appropriate.
Why use it?
It separates field validation from server or network failures and helps the form match existing project conventions.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the agent-skills plugin — 6 skills, 6 commands, 1 agent shipped together

Good fit Use it for forms with multiple fields, validation, or submit state, using React Hook Form and Zod when appropriate.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/mohammadshehadeh/agent-skills/new-form
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.

Clone the repo
git clone --depth 1 https://github.com/MohammadShehadeh/agent-skills

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 6 skills, 6 commands, 1 agent.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/mohammadshehadeh/agent-skills/new-form"><img src="https://agentmods.dev/badge/commands/mohammadshehadeh/agent-skills/new-form.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 558 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.00034 $0.00558
Opus 5 $0.00017 $0.00279
Sonnet 5 $0.00007 $0.00112
Haiku 4.5 $0.00003 $0.00056

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

Security

Grade A, and why

new-form 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 12d 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.

commands/new-form.md · 43 lines

What it actually says

Build a form: $ARGUMENTS

Load the agent-skills-form skill (and agent-skills-conventions for errors/hooks when wiring submit). Work through phases 1–3 as the plan — no markup before confirmation.

1. Decide — form library or not

  • 2+ fields, validation, or submit state → RHF + zod (this command).
  • Single input (search, inline rename) → plain state or form action; stop and say so if the ask is over-engineered.
  • Survey the repo: existing forms, schema location, submit hooks, Field components — extend before inventing.

2. Schema & contract — before markup

  • Export a zod schema; derive type FormValues = z.infer<typeof schema>.
  • List every field, validation rule, and default value.
  • Separate field validation (zod) from submit failures (ErrorKey literals for server/network).
  • Add submit keys to constants/error-keys.ts before implementation.

Present schema, fields, and error keys — wait for confirmation.

3. Controls & layout

  • Pick controls from the chooser in agent-skills-formreferences/forms.md.
  • Plan FieldGroup / Field / FieldSet structure — no raw div + space-y-*.
  • 'use client' on the form component leaf only.

4. Build

  • Markup: shadcn Field primitives; data-invalid + aria-invalid together; InputGroup for buttons-in-inputs.
  • Logic: useForm + zodResolver, validation mode chosen deliberately (onTouched default, onChange only when a field needs per-keystroke feedback); double-submit guard via async hook or isSubmitting.
  • Submit: call service/action returning Result<T, K>; surface { ok: false, errorKey } via toast or root error — never hardcoded strings.
  • Files: kebab-case, colocated with feature; schema in lib/; no barrel index.ts.

5. Verify

  • All field validation states render correctly.
  • Submit: loading, success, and each planned errorKey path.
  • Typecheck/lint pass; narrowed Result<T, K> at call site.
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. 12d ago First seen · 43 lines · 34 tokens per session scan A 4955e694b881

Subscribe to this mod's changes

new-form is a command published in the GitHub repository MohammadShehadeh/agent-skills (2 stars, last pushed 28d ago), licensed MIT. It adds 34 tokens to every session and 558 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.