AgentSkillsCN

flowsfarm

使用 FlowsFarm CLI 管理 n8n 工作流。当用户希望同步、创建、编辑或管理本地 n8n 工作流时使用此技能。触发词包括 n8n 自动化任务、工作流版本控制或多实例工作流管理。

SKILL.md
--- frontmatter
name: flowsfarm
description: Manage n8n workflows with FlowsFarm CLI. Use when user wants to sync, create, edit, or manage n8n workflows locally. Triggers for n8n automation tasks, workflow version control, or multi-instance workflow management.

FlowsFarm CLI

Local-first n8n workflow synchronization. Requires bun runtime.

Setup

bash
# Install
bun install -g flowsfarm

# Initialize in project
flowsfarm init

# Add n8n connection (requires API key from n8n settings)
flowsfarm connect add -n <name> -u <url> -k <api-key>

Core Commands

CommandDescription
flowsfarm pullDownload workflows from n8n
flowsfarm pushUpload local changes to n8n
flowsfarm statusShow sync status
flowsfarm diffShow differences
flowsfarm listList workflows
flowsfarm list --jsonList as JSON
flowsfarm show <name>Show workflow details
flowsfarm show <name> --jsonFull workflow JSON
flowsfarm create <name>Create empty workflow
flowsfarm create <name> -t <template>Create from template

File Structure

code
.flowsfarm/
├── flowsfarm.db              # SQLite metadata
├── workflows/<conn>/<id>/
│   └── workflow.json         # Editable workflow
└── templates/*.json          # Reusable templates

Workflow JSON

json
{
  "name": "Workflow Name",
  "active": false,
  "nodes": [
    {
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [250, 300],
      "parameters": {
        "url": "https://api.example.com",
        "method": "GET"
      }
    }
  ],
  "connections": {
    "Trigger": {
      "main": [[{ "node": "HTTP Request", "type": "main", "index": 0 }]]
    }
  }
}

Common Node Types

TypePurpose
n8n-nodes-base.webhookHTTP trigger
n8n-nodes-base.scheduleCron trigger
n8n-nodes-base.httpRequestAPI calls
n8n-nodes-base.codeJavaScript/Python
n8n-nodes-base.ifConditional
n8n-nodes-base.switchMulti-condition
n8n-nodes-base.setTransform data
n8n-nodes-base.mergeCombine streams

Templates

bash
# Save workflow as template
flowsfarm templates save "My Workflow" -n my-template

# List templates
flowsfarm templates

# Create from template
flowsfarm create "New Workflow" -t my-template

Sync Workflow

  1. flowsfarm pull - Get latest from n8n
  2. Edit .flowsfarm/workflows/.../workflow.json
  3. flowsfarm push - Upload changes

Use --force to overwrite on conflicts.