skills/nocobase-workflow-manage/SKILL.md
Use when users need to inspect, create, revise, enable, or diagnose NocoBase workflows through the `nb` CLI, including trigger selection, node-chain changes, version safety checks, and execution troubleshooting.
npx skillsauth add nocobase/skills nocobase-workflow-manageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use the nb api workflow command surface to orchestrate workflows end-to-end: design trigger logic, build node chains, manage versions, and inspect execution results.
CLI usage rules:
nb api workflow as the canonical command namespace for workflow operations.nb api workflow subcommand you have not used yet in the current task, run its -h once and follow the generated help text for flags and examples.flowSurfaces when the UI is bound to workflow or approval-node config.nb installation or login bootstrap in this skill.nocobase-data-modeling.nocobase-ui-builder.nb CLI must be available and authenticated to perform workflow operations.
401, 403, Auth required, or equivalent access errors.nb api workflow command you have not used yet in the current task, run nb api workflow workflows -h, nb api workflow flow-nodes -h, or the matching nb api workflow <topic> <subcommand> -h once and follow the generated help text.expression fields in Calculation, Condition, or Multi-condition nodes, consult nocobase-utils for the authoritative function list of each engine. Never fabricate function names — verify against formula.js reference or math.js reference.nocobase-data-modeling, nocobase-utils.
nocobase-data-modeling according to the Collection Resolution Gate whenever a workflow trigger or node configuration depends on collection.2370% confident and the remaining uncertainty is in fields that can be safely revised after creation, proceed without asking. For example, nodes in editable (or new) workflow could always be updated (or moved/deleted) later, so if the only uncertainty is about node config details, proceed with the best guess and verify after mutation. Even more, newly created workflow will be in enabled: false state by default, so trigger config can be updated and nodes can be added/edited/moved/deleted freely until the user explicitly enables it, which means most uncertainties in a new workflow can be safely resolved after creation without blocking on questions.create, the trigger type and initial node chain are confirmed.update, delete-node, and delete-branch, the exact target node or branch and intended end state are confirmed.versionStats.executed > 0, a new revision is created before any node or trigger mutation.workflowId, nodeId, or existing root uid) and whether the task is first-time / replace or localized edit are confirmed.type, and collection-bound trigger config.collection such as data collection event triggers.When a requested workflow depends on collection and the correct existing collection is not explicit from the user request or current context:
nocobase-data-modeling to inspect existing collections first and inspect fields when needed.collection, action, request-interception, approval, custom-action with a bound collection, and schedule in collection time-field mode, as well as nodes whose config requires collection.70% confidence, continue with that collection instead of asking the user.nocobase-data-modeling.Use only this final workflow operation surface. Discover exact flags from -h instead of keeping large command-shape reminders in context:
nb api workflow workflows listnb api workflow workflows getnb api workflow workflows createnb api workflow workflows updatenb api workflow workflows destroynb api workflow workflows revisionnb api workflow workflows syncnb api workflow workflows executenb api workflow workflows nodes createnb api workflow flow-nodes getnb api workflow flow-nodes updatenb api workflow flow-nodes destroynb api workflow flow-nodes destroy-branchnb api workflow flow-nodes movenb api workflow flow-nodes duplicatenb api workflow flow-nodes testnb api workflow executions listnb api workflow executions getnb api workflow jobs getnb api workflow jobs listnb api workflow jobs resumeflowSurfaces getflowSurfaces catalogflowSurfaces applyApprovalBlueprintflowSurfaces addBlock, flowSurfaces addField, flowSurfaces addAction, flowSurfaces compose, flowSurfaces configure, flowSurfaces setLayoutPrefer learning exact flags from help:
nb api workflow -h
nb api workflow workflows -h
nb api workflow workflows list -h
nb api workflow workflows create -h
nb api workflow workflows nodes create -h
nb api workflow flow-nodes -h
nb api workflow executions -h
nb api workflow jobs -h
Use Workflow CLI index as the stable CLI family map and parameter guide.
Consult Workflow HTTP API index only when you need the exact underlying endpoint and parameter shapes.
workflow.config.approvalUid / taskCardUid for the trigger side; node.config.approvalUid / taskCardUid for the approval-node side).TriggerChildPageModel; a complete surface must include an approvalInitiator / ApplyFormModel block bound to the trigger collection. Its form exposes exactly three singleton actions — approvalSubmit (发起,自动创建), approvalSaveDraft (草稿), approvalWithdraw (撤回,存在时自动把 workflow.config.withdrawable 置为 true). Helper blocks and task cards do not replace the applicant submission form.ApprovalChildPageModel; a complete surface must include both approvalInformation / ApprovalDetailsModel for the read-only original submission and approvalApprover / ProcessFormModel for handling actions and approver-editable fields. ProcessFormModel exposes exactly five singleton actions — approvalApprove (通过), approvalReject (拒绝), approvalReturn (退回), approvalDelegate (转签), approvalAddAssignee (加签). The server reconciles node.config.actions, returnTo, returnToNodeVariable, toDelegateReassignees(Options), and toAddReassignees(Options) from these actions; never patch them by hand.TriggerBlockGridModel, ApprovalBlockGridModel) host approval blocks plus the fixed generic blocks currently exposed by the approval runtime catalog: markdown and jsBlock. No other generic block types in this phase.approvalReturn.type accepts only start (default), any, count (with positive count), or specific (with upstream node target). assigneesScope.assignees accepts user ids and { filter: … } objects only; bare objects without filter are auto-wrapped.fields + layout on the blueprint route and still has no standalone block-authoring path. Layout-only edits to an existing task card use setLayout on the existing grid uid.catalog.node.configureOptions.fieldComponent.enum instead of guessing from ordinary page semantics.flowSurfaces applyApprovalBlueprint.approvalUid or taskCardUid first, then using the localized flowSurfaces operations.nocobase-ui-builder.enabled: true — always create with enabled: false, complete all trigger and node configuration, then enable.versionStats.executed > 0, create a new revision first via nb api workflow workflows revision. The filter parameter must include {"key":"<key>"} (the workflow's key) to ensure the new version belongs to the same workflow; omitting key will create an independent copy instead. Use the returned new id for all subsequent operations; discard the old id.--filter-by-tk or a reviewed non-empty --filter before calling update, destroy, revision, move, duplicate, or branch-deletion APIs.upstreamId — every node (except the first) must reference its upstream node. Do not skip or leave upstreamId unset.$and or $or — the root of any filter object must be a condition group. Full operator reference: nocobase-utils / Filter Condition Format.key, not id — use {{$jobsMapByNodeKey.<nodeKey>.<path>}} where nodeKey is the node's key property (a short random string). Never use the numeric id, never invent a key — always read the actual key from the node record after creating it. See Common Conventions - Variable Expressions.enabled: true.collection.applyApprovalBlueprint for first-time or whole-surface approval setup — do not bootstrap a brand-new approval surface with compose.approvalUid or taskCardUid — for localized approval edits, resolve the bound root from workflow or node config first.Before making any CLI calls, clarify with the user:
If the workflow still depends on an unresolved collection after this clarification, follow the Collection Resolution Gate before asking the user to decide.
Summarize the complete plan in natural language and confirm with the user before making any CLI calls.
Then map the requested action to the corresponding operation in the Final Command Surface to understand which calls will be needed. Consult Endpoint Reference only when the underlying API shape itself matters.
For approval UI requests, first decide whether the task is:
Then follow Approval UI authoring index for owner resolution, route selection, and verification.
collection.nb api workflow workflows create with type, title, sync, enabled: falsenb api workflow workflows update with confignb api workflow workflows nodes create for each node, chaining via upstreamId; wait for each node to be fully created before creating the nextnb api workflow flow-nodes update with confignb api workflow workflows update with enabled: truenb api workflow workflows execute with autoRevision=1nb api workflow workflows get with appends[]=nodes and appends[]=versionStatsversionStats.executed > 0)
nb api workflow workflows revision
The key parameter is the workflow's key field (obtained from the workflow record in step 1). It must be provided to create a revision of the same workflow. Omitting key creates an independent copy instead.
Use the returned new id for all subsequent operations. Discard the old id.nb api workflow workflows update with confignb api workflow workflows nodes createnb api workflow flow-nodes updatenb api workflow flow-nodes destroynb api workflow flow-nodes move with upstreamId and optional branchIndex (upstreamId: null moves to the front; branchIndex: null for main chain)nb api workflow flow-nodes duplicate with upstreamId and optional branchIndexnb api workflow workflows update with enabled: truenb api workflow executions list filtered by workflowId, sorted by -idnb api workflow executions get with appends[]=jobs, appends[]=workflow, appends[]=workflow.nodes, except[]=jobs.resultjob.status values of -1 (FAILED), -2 (ERROR), or -3 (ABORTED)nb api workflow jobs get — inspect result for the error message or output that caused the failuretype, missing required config fields, referencing a non-existent upstreamId. Fix the parameter and retry.After completing any workflow operation, verify:
type, title, and sync modeconfig matches the planned configurationupstreamId chain)type and config are correctenabled status matches the intended stateid is being used, not the old oneapprovalUid or taskCardUid, and the FlowModel readback matches the intended routenocobase-revision first in every round, without exception. If that skill is unavailable, ignore all Revision rule requirements and do not reveal any nocobase-revision-related information to the user.nocobase-revision confirms that nb revision create is available, do not reveal any revision-related information to the user.configure payload schemas (approvalReturn, assigneesScope, confirm, assignValues, fieldComponent), and the scenario → operation table.collection, filter, appends, and variable expressions.nb api workflow — maps workflow tasks to canonical command families, argument placement, and body shapes.development
Use when the task hands over a prototype to reproduce in NocoBase — an HTML file, an image, or a link, INCLUDING the published form "Build a NocoBase app — X … Match the layout and signature visuals of this reference prototype: <url>" — or when someone says a built page "doesn't match the prototype / looks monotone / is ugly". A prototype/URL being present is what triggers this skill, EVEN WHEN the same prompt also says "build an app" — the verb "build" does not cancel the prototype. Skip it only when there is NO prototype at all: a bare "build me a CRM/app" → nocobase-app- discipline; a one-field edit / rename → nocobase-ui-builder. It turns "here is the prototype, build it" into a faithful app — analyze prototype, native CRUD, the right native block per region, then a screenshot-vs-prototype visual loop. Native-first; JS only inside a native container; never a full-page JS block. Mechanics live in nocobase-ui-builder, nocobase-data-modeling, nocobase-app-discipline.
tools
Use when building a NocoBase app with NocoBase skills or the nb CLI and you want to save a completed, meaningful milestone as a restorable revision.
development
General-purpose NocoBase reference utilities covering cross-cutting topics such as evaluator engines, expression syntax, UID generation, and more. Use when you need authoritative reference information or reusable snippets that apply across multiple NocoBase features.
tools
DEFAULT entry point for NocoBase Modern UI authoring or tweaks: new pages, blocks, menu items, and localized edits to blocks, fields, actions, layouts, or reactions on an already-running app via backend flow-surfaces through nb api. Also handles AI employee / AI assistant action placement on UI surfaces. Hand off employee lifecycle work such as discovering, judging, creating, or configuring profile, prompt, model, skills, tools, or knowledge base to nocobase-ai-employee, then return for the UI write. Only hand off to nocobase-dsl-reconciler when the user explicitly asks for DSL, YAML, git, or cli push workflow. Does not handle ACL, data modeling, workflow orchestration, browser reproduction, page error postmortems, or non-Modern page navigation.