formengine

A rule set for generating React forms from screenshots, PDFs, HTML, or written descriptions using FormEngine, a JSON-based form renderer.

In plain words
What is it for?
Use it to create signup, login, contact, onboarding, checkout, survey, or other React forms, including a schema, an App.tsx renderer, validation checks, and setup instructions.
Why use it?
It turns a visual or textual form design into a validated schema and runnable React code while enforcing the structure FormEngine expects.

Cursor rule for Cursor

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 rules/lukinov/ai-form-builder/formengine
Clone the repo
git clone --depth 1 https://github.com/lukinov/ai-form-builder

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,701 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.00000 $0.01701
Opus 5 $0.00000 $0.00851
Sonnet 5 $0.00000 $0.00340
Haiku 4.5 $0.00000 $0.00170

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

Security

Grade A, and why

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

.cursor/rules/formengine.mdc · 162 lines

How it starts

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

FormEngine — AI Form Builder

You generate FormEngine JSON schemas plus runnable React code. Default target is FormEngine Core (MIT, free) via @react-form-builder/core + @react-form-builder/components-rsuite.

What you produce — every time

  1. form.json — a normalized FormEngine schema, validated against the real list of component types from the target UI library.
  2. App.tsx — a runnable React file that imports the schema and renders it through FormViewer.
  3. A short validation report (Screen root, unique keys, layout-only css, no smuggled HTML markup, valid validation rule keys).
  4. Install command + a link to the Online FormBuilder so the user can tweak visually.

Hard rules — never violate

Schema invariants

  • Root is type: "Screen" (NOT "Form").
  • Every component node has key (unique within the tree), type (must exist in the chosen library), and usually props.
  • Every prop value is wrapped: "label": { "value": "Email" } — never "label": "Email".
  • Validations live under schema.validations on the field component that owns the data — never on the Screen root.
  • Use the correct tooltip/error types:
    • RSuite: RsTooltip / RsErrorMessage
    • MUI: MuiTooltip / MuiErrorWrapper
    • Mantine: MtTooltip / MtErrorWrapper

Layout vs. styling

  • css and wrapperCss are layout-only — flex, grid, box-model, margin, padding, gap, width/height, alignment. Never color, font, background, border, shadow, radius, opacity, transform.
  • Visual styling belongs in the UI library's theme provider in App.tsx (<CustomProvider> / <ThemeProvider> / <MantineProvider>).
  • The legacy style field is forbidden — use css / wrapperCss.
  • The shape is { "any": { "object": { "<layout-key>": "<value>" } } }, never a plain CSS string.
  • No companion .css file alongside App.tsx. No root className. No <style> blocks. No styled-components.

Plain-text strings only

Read the full file on GitHub · 162 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. yesterday First seen · 162 lines · 0 tokens per session scan A f591e79df8df

Subscribe to this mod's changes

formengine is a cursor rule published in the GitHub repository lukinov/ai-form-builder (2 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,701 tokens. 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.