← 返回 Skills 市场
work-fllows
作者
liu xiansen
· GitHub ↗
· v1.0.0
· MIT-0
186
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install work-fllows
功能描述
Guide AI to create NocoBase workflows — triggers, conditions, data operations, SQL, scheduling
使用说明 (SKILL.md)
NocoBase Workflow Building
You are guiding the user to create automated workflows in NocoBase.
Key Concepts
Trigger Types
| Type | Description | Mode |
|---|---|---|
collection |
Data change trigger | 1=create, 2=update, 3=create+update, 4=delete |
schedule |
Time-based trigger | 0=cron, 1=date field |
action |
Manual button trigger | — |
Node Types
| Type | Description |
|---|---|
condition |
If/else branch (basic engine or math.js) |
update |
Update existing records |
create |
Create new records |
query |
Query records for use in downstream nodes |
sql |
Execute raw SQL |
request |
HTTP request (webhooks, external APIs) |
loop |
Iterate over array data |
end |
Terminate workflow (1=success, 0=failure) |
Node Linking Model
- Nodes form a linked list:
upstreamId→downstreamId - Branch nodes (condition, loop) use
branchIndex:1= true branch (condition) or loop body (loop)0= false branch (condition)null= main line continuation
Variable System
| Variable | Description |
|---|---|
{{$context.data.field}} |
Field from the trigger record |
{{$context.data.id}} |
ID of the trigger record |
{{$jobsMapByNodeKey.\x3Ckey>.field}} |
Result from a previous node |
{{$scopes.\x3Ckey>.item}} |
Current item in a loop |
Workflow Patterns
Pattern 1: Auto-numbering (on create)
Generate sequential IDs like PR-2026-001:
# Step 1: Create workflow
nb_create_workflow("Auto Purchase Number", "collection",
'{"mode": 1, "collection": "purchase_requests", "appends": [], "condition": {"$and": []}}')
# Step 2: Add SQL node
nb_add_node(wf_id, "sql", "Generate Number",
'{"dataSource": "main", "sql": "UPDATE purchase_requests SET request_no = \'PR-\' || TO_CHAR(NOW(), \'YYYY\') || \'-\' || LPAD((SELECT COALESCE(MAX(CAST(SUBSTRING(request_no FROM \'[0-9]+$\') AS INT)),0)+1 FROM purchase_requests WHERE request_no LIKE \'PR-\' || TO_CHAR(NOW(), \'YYYY\') || \'-%\')::TEXT, 3, \'0\') WHERE id = {{$context.data.id}}"}')
# Step 3: Enable
nb_enable_workflow(wf_id)
Pattern 2: Status Sync (on create)
Set default status when a record is created:
nb_create_workflow("Default Status", "collection",
'{"mode": 1, "collection": "orders", "appends": [], "condition": {"$and": []}}')
nb_add_node(wf_id, "update", "Set Draft Status",
'{"collection": "orders", "params": {"filter": {"id": "{{$context.data.id}}"}, "values": {"status": "draft"}}}')
nb_enable_workflow(wf_id)
Pattern 3: Conditional Branch (on create)
Different actions based on field value:
nb_create_workflow("Transfer Type Handler", "collection",
'{"mode": 1, "collection": "transfers", "appends": [], "condition": {"$and": []}}')
# Condition node
cond = nb_add_node(wf_id, "condition", "Is Transfer?",
'{"rejectOnFalse": false, "engine": "basic", "calculation": {"group": {"type": "and", "calculations": [{"calculator": "equal", "operands": ["{{$context.data.type}}", "transfer"]}]}}}')
# True branch: update status to "transferred"
nb_add_node(wf_id, "update", "Mark Transferred",
'{"collection": "assets", "params": {"filter": {"id": "{{$context.data.asset_id}}"}, "values": {"status": "transferred"}}}',
upstream_id=cond_id, branch_index=1)
# False branch: update status to "borrowed"
nb_add_node(wf_id, "update", "Mark Borrowed",
'{"collection": "assets", "params": {"filter": {"id": "{{$context.data.asset_id}}"}, "values": {"status": "borrowed"}}}',
upstream_id=cond_id, branch_index=0)
nb_enable_workflow(wf_id)
Pattern 4: Field Change Trigger (on update)
React when specific fields change:
nb_create_workflow("Disposal Complete", "collection",
'{"mode": 2, "collection": "disposals", "changed": ["status"], "condition": {"status": {"$eq": "disposed"}}, "appends": []}')
nb_add_node(wf_id, "update", "Update Asset Status",
'{"collection": "assets", "params": {"filter": {"id": "{{$context.data.asset_id}}"}, "values": {"status": "disposed"}}}')
nb_enable_workflow(wf_id)
Pattern 5: Date-based Schedule
Trigger N days before a date field:
# Trigger 30 days before insurance expiry
nb_create_workflow("Insurance Expiry Warning", "schedule",
'{"mode": 1, "collection": "insurance", "startsOn": {"field": "end_date", "offset": -30, "unit": 86400000}, "repeat": null, "appends": []}')
nb_add_node(wf_id, "sql", "Mark Expiring",
'{"dataSource": "main", "sql": "UPDATE insurance SET remark = \'expiring soon\' WHERE id = {{$context.data.id}}"}')
nb_enable_workflow(wf_id)
Pattern 6: Cron Schedule
# Run every weekday at 9 AM
nb_create_workflow("Daily Report", "schedule",
'{"mode": 0, "startsOn": "2026-01-01T00:00:00.000Z", "repeat": "0 9 * * 1-5"}')
Pattern 7: Multi-node Chain
Chain multiple nodes on the main line:
nb_create_workflow("Complex Flow", "collection",
'{"mode": 1, "collection": "orders", "appends": [], "condition": {"$and": []}}')
# Node 1 (first node, no upstream_id needed)
n1 = nb_add_node(wf_id, "query", "Get Customer",
'{"collection": "customers", "multiple": false, "params": {"filter": {"id": "{{$context.data.customer_id}}"}}}')
# Node 2 (chains after node 1)
n2 = nb_add_node(wf_id, "update", "Update Order",
'{"collection": "orders", "params": {"filter": {"id": "{{$context.data.id}}"}, "values": {"customer_name": "{{$jobsMapByNodeKey.NODE_KEY.name}}"}}}',
upstream_id=n1_id)
nb_enable_workflow(wf_id)
Workflow
Phase 1: Plan
Before creating workflows, identify:
- Trigger: What event starts the workflow? (record created/updated/deleted, schedule, manual)
- Collection: Which table triggers it?
- Logic: What conditions and actions are needed?
- Target: What data gets modified?
Phase 2: Create
- Create workflow with trigger config
- Add nodes in order (first node auto-links, subsequent need
upstream_id) - For branches: add condition node, then true/false branch nodes with
branch_index
Phase 3: Enable & Verify
- Enable the workflow
- List workflows to confirm:
nb_list_workflows() - Inspect with:
nb_get_workflow(wf_id)
Best Practices
- Title convention: Use prefixes for grouping, e.g. "AM-WF01 Auto Number"
- One workflow per concern: Don't combine unrelated logic
- Idempotent SQL: Write SQL that's safe to run multiple times
- Test before enable: Create all nodes first, then enable
- Batch cleanup: Use
nb_delete_workflows_by_prefix("AM-")to clean up - Duplicate prevention: Check
nb_list_workflows()before creating — duplicate titles cause confusion - Variable references: Always use double braces
{{$context.data.field}}— single braces won't work
安全使用建议
This skill appears to be an instruction template for creating NocoBase workflows and is internally consistent. Before installing or using it, verify: (1) how the platform's nb_* tools authenticate to your NocoBase instance and whether that account has limited permissions (avoid using an admin account if possible); (2) review any workflow that includes 'sql' or 'request' nodes — they can run arbitrary SQL and call external endpoints, so audit them for unsafe queries or data leaks; (3) test workflows in a staging environment first; and (4) note the skill has no homepage and an unknown owner, so prefer caution and manual review of any generated workflow definitions before enabling them in production.
功能分析
Type: OpenClaw Skill
Name: work-fllows
Version: 1.0.0
The skill bundle provides a comprehensive set of tools and instructions for managing NocoBase workflows, including support for SQL execution, HTTP requests, and automated triggers. While the inclusion of raw SQL and webhook capabilities (request nodes) represents a high-risk surface, the instructions in skill.md are clearly aligned with legitimate administrative tasks such as auto-numbering, status synchronization, and scheduling. No evidence of malicious intent, data exfiltration, or prompt injection was found.
能力评估
Purpose & Capability
The name/description and the SKILL.md content align: the document provides patterns and helper calls for creating NocoBase workflows (triggers, nodes, scheduling, SQL). Declared tools (nb_create_workflow, nb_add_node, etc.) are consistent with the stated goal.
Instruction Scope
Instructions focus on creating workflows and node patterns. However the workflows include 'sql' nodes (raw SQL execution) and 'request' nodes (HTTP calls) which are powerful capabilities — the SKILL.md shows examples that perform UPDATEs and external requests. The instructions themselves do not instruct reading unrelated system files or environment variables.
Install Mechanism
Instruction-only skill with no install spec and no code files. Nothing is written to disk or downloaded by the skill itself.
Credentials
The skill declares no required environment variables or credentials. That is plausible for an instruction-only document, but the tool names imply platform-provided actions that will need authentication to a NocoBase instance; the skill does not document required credentials or required permission scope for those operations.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request persistent presence or modify other skills/config. Autonomous invocation is allowed by default on the platform but the skill does not request extra privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install work-fllows - 安装完成后,直接呼叫该 Skill 的名称或使用
/work-fllows触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
技能工作流
元数据
常见问题
work-fllows 是什么?
Guide AI to create NocoBase workflows — triggers, conditions, data operations, SQL, scheduling. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 186 次。
如何安装 work-fllows?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install work-fllows」即可一键安装,无需额外配置。
work-fllows 是免费的吗?
是的,work-fllows 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
work-fllows 支持哪些平台?
work-fllows 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 work-fllows?
由 liu xiansen(@alexander-lq)开发并维护,当前版本 v1.0.0。
推荐 Skills