forms

A shared toolkit for building and editing forms in Next.js 16 applications, including validation and tracking whether fields have changed. It supports TanStack Form with Zod by default or react-hook-form when the project already uses it.

In plain words
What is it for?
Use it for forms, settings pages, edit panels, creation dialogs, Save buttons, dirty-state handling, validation, and shared server-error display in a Next.js App Router app.
Why use it?
It keeps form behavior consistent and prevents saving unchanged or invalid data.

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/lukedj78/dev-flow/forms
Any agent
npx skills add lukedj78/dev-flow --skill forms
Clone the repo
git clone --depth 1 https://github.com/lukedj78/dev-flow

Made for: Claude Code, Codex.

Per session 226 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,844 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.00226 $0.07844
Opus 5 $0.00113 $0.03922
Sonnet 5 $0.00045 $0.01569
Haiku 4.5 $0.00023 $0.00784

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

Security

Grade A, and why

forms 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scaffold_lib_forms.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

forms/SKILL.md · 501 lines

How it starts

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

forms — one toolkit, dirty-gated Save, shared error mapping

This skill governs where the form layer fits in a Next.js 16 App Router app: which hook, which rendering layer, which red flags. It does not teach @tanstack/react-form (or react-hook-form) itself — for the library's own API surface defer to the official docs.

The codebase exposes one shared toolkit at lib/forms/ regardless of which underlying library the project picked. Hook names, rendering layer, and error contract are identical across the two — consumer code looks the same. The choice between TanStack Form (default) and react-hook-form is made once at project scaffold time, written to meta.json#stack.forms, and never mixed.

When this skill applies

  • The user asks for a "form", "edit panel", "create dialog", "settings page", "save button".
  • Orchestrator (dev-flow) routes here after scaffolding a route that needs persistence.
  • The user reaches for useState to hold field values, raw useForm (bypassing the toolkit), hand-rolled dirty tracking, inline toast.success/toast.error on submit, or <form onSubmit> that calls fetch/services directly.
  • The user asks to audit a Next.js codebase against the form rules.

Contract

This skill follows the dev-flow contract — see references/contracts.md (vendored copy). Key facts:

  • Reads meta.json#stack.framework, stack.nextjs_version, stack.forms, stack.ui. For framework = "monorepo", reads the equivalent keys under stack.monorepo.web. stack.forms picks the state library (selection logic); stack.ui picks the rendering primitives (branching table) — the two are independent and both must be resolved before writing code.
  • Refuses to apply if any of these is true:
    • stack.framework ∉ {"next", "monorepo"} — non-Next.js targets are out of scope (RN forms use a different ecosystem; refer the user to the React Native form patterns).
    • stack.nextjs_version != "16" — Next.js 15 and earlier have different searchParams, no use(promise) baseline, no revalidatePath/revalidateTag defaults. Refuse to apply rather than silently guess.
    • The project uses Pages Router (pages/ directory exists). App Router only.
    • The project standardizes on a form library other than tanstack-form or react-hook-form (Formik, plain controlled state, etc.). Refuse to mix.
  • Appends a history entry to meta.json for every scaffold or edit.
  • Does not bump phase — forms live inside the implementation phase and don't gate progression.

Read the full file on GitHub · 501 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 501 lines · 226 tokens per session scan A c8de305011a4

Subscribe to this mod's changes

forms is a skill published in the GitHub repository lukedj78/dev-flow (5 stars, last pushed 3d ago), licensed MIT. It adds 226 tokens to every session and 7,844 once invoked, about $0.0011 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

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

uniwind

Uniwind — Tailwind CSS v4 styling for React Native. Use when adding, building, or debugging components in a React Native project that uses Uniwind classNames. Covers setup, Metro config, global.css, theming, className props, accent- color props, platform/data/state/responsive variants, CSS variables, custom utilities…

uni-stack/uniwind · 130 tokens

upgrading-react-native-storybook

Incrementally upgrade React Native Storybook across the supported migration paths. Use when upgrading @storybook/react-native projects from 5.3.x to 6.5.x, 6.5.x to 7.6.x, 7.6.x to 8.3.x, 8.x to 9.x, or 9.x to 10.x. Detect the currently installed Storybook version, choose only the next migration step, update…

storybookjs/react-native · 151 tokens

platform-specialist

Doc-driven platform integration expert. Converts a web app to LINE MINI App (LIFF SDK), PWA (Next.js 16), and Capacitor (iOS/Android). Expo & Tauri are secondary/legacy. ปรัชญาหลัก: ดึง docs จริงล่าสุดก่อนเขียนโค้ดเสมอ — ไม่ freeze snippet ที่จะ rot. Triggers: "LINE MINI App", "LIFF", "LINE OA", "convert to app"…

wasintoh/toh-framework · 161 tokens

skill-api

AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API.

javiarmesto/ALDC-AL-Development-Collection · 36 tokens

migrate-nativewind-to-uniwind

Migrate a React Native project from NativeWind to Uniwind. Use when the user wants to replace NativeWind with Uniwind, upgrade from NativeWind, switch to Uniwind, or mentions NativeWind-to-Uniwind migration. Handles package removal, config migration, Tailwind 4 upgrade, cssInterop removal, theme conversion, and all…

uni-stack/uniwind · 82 tokens