Workflow Helper
Use this skill when the user asks about how to build, wire, configure, or troubleshoot ChengOS workflows.
Authoritative contract: for anything about workflow JSON shape, field
names, port handling, skipValidation, or generating importable JSON, defer to
the Workflow JSON Contract (docs/workflow-json-generation-guide.md). This
skill is the live-discovery/diagnosis companion to that contract.
Data Source
This skill queries the running ChengOS API for live, up-to-date node schemas and workflow templates.
Prerequisite: The ChengOS server must be running. Default base URL: http://localhost:19225.
Response Structure
All endpoints return { "data": ..., "timestamp": "..." }:
/nodes/types → data is an array of node objects
/nodes/schema/<type> → data is a single node object
/workflows/templates → data is an array of template summary objects
/workflows/templates/<id> → data is a single template detail object (includes full node/edge definition)
Each node object has (camelCase):
| Field |
Description |
typeId |
Node type identifier, e.g. "ai/llm" |
name |
Display name |
category |
Category string |
description |
What the node does |
inputSchema |
JSON Schema for input ports/fields |
outputSchema |
JSON Schema for output ports |
Each workflow template summary object has:
| Field |
Description |
workflowId |
Template UUID |
name |
Template name |
description |
What the template does |
nodeCount |
Number of nodes |
edgeCount |
Number of edges |
tags |
Array of tag strings |
isTemplate |
Always true |
The detail object adds a definition field:
definition.nodes — array of node objects (nodeId, nodeType, position, data)
definition.edges — array of edge objects (edgeId, source, sourcePort, target, targetPort)
URL format: node type IDs use / in URLs, e.g. ai/llm → /api/v1/nodes/schema/ai/llm.
Available Queries
BASE=http://localhost:19225/api/v1
# List all node types (returns full schemas for all nodes)
curl -s $BASE/nodes/types | jq '.data[] | {typeId, name, category, description}'
# Get full schema for a specific node (typeId uses / in URL path)
curl -s $BASE/nodes/schema/ai/llm | jq '.data'
# Input ports only
curl -s $BASE/nodes/schema/ai/llm | jq '.data.inputSchema.properties | to_entries[] | {port: .key, type: .value.type, title: .value.title}'
# Output ports only
curl -s $BASE/nodes/schema/ai/llm | jq '.data.outputSchema.properties | to_entries[] | {port: .key, type: .value.type}'
# Filter nodes by category (categories are lowercase, e.g. agent, ai, chat, document, io, rag, table, tools, ui, utils, workspace; read the live set from /nodes/types rather than assuming a fixed list)
curl -s $BASE/nodes/types | jq '.data[] | select(.category=="agent") | {typeId, name}'
# Search nodes by name keyword
curl -s $BASE/nodes/types | jq '.data[] | select(.name | test("LLM";"i")) | {typeId, name, category}'
# Get inputSchema directly from the list (avoids a second request)
curl -s $BASE/nodes/types | jq '.data[] | select(.typeId=="ai/llm") | .inputSchema.properties'
# List all workflow templates (name + description)
curl -s $BASE/workflows/templates | jq '.data[] | {workflowId, name, description, tags, nodeCount}'
# Get full JSON of a specific template (nodes + edges)
curl -s $BASE/workflows/templates/<id> | jq '.data'
# Show all node types used in a template
curl -s $BASE/workflows/templates/<id> | jq '.data.definition.nodes[] | {nodeId, nodeType}'
# Show all edges (wiring) in a template
curl -s $BASE/workflows/templates/<id> | jq '.data.definition.edges[]'
Note: The /nodes/types endpoint already includes full inputSchema and outputSchema for every node.
You can get all port information from a single list call instead of making a separate schema request.
Diagnostic Playbook
1. Node Selection
When: User asks "which node should I use for X?"
Steps:
curl -s $BASE/nodes/types | jq '.data[] | {typeId, name, category, description}'
- Narrow down by category or keyword in name/description
- For the top candidates, show their input/output ports from the same response
- Recommend the best match with reasoning
2. Wiring / Connection Problems
When: User asks "why can't I connect X to Y?" or "which port should I use?"
Steps:
- Get output ports of source and input ports of target from the list (or per-node schema)
- Compare port types for compatibility — common type mismatch:
string vs array, object vs string
- Check wiring rules that are not in the schema:
- A node's output port can only connect to one downstream input port of the same base type
stream typed ports require special handling — only chat/output and streaming-aware nodes accept them
- Control-flow edges (trigger/gateway) bypass type checking
- Explain root cause and show example edge JSON
3. Field Configuration
When: User asks "what should I fill in this field?" or "what does this config mean?"
Steps:
curl -s $BASE/nodes/schema/<node_type> | jq '.data.inputSchema.properties.<field_name>'
- Show:
title, description, type, default, enum values if present
- Explain what to fill and why, with a concrete example value
4. Error Troubleshooting
When: User provides an error message, failure symptom, or unexpected behavior.
Steps:
- Parse the error — identify which node type and field are involved
- Query that node's schema for validation rules on the suspect field
- Check for common issues not visible in schema:
- Missing required credential (API key not configured)
- Upstream node produced wrong type, causing downstream input mismatch
skipValidation: true bypassed type check but runtime failed
- Agent loop exceeded max iterations
- Provide: root cause, verification steps, fix instructions
5. Workflow Template Lookup
When: User asks "is there a template for X?" or "show me an example workflow".
Steps:
curl -s $BASE/workflows/templates | jq '.data[] | {workflowId, name, description, tags}'
- Find templates matching the user's goal by name/description/tags
- If a match is found, fetch the full definition:
curl -s $BASE/workflows/templates/<id> | jq '.data'
- From the definition, explain:
- Which nodes are used (
definition.nodes[].nodeType)
- How they are connected (
definition.edges[])
- Key configuration fields in each node's
data
6. Workflow Pattern Design
When: User asks about workflow patterns, best practices, or how to design a flow.
Steps:
- Identify what the user wants to achieve
- Check if any existing template covers the pattern:
curl -s $BASE/workflows/templates | jq '.data[] | {workflowId, name, description}'
- If a relevant template exists, use its node/edge structure as the starting point
- Otherwise, query relevant node schemas and recommend a pattern: which nodes, in what order, how to connect them
- Show a concrete example with node
typeIds, port names, and edge definitions
Response Format
When answering, include:
- Exact
typeId values (e.g., ai/llm, chat/output)
- Port names as shown in schema
properties keys
- Example edge JSON. Note the field names differ by context:
- Reading a template's
definition.edges: { "source": "…", "sourcePort": "…", "target": "…", "targetPort": "…" }
- Writing importable workflow JSON:
{ "edgeId": "<uuid>", "sourceNode": "<uuid>", "sourcePort": "…", "targetNode": "<uuid>", "targetPort": "…" } (see the Workflow JSON Contract)
- Clear explanation of why something works or doesn't work
1---2name: workflow-helper3description: Use this skill when the user has questions about building, debugging, or understanding ChengOS workflows — including node selection, port wiring, field configuration, error troubleshooting, and workflow pattern recommendations.4---56# Workflow Helper78Use this skill when the user asks about **how to build, wire, configure, or troubleshoot** ChengOS workflows.910> **Authoritative contract:** for anything about workflow JSON shape, field11> names, port handling, `skipValidation`, or generating importable JSON, defer to12> the **Workflow JSON Contract** (`docs/workflow-json-generation-guide.md`). This13> skill is the live-discovery/diagnosis companion to that contract.1415## Data Source1617This skill queries the running ChengOS API for **live, up-to-date** node schemas and workflow templates.1819**Prerequisite**: The ChengOS server must be running. Default base URL: `http://localhost:19225`.2021### Response Structure2223All endpoints return `{ "data": ..., "timestamp": "..." }`:24- `/nodes/types` → `data` is an array of node objects25- `/nodes/schema/<type>` → `data` is a single node object26- `/workflows/templates` → `data` is an array of template summary objects27- `/workflows/templates/<id>` → `data` is a single template detail object (includes full node/edge definition)2829Each node object has (camelCase):3031| Field | Description |32|-------|-------------|33| `typeId` | Node type identifier, e.g. `"ai/llm"` |34| `name` | Display name |35| `category` | Category string |36| `description` | What the node does |37| `inputSchema` | JSON Schema for input ports/fields |38| `outputSchema` | JSON Schema for output ports |3940Each workflow template summary object has:4142| Field | Description |43|-------|-------------|44| `workflowId` | Template UUID |45| `name` | Template name |46| `description` | What the template does |47| `nodeCount` | Number of nodes |48| `edgeCount` | Number of edges |49| `tags` | Array of tag strings |50| `isTemplate` | Always `true` |5152The detail object adds a `definition` field:53- `definition.nodes` — array of node objects (`nodeId`, `nodeType`, `position`, `data`)54- `definition.edges` — array of edge objects (`edgeId`, `source`, `sourcePort`, `target`, `targetPort`)5556**URL format**: node type IDs use `/` in URLs, e.g. `ai/llm` → `/api/v1/nodes/schema/ai/llm`.5758### Available Queries5960```bash61BASE=http://localhost:19225/api/v16263# List all node types (returns full schemas for all nodes)64curl -s $BASE/nodes/types | jq '.data[] | {typeId, name, category, description}'6566# Get full schema for a specific node (typeId uses / in URL path)67curl -s $BASE/nodes/schema/ai/llm | jq '.data'6869# Input ports only70curl -s $BASE/nodes/schema/ai/llm | jq '.data.inputSchema.properties | to_entries[] | {port: .key, type: .value.type, title: .value.title}'7172# Output ports only73curl -s $BASE/nodes/schema/ai/llm | jq '.data.outputSchema.properties | to_entries[] | {port: .key, type: .value.type}'7475# Filter nodes by category (categories are lowercase, e.g. agent, ai, chat, document, io, rag, table, tools, ui, utils, workspace; read the live set from /nodes/types rather than assuming a fixed list)76curl -s $BASE/nodes/types | jq '.data[] | select(.category=="agent") | {typeId, name}'7778# Search nodes by name keyword79curl -s $BASE/nodes/types | jq '.data[] | select(.name | test("LLM";"i")) | {typeId, name, category}'8081# Get inputSchema directly from the list (avoids a second request)82curl -s $BASE/nodes/types | jq '.data[] | select(.typeId=="ai/llm") | .inputSchema.properties'8384# List all workflow templates (name + description)85curl -s $BASE/workflows/templates | jq '.data[] | {workflowId, name, description, tags, nodeCount}'8687# Get full JSON of a specific template (nodes + edges)88curl -s $BASE/workflows/templates/<id> | jq '.data'8990# Show all node types used in a template91curl -s $BASE/workflows/templates/<id> | jq '.data.definition.nodes[] | {nodeId, nodeType}'9293# Show all edges (wiring) in a template94curl -s $BASE/workflows/templates/<id> | jq '.data.definition.edges[]'95```9697**Note**: The `/nodes/types` endpoint already includes full `inputSchema` and `outputSchema` for every node.98You can get all port information from a single list call instead of making a separate schema request.99100## Diagnostic Playbook101102### 1. Node Selection103104**When**: User asks "which node should I use for X?"105106Steps:1071. `curl -s $BASE/nodes/types | jq '.data[] | {typeId, name, category, description}'`1082. Narrow down by category or keyword in name/description1093. For the top candidates, show their input/output ports from the same response1104. Recommend the best match with reasoning111112### 2. Wiring / Connection Problems113114**When**: User asks "why can't I connect X to Y?" or "which port should I use?"115116Steps:1171. Get output ports of source and input ports of target from the list (or per-node schema)1182. Compare port types for compatibility — common type mismatch: `string` vs `array`, `object` vs `string`1193. Check wiring rules that are **not** in the schema:120 - A node's output port can only connect to one downstream input port of the same base type121 - `stream` typed ports require special handling — only `chat/output` and streaming-aware nodes accept them122 - Control-flow edges (trigger/gateway) bypass type checking1234. Explain root cause and show example edge JSON124125### 3. Field Configuration126127**When**: User asks "what should I fill in this field?" or "what does this config mean?"128129Steps:1301. `curl -s $BASE/nodes/schema/<node_type> | jq '.data.inputSchema.properties.<field_name>'`1312. Show: `title`, `description`, `type`, `default`, `enum` values if present1323. Explain what to fill and why, with a concrete example value133134### 4. Error Troubleshooting135136**When**: User provides an error message, failure symptom, or unexpected behavior.137138Steps:1391. Parse the error — identify which node type and field are involved1402. Query that node's schema for validation rules on the suspect field1413. Check for common issues not visible in schema:142 - Missing required credential (API key not configured)143 - Upstream node produced wrong type, causing downstream input mismatch144 - `skipValidation: true` bypassed type check but runtime failed145 - Agent loop exceeded max iterations1464. Provide: root cause, verification steps, fix instructions147148### 5. Workflow Template Lookup149150**When**: User asks "is there a template for X?" or "show me an example workflow".151152Steps:1531. `curl -s $BASE/workflows/templates | jq '.data[] | {workflowId, name, description, tags}'`1542. Find templates matching the user's goal by name/description/tags1553. If a match is found, fetch the full definition:156 `curl -s $BASE/workflows/templates/<id> | jq '.data'`1574. From the definition, explain:158 - Which nodes are used (`definition.nodes[].nodeType`)159 - How they are connected (`definition.edges[]`)160 - Key configuration fields in each node's `data`161162### 6. Workflow Pattern Design163164**When**: User asks about workflow patterns, best practices, or how to design a flow.165166Steps:1671. Identify what the user wants to achieve1682. Check if any existing template covers the pattern: `curl -s $BASE/workflows/templates | jq '.data[] | {workflowId, name, description}'`1693. If a relevant template exists, use its node/edge structure as the starting point1704. Otherwise, query relevant node schemas and recommend a pattern: which nodes, in what order, how to connect them1715. Show a concrete example with node `typeId`s, port names, and edge definitions172173## Response Format174175When answering, include:176- Exact `typeId` values (e.g., `ai/llm`, `chat/output`)177- Port names as shown in schema `properties` keys178- Example edge JSON. Note the field names differ by context:179 - Reading a template's `definition.edges`: `{ "source": "…", "sourcePort": "…", "target": "…", "targetPort": "…" }`180 - Writing importable workflow JSON: `{ "edgeId": "<uuid>", "sourceNode": "<uuid>", "sourcePort": "…", "targetNode": "<uuid>", "targetPort": "…" }` (see the Workflow JSON Contract)181- Clear explanation of why something works or doesn't work