Claude-skill-registry kapso-automation
Manage Kapso workflows, AI agents, functions, and databases. Edit workflow graphs, configure triggers, manage executions, create functions, and perform database CRUD. Use when building automations, editing workflows, or managing project data.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/kapso-automation" ~/.claude/skills/majiayu000-claude-skill-registry-kapso-automation && rm -rf "$T"
manifest:
skills/data/kapso-automation/SKILL.mdsource content
Kapso Automation
When to use
Use this skill to build and run Kapso automation: workflow CRUD, graph edits, triggers, executions, function management, and D1 database operations.
Setup
Env vars:
(host only, noKAPSO_API_BASE_URL
)/platform/v1KAPSO_API_KEYPROJECT_ID
How to
Edit a workflow graph
- Fetch graph:
(note thenode scripts/get-graph.js <workflow_id>
)lock_version - Edit the JSON (see graph rules below)
- Validate:
node scripts/validate-graph.js --definition-file <path> - Update:
node scripts/update-graph.js <workflow_id> --expected-lock-version <n> --definition-file <path> - Re-fetch to confirm
For small edits, use
edit-graph.js with --old-file and --new-file instead.
If you get a lock_version conflict: re-fetch, re-apply changes, retry with new lock_version.
Manage triggers
- List:
node scripts/list-triggers.js <workflow_id> - Create:
node scripts/create-trigger.js <workflow_id> --trigger-type <type> --phone-number-id <id> - Toggle:
node scripts/update-trigger.js --trigger-id <id> --active true|false - Delete:
node scripts/delete-trigger.js --trigger-id <id>
For inbound_message triggers, first run
node scripts/list-whatsapp-phone-numbers.js to get phone_number_id.
Debug executions
- List:
node scripts/list-executions.js <workflow_id> - Inspect:
node scripts/get-execution.js <execution-id> - Get value:
node scripts/get-context-value.js <execution-id> --variable-path vars.foo - Events:
node scripts/list-execution-events.js <execution-id>
Create and deploy a function
- Write code with handler signature (see function rules below)
- Create:
node scripts/create-function.js --name <name> --code-file <path> - Deploy:
node scripts/deploy-function.js --function-id <id> - Verify:
node scripts/get-function.js --function-id <id>
Set up agent node with app integrations
- Find model:
node scripts/list-provider-models.js - Find account:
(usenode scripts/list-accounts.js --app-slug <slug>
)pipedream_account_id - Find action:
(action_id = key)node scripts/search-actions.js --query <word> --app-slug <slug> - Create integration:
node scripts/create-integration.js --action-id <id> --app-slug <slug> --account-id <id> --configured-props <json> - Add tools to agent node via
flow_agent_app_integration_tools
Database CRUD
- List tables:
node scripts/list-tables.js - Query:
node scripts/query-rows.js --table <name> --filters <json> - Create/update/delete with row scripts
Graph rules
- Exactly one start node with
=idstart - Never change existing node IDs
- Use
for new node IDs{node_type}_{timestamp_ms} - Non-decide nodes have 0 or 1 outgoing
edgenext - Decide edge labels must match
conditions[].label - Edge keys are
/source
/target
(notlabel
/from
)to
For full schema details, see
references/graph-contract.md.
Function rules
async function handler(request, env) { // Parse input const body = await request.json(); // Use env.KV and env.DB as needed return new Response(JSON.stringify({ result: "ok" })); }
- Do NOT use
,export
, or arrow functionsexport default - Return a
objectResponse
Execution context
Always use this structure:
- user-defined variablesvars
- system variablessystem
- channel datacontext
- request metadatametadata
Scripts
Workflows
| Script | Purpose |
|---|---|
| List workflows (metadata only) |
| Get workflow metadata |
| Create a workflow |
| Update workflow settings |
Graph
| Script | Purpose |
|---|---|
| Get workflow graph + lock_version |
| Patch graph via string replacement |
| Replace entire graph |
| Validate graph structure locally |
Triggers
| Script | Purpose |
|---|---|
| List triggers for a workflow |
| Create a trigger |
| Enable/disable a trigger |
| Delete a trigger |
| List phone numbers for trigger setup |
Executions
| Script | Purpose |
|---|---|
| List executions |
| Get execution details |
| Read value from execution context |
| Force execution state |
| Resume waiting execution |
| List execution events |
Functions
| Script | Purpose |
|---|---|
| List project functions |
| Get function details + code |
| Create a function |
| Update function code |
| Deploy function to runtime |
| Invoke function with payload |
| List function invocations |
App integrations
| Script | Purpose |
|---|---|
| Search integration apps |
| Search actions (action_id = key) |
| Get action JSON schema |
| List connected accounts |
| Create OAuth connect link |
| Resolve remote_options for a prop |
| Reload dynamic props |
| List saved integrations |
| Create an integration |
| Update an integration |
| Delete an integration |
Databases
| Script | Purpose |
|---|---|
| List D1 tables |
| Get table schema + sample rows |
| Query rows with filters |
| Create a row |
| Update rows |
| Upsert a row |
| Delete rows |
Notes
- Prefer file paths over inline JSON (
,--definition-file
)--code-file
is the same asaction_id
fromkeysearch-actions
uses--account-id
frompipedream_account_idlist-accounts- Variable CRUD (
,variables-set.js
) is blocked - Platform API doesn't support itvariables-delete.js - Raw SQL execution is not supported via Platform API
References
Read before editing:
- references/graph-contract.md - Graph schema, computed vs editable fields, lock_version
- references/node-types.md - Node types and config shapes
- references/workflow-overview.md - Execution flow and states
Other references:
- references/execution-context.md - Context structure and variable substitution
- references/triggers.md - Trigger types and setup
- references/app-integrations.md - App integration and variable_definitions
- references/functions-reference.md - Function management
- references/functions-payloads.md - Payload shapes for functions
- references/databases-reference.md - Database operations
Assets
| File | Description |
|---|---|
| Minimal linear workflow |
| Minimal branching workflow |
| Minimal agent workflow |
| Customer support intake |
| Interactive buttons + decide (function) |
| Interactive buttons + decide (AI) |
| API trigger + template + agent |
| Function for button routing |
| Agent node with app integrations |
Related skills
- WhatsApp messaging and templateswhatsapp-messaging
- WhatsApp Flowswhatsapp-flows
- Platform API and customerskapso-api