| name | implement-workflow-node |
| description | Use when adding, changing, or reviewing Workflow Nodes in the c0 agent repo, including shared node catalog metadata, Workflow Node options and ports, runtime node Adapters, adapter registry routing, compiler inline logic nodes, workflow validation, and tests for Workflow Node execution. |
Implement Workflow Node
Use this skill when implementing or reviewing a new Workflow Node in this repo. Keep authored metadata, runtime execution, validation, and tests aligned.
Start Here
- Read
CONTEXT.md for domain terms, especially Workflow, Workflow Node, and Workflow Run.
- Read
references/node-architecture.md for the current file map and Adapter pattern.
- Inspect the closest existing node category before editing:
- Runtime action Adapter:
packages/api/src/server/background/workflows/nodes/*.ts
- Shared catalog/options:
packages/shared/src/workflow-nodes.ts
- Inline logic execution:
packages/api/src/server/background/workflows/compiler.ts
- Tests:
tests/workflows/*
Choose The Node Kind
- Trigger nodes start Workflow Runs. Add scheduling/webhook lifecycle behavior only when the node actually starts runs.
- Logic nodes execute inside compiled workflow code. Implement them in
compiler.ts; do not route them through WorkflowActionExecutor.
- Action nodes execute through
WorkflowActionExecutor and the node Adapter registry. Add runtime behavior behind the appropriate Adapter Module.
- Provider variants should live inside an existing category Adapter unless behavior divergence justifies a new concrete Adapter Seam.