fcode-json-schema
Author Factorial Code process input-parameter schemas (parametersSchema.json) — every supported input type and validation option, with a complete annotated sample. Use when creating or editing a parametersSchema.json, or defining a Factorial Code (fcode) process's input parameters or form fields.
How do I install this agent skill?
npx skills add https://github.com/factorialco/factorial-code-skills --skill fcode-json-schemaIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides documentation and schemas for configuring input parameters in 'Factorial Code'. It does not perform any autonomous actions, download external code, or access sensitive data. All external references target trusted FactorialHR infrastructure.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Factorial Code — input parameter schemas
A process's input parameters are defined by a JSON Schema in
parametersSchema.json. The same schema is what fcode-forms renders as a web
form, so designing the schema is designing the form. Values arrive in code as
fcode.context.parameters (see fcode-javascript / fcode-python).
Schemas render with react-jsonschema-form,
so its ui: options apply.
How to author one
- Top level is
"type": "object"with apropertiesmap (one entry per field) and an optionalrequiredarray. - Pick a
typeper field (string,integer,number,boolean,array,object) and add validation (minimum/maximum,format,enum/oneOf,uniqueItems, nestedproperties). - Control rendering with a per-field
uiobject (e.g."ui": { "ui:widget": "textarea" }). - Open
assets/parametersSchema.sample.jsonfor a complete, copy-pasteable schema exercising every supported type — adapt fields from it rather than guessing the shape.
Field types & widgets (in the sample)
- Text —
"type": "string";format: "email";ui:widgetoftextarea,color,hidden, orfile. - Secret —
"isSensitive": truemasks the input (e.g. passwords/tokens). - Numbers —
integer/numberwithminimum/maximum. - Boolean —
"type": "boolean". - Choices —
enum(select),oneOfof{ const, title }(labeled radio withui:widget: "radio"), or an array withui:widget: "checkboxes"+uniqueItems. - Structured — nested
objectwith its ownproperties/required; arrays of strings or of objects (type: "array"+items); raw JSON via"ui": { "ui:field": "json" }. - Conditional fields — use top-level
dependenciesto show/hide fields based on another field's value (seeanotherBooleanFieldin the sample). - Content around a field — a per-field
markdownobject withbefore/afterstrings renders block markdown (full GFM, incl. tables) above/below the field. Detail and a worked example infcode-forms(references/advanced.md). - Long forms — split roughly ten or more fields into steps with a root-level
ui:stepsnode; seefcode-forms§Multi-step forms. - Connect an external account — a
stringorbooleanwith"ui": { "ui:widget": "oauth", "ui:options": { "authorizationUrl": … } }renders a button that completes an OAuth flow in a popup ("ui:field": "oauth"for anobject; seeoneOauthConnectFieldin the sample). Contract and callback infcode-forms§Connect an external account.
Gotchas
- A file field (
"ui:widget": "file") is auto-uploaded to Storage before the process runs; the parameter arrives as anfcode.storage://…reference, not the file contents. Strip the prefix beforefcode.storage.download(...). isSensitive: trueonly affects display/masking — still read the value from a secret variable, never hardcode it.- An oauth field's
authorizationUrlmust be injected with{ "$ref": "#/variables/x" }from apreRenderProcessvariable — never{{x}}, which Mustache HTML-escapes into a URL the widget refuses (the button renders disabled with a console warning). - The schema is the single source of the form's fields — to change fields, edit the schema, not the form embed code.
- The schema is data, not code — no executable JavaScript, and all form
text is markdown (raw HTML is never rendered). Client-side behaviour belongs
in the embedding page — see
fcode-forms. - Visible text can be translated: schema strings (titles, descriptions,
ui:placeholder) acceptfcode.i18n("key")tokens, substituted server-side before the form is served — seefcode-i18n.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/factorialco/factorial-code-skills/fcode-json-schema">View fcode-json-schema on skillZs</a>