You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/cli/assets/skills/formkit/SKILL.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,33 @@ Use this skill when you are building, debugging, or refactoring FormKit forms, i
22
22
- Vue or Nuxt: `https://formkit.com/<page>.vue.md`
23
23
- The full route index for both runtimes is in `references/docs-index.md`.
24
24
25
+
## FormKit Pro
26
+
27
+
- Distinguish core inputs from Pro inputs before recommending or implementing one.
28
+
- Current Pro input docs routes are:
29
+
-`/inputs/autocomplete`
30
+
-`/inputs/colorpicker`
31
+
-`/inputs/currency`
32
+
-`/inputs/datepicker`
33
+
-`/inputs/dropdown`
34
+
-`/inputs/mask`
35
+
-`/inputs/rating`
36
+
-`/inputs/repeater`
37
+
-`/inputs/slider`
38
+
-`/inputs/taglist`
39
+
-`/inputs/toggle`
40
+
-`/inputs/togglebuttons`
41
+
-`/inputs/transfer-list`
42
+
-`/inputs/unit`
43
+
- Core inputs do not require FormKit Pro. Pro inputs require `@formkit/pro` plus a FormKit Pro project key.
44
+
- To add Pro to a project:
45
+
- create a free project key at `https://pro.formkit.com`
46
+
- install `@formkit/pro`
47
+
- add `createProPlugin(...)` to the FormKit config and register the needed Pro inputs
48
+
- React projects wire Pro through the FormKit React config. Vue and Nuxt projects wire Pro through the FormKit Vue config. The Pro plugin and inputs come from `@formkit/pro`.
49
+
- FormKit Pro keys are not public values for docs or examples, but they are also not private keys in the server-secret sense. They are client-side project keys and should usually be hard-coded in the codebase or another intentionally client-exposed config surface.
50
+
- Whenever you use or recommend a Pro input, say so in the user-facing summary and explicitly mention that `@formkit/pro` and a FormKit Pro key are required.
51
+
25
52
## Mental model
26
53
27
54
- FormKit is a node tree. Inputs, forms, groups, and lists are all nodes with value, props, state, validation, messages, and plugins.
@@ -33,7 +60,8 @@ Use this skill when you are building, debugging, or refactoring FormKit forms, i
33
60
34
61
- Prefer Tailwind CSS 4 as the primary styling mechanism when the project can support it.
35
62
- Avoid the legacy Genesis theme by default. Prefer Regenesis or another Tailwind theme from the FormKit theme workflow.
36
-
- To generate a project-root Tailwind theme, prefer the FormKit CLI:
63
+
- To generate a project-root Tailwind theme, prefer the FormKit CLI.
64
+
- For non-interactive Regenesis setup, pass the theme explicitly instead of using the prompt:
37
65
-`formkit theme --theme=regenesis`
38
66
- or `npx formkit@latest theme --theme=regenesis`
39
67
- That command generates `formkit.theme.(mjs|ts)` in the project root. Then:
@@ -196,7 +213,12 @@ export function renderProjectInstructionSection(
196
213
'- Prefer declarative FormKit patterns. Avoid event listeners unless there is no node- or state-driven alternative.',
197
214
'- Prefer Tailwind CSS 4 for FormKit styling when the project can support it.',
198
215
'- Avoid Genesis by default. Prefer generating Regenesis with `formkit theme --theme=regenesis`.',
216
+
'- `formkit theme --theme=regenesis` is the non-interactive way to generate the Regenesis-based `formkit.theme` file.',
199
217
'- For theme setup, wire `rootClasses` from `./formkit.theme` and add the `formkit.theme` file to Tailwind 4 via `@source` in the main CSS entry.',
218
+
`- Distinguish core inputs from Pro inputs. Current Pro routes: ${FORMKIT_PRO_INPUT_ROUTES}.`,
219
+
'- Pro inputs require `@formkit/pro` and a FormKit Pro key from `https://pro.formkit.com`.',
220
+
'- FormKit Pro keys are client-side project keys, not server-private secrets. Prefer hard-coded codebase config or another intentional client-exposed config surface.',
221
+
'- If you use or recommend Pro, say that clearly in the user-facing summary and mention the `@formkit/pro` plus Pro key requirement.',
200
222
'- For backend errors, prefer one adapter/helper that maps server payloads to FormKit form errors plus dot-notation input paths like `group.name` or `group.list.2.name`, then call `node.setErrors()` or framework `setErrors()`.',
0 commit comments