Magicflu/Mofang 网页表记录和 BPM 工作流 CLI 技能。在用户询问魔方网表、Magicflu/Mofang 的空间、表单、字段、记录、数据查询/搜索等相关问题时使用。
Use this skill to operate Magicflu/Mofang web-table records and BPM tasks through the bundled CLI. Do not hand-write HTTP requests for supported operations; the CLI handles token refresh, field mapping, space/form resolution, filters, and BPM cookies.
Copy the whole mofang-records/ folder, not only SKILL.md.
ClientProject installGlobal installOpenClaw.openclaw/skills/mofang-records/``~/.openclaw/skills/mofang-records/Claude Code.claude/skills/mofang-records/``~/.claude/skills/mofang-records/Codex.codex/skills/mofang-records/``~/.codex/skills/mofang-records/Trae.trae/skills/mofang-records/``~/.trae/skills/mofang-records/Trae CN.trae/skills/mofang-records/``~/.trae-cn/skills/mofang-records/
Required runtime: Node.js 18+.
The CLI reads these environment variables, with MOFANG_* taking priority:
MOFANG_BASE_URL or BASE_URLMOFANG_USERNAME or USERNAMEMOFANG_PASSWORD or PASSWORDFETCH_TIMEOUT_MS in milliseconds, default 120000If a .env file exists beside cli.mjs, values are loaded only when the variable is not already set in the environment.
Run commands from the skill directory:
bash
node cli.mjs <command> '<json-params>'
Every command prints JSON:
json
{"success":true,"message":"...","data":{}}
If a command fails, keep the JSON output and report message to the user. Do not expose tokens or passwords.
bash
export MOFANG_BASE_URL="http://appdev.com.magicflu.com:9999"
export MOFANG_USERNAME="admin"
export MOFANG_PASSWORD="***"
node cli.mjs mofang_list_spaces '{}'
node cli.mjs mofang_list_spaces '{"q":"前端编程"}'
node cli.mjs mofang_list_forms '{"spaceHint":"AI前端编程演示"}'
node cli.mjs mofang_query_records '{"spaceHint":"AI前端编程演示","formHint":"采购申请主表","pageSize":10}'
powershell
$env:MOFANG_BASE_URL='http://appdev.com.magicflu.com:9999'
$env:MOFANG_USERNAME='admin'
$env:MOFANG_PASSWORD='***'
node cli.mjs mofang_list_spaces '{}'
node cli.mjs mofang_list_spaces '{\"q\":\"前端编程\"}'
node cli.mjs mofang_list_forms '{\"spaceHint\":\"AI前端编程演示\"}'
node cli.mjs mofang_query_records '{\"spaceHint\":\"AI前端编程演示\",\"formHint\":\"采购申请主表\",\"pageSize\":10}'
spaceHint when the user provides or implies a target space. This prevents cross-space ambiguity.create or update, run mofang_get_field_definitions for the target form and use real field name or label values.CommandPurposeKey paramsmofang_test_connectionTest base URL and credentials{}``mofang_list_spacesList or search accessible spacesq?, spaceHint?, page?, pageSize?, all?``mofang_list_formsList forms in a spacespaceHint?``mofang_get_field_definitionsGet fields, names, types, optionsformHint, spaceHint?``mofang_query_recordsQuery records with pagination/filter/orderformHint, spaceHint?, filters?, page?, pageSize?, all?``mofang_create_recordCreate one recordformHint, spaceHint?, data``mofang_update_recordUpdate one recordformHint, spaceHint?, recordId, data``mofang_delete_recordDelete one recordformHint, spaceHint?, recordId
CommandPurposeKey paramsmofang_bpm_list_tasksList assignee/candidate/delegated tasksmode?, page?, pageSize?``mofang_bpm_query_tasksLocate BPM tasks by form/record/processformHint?, spaceHint?, recordId?, taskName?``mofang_bpm_get_taskGet one task and variablestaskId``mofang_bpm_complete_taskComplete/submit a tasktaskId, simple?, variables?``mofang_bpm_delegate_taskDelegate a tasktaskId, assignee``mofang_bpm_claim_taskClaim a group tasktaskId, assignee?``mofang_bpm_resolve_taskResolve delegated tasktaskId``mofang_bpm_jump_taskAbort, rollback, or recovertaskId, kind, jumpTargetId?, targetTaskName?``mofang_bpm_open_transactionOpen transaction such as COSIGNtaskAction, processName?, taskName?``mofang_bpm_close_transactionClose transactiontransactionId
""YYYY-MM-DDYYYY-MM-DD HH:mm:ssmofang_get_field_definitions"1,2"{"id":"recordId"}{"entry":[{"id":"childId"}]}The CLI accepts either Chinese label or English name for data keys and filters[].fieldName, but using field name is safest for generated code.
Use filters as an array. Do not use frontend-only filterType, value2, or filterGroup unless you are relying on the CLI's best-effort legacy conversion.
json
{
"formHint": "采购申请主表",
"spaceHint": "AI前端编程演示",
"filters": [
{"fieldName": "申请日期", "operator": "between", "value": "2026-03-01,2026-04-01"}
],
"pageSize": 50
}
Supported operators include eq, noteq, like, like_and, like_or, lt, gt, lte, gte, between, isnull, isnotnull, in, notin, checkbox_in, checkbox_eq, tree, and rddl.
spaceHint.mofang_list_spaces {} lists spaces by created time descending. To locate a specific space faster, search directly with {"q":"关键词"} or {"spaceHint":"空间名"}.MOFANG_BASE_URL, network/VPN, and optionally set FETCH_TIMEOUT_MS.NumberFormatException, remove empty string values and check field definitions.mofang_get_field_definitions options and submit the shown option value, not the display label unless they are the same.\" or run from bash with normal single-quoted JSON.