OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add factorialco/factorial-code-skills --skill 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.
npx skills add factorialco/factorial-code-skills --skill fcode-json-schema
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.
"type": "object" with a properties map (one entry per field)
and an optional required array.type per field (string, integer, number, boolean, array,
object) and add validation (minimum/maximum, format, enum/oneOf,
uniqueItems, nested properties).ui object (e.g.
"ui": { "ui:widget": "textarea" }).assets/parametersSchema.sample.json for a complete, copy-pasteable
schema exercising every supported type — adapt fields from it rather than
guessing the shape."type": "string"; format: "email"; ui:widget of textarea,
color, hidden, or file."isSensitive": true masks the input (e.g. passwords/tokens).integer / number with minimum / maximum."type": "boolean".enum (select), oneOf of { const, title } (labeled radio
with ui:widget: "radio"), or an array with ui:widget: "checkboxes" +
uniqueItems.object with its own properties/required; arrays
of strings or of objects (type: "array" + items); raw JSON via
"ui": { "ui:field": "json" }.dependencies to show/hide fields based
on another field's value (see anotherBooleanField in the sample).markdown object with before /
after strings renders block markdown (full GFM, incl. tables) above/below
the field. Detail and a worked example in fcode-forms
(references/advanced.md).ui:steps node; see fcode-forms §Multi-step forms.string or boolean with
"ui": { "ui:widget": "oauth", "ui:options": { "authorizationUrl": … } }
renders a button that completes an OAuth flow in a popup ("ui:field": "oauth" for an object; see oneOauthConnectField in the sample). Contract
and callback in fcode-forms §Connect an external account."ui:widget": "file") is auto-uploaded to Storage before
the process runs; the parameter arrives as an fcode.storage://… reference,
not the file contents. Strip the prefix before fcode.storage.download(...).isSensitive: true only affects display/masking — still read the value
from a secret variable, never hardcode it.authorizationUrl must be injected with
{ "$ref": "#/variables/x" } from a preRenderProcess variable — never
{{x}}, which Mustache HTML-escapes into a URL the widget refuses (the
button renders disabled with a console warning).fcode-forms.ui:placeholder) accept fcode.i18n("key") tokens, substituted server-side
before the form is served — see fcode-i18n.