agentleFS
neurawork-gitneurawork-git/n8n-autopilot/skills/deploy/SKILL.md

deploy

Skill18 starsChanged 42 days agoMITView on GitHub

Push a local .workflow.ts to n8n, verify remote state, and live-test (test URL by default; `--activate --prod` runs production test). Use when the user asks to deploy, push or ship an existing .workflow.ts file.

155 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pm-discovery, qa-phase and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    pm-discovery

    PM Agent Team - Automated product discovery, strategy, and PRD generation. Runs PM analysis workflow to produce comprehensive PRD before PDCA Plan phase.

    Also in 3 projects that use this

  • ww-w-aiSkill

    qa-phase

    Run QA tests at various levels (L1-L5) for features under PDCA management. Integrates with MCP tools to execute structured test plans.

    Also in 3 projects that use this

  • +10 more from ww-w-ai

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 4 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 139 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS is provided, use it.

    line 29
  2. Very specific:

    If validation fails → stop and report.

    line 37
  3. Very specific:

    Read the BLOCK <rule> <node> <message> lines, fix the .workflow.ts, push again.

    line 48
  4. Distinctive:

    If the user has confirmed they want to discard the remote change:

    line 73
  5. Distinctive:

    Exit 0: all present → proceed to test

    line 99
  6. Very specific:

    Only if the user explicitly asked for activation (--activate, or said so in their request).

    line 130
  7. Very specific:

    If the user passes --activate:

    line 133
  8. Very specific:

    After a successful push, check whether the workflow uses mcpTrigger:

    line 148
  9. Very specific:

    If yes, resolve the user-facing URL via the CLI (do not string-concat <host>/workflow/<id>):

    line 154
  10. Distinctive:

    Always validate before pushing.

    line 175
  11. Distinctive:

    Never activate or run the production test without an explicit user request — see the gate note at the top.

    line 178

“Common” is measured: kept by at least 6 in 10 of the 139 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy Workflow

Push a local .workflow.ts to n8n via n8nac, verify remote state, run a live test.

Model-invocable, with a user gate on activation. The push itself is guarded fail-closed by the PreToolUse hooks (env-gate, push-gate for drift, push-lint-gate) and lands as a draft — the published version stays live. That is why Claude may run this skill when the user asks to deploy in plain words. Activation and the production test are the irreversible part: run step 8 only when the user explicitly asked for it (--activate / --prod or "aktivieren" / "activate" in their request). Otherwise stop after step 7 and ask once whether to activate. (Before 5.6.2 the skill carried disable-model-invocation: true; CLAUDE.md routed plain-language deploy requests to it anyway, so they were refused.)

Steps

1. Resolve workflow

  • File path (e.g., workflows/create-lead.workflow.ts) — use directly
  • Workflow name (e.g., create lead) — find matching .workflow.ts in workflows/

If $ARGUMENTS is provided, use it. Otherwise, ask the user.

2. Validate before push (mandatory)

npx n8nac skills validate workflows/<name>.workflow.ts --strict --json

If validation fails → stop and report. Do not push with validation errors. For interpreting the error (false-positives, expression vs schema errors, auto-sanitization, bulk fixes), consult the companion n8n-architect skill's Common Mistakes — n8nac's raw validator messages are often terse.

2b. Expect the push-lint gate (runs inside push, fail-closed)

npx n8nac push is wrapped by a PreToolUse hook that compiles the file and refuses the push when (1) a node type or typeVersion is missing on the running instance, (2) a top-level parameter does not exist for the node's typeVersion (n8n ignores it silently), or (3) the design lint fails — no error strategy on a top-level workflow with external calls, continueOnFail without a downstream error check, unwired error output, orphan node, unbalanced expression, availableInMCP not true. Read the BLOCK <rule> <node> <message> lines, fix the .workflow.ts, push again. Rules and fix paths: docs/rules/gates.md. The bypass (N8N_AUTOPILOT_SKIP_LINT=1) exists for the user, not for the agent.

3. Drift check (mandatory — enforced by push-gate hook)

# Extract workflow id from @workflow({ id: '...' }) in the file
WF_ID=$(grep -oE "id:[[:space:]]*['\"][A-Za-z0-9]{10,}['\"]" workflows/<name>.workflow.ts | head -1 | grep -oE "[A-Za-z0-9]{10,}")

# Refresh remote cache, then read sync status
npx n8nac fetch "$WF_ID"
npx n8nac list --search "$WF_ID" --json

Decision table:

statusAction
TRACKEDSafe to push. Proceed to step 4.
LOCAL_ONLYNew workflow (no remote yet). Safe to push (no overwrite risk).
CONFLICT / MODIFIED_BOTH / DIVERGEDSTOP. Remote was modified since last pull. To avoid re-typing your edit: cp the local file to <file>.local-bak, run npx n8nac pull "$WF_ID" (remote wins), then diff the backup against the pulled file and re-apply your change as a small patch, then re-validate. NEVER use npx n8nac resolve --mode keep-current without explicit user authorization — the push-gate hook will block it.
REMOTE_ONLYLocal file references a remote id but no local tracking entry. Run npx n8nac pull "$WF_ID" first.
ARCHIVEDRead-only. Stop. Tell the user to unarchive via n8n UI or create a new workflow.

If the user has confirmed they want to discard the remote change:

N8N_AUTOPILOT_ALLOW_LOCAL_WINS=1 npx n8nac push workflows/<name>.workflow.ts --verify

4. Push + verify in one call

mcpTrigger check: If the workflow contains mcpTrigger, the PreToolUse hook (ensure-mcp-trigger-setting.sh) auto-fixes availableInMCP: false → true on push and warns when the field is missing entirely — see the warning and patch the source file if needed.

@workflow description field (n8nac 1.7.0+): Set description for better discoverability in n8nac list + n8n UI:

@workflow({ name: "My Workflow", description: "What it does in one sentence", settings: { ... } })
npx n8nac push workflows/<name>.workflow.ts --verify

--verify fetches the workflow after push and validates it against the local schema in one call. If verify fails → re-push.

5. Check credential presence

npx n8nac workflow credential-required <workflowId>
  • Exit 0: all present → proceed to test
  • Exit 1: credentials missing → report which credentials are needed, skip live test

6. Trigger classification + payload inference

npx n8nac test-plan <workflowId> --json

Extract triggerType, testable, suggestedPayload.

TriggerTestable via CLI?Action
webhook, chat, formyesproceed to live test
schedule, manual, errorTriggernoskip CLI live test → run /n8n-autopilot:test-manual <workflowId> which resolves the UI URL, waits for the execution-id, and inspects the run for you

7. Live test (test URL — no activation needed)

n8nac test calls the test URL (/webhook-test/) by default.

npx n8nac test <workflowId> --data '<suggestedPayload from step 6>'
# For GET/HEAD webhooks (workflow reads $json.query):
npx n8nac test <workflowId> --query '<suggestedPayload>'
  • Class A error (exit 0): missing credentials / model → report to user, do not iterate.
  • Class B error (exit 1): wiring error → fix → re-validate → re-push (--verify) → re-test (max 3 cycles).

8. Production test (optional, only with --activate)

Only if the user explicitly asked for activation (--activate, or said so in their request). If they did not, do not activate — ask once after step 7 whether they want it.

If the user passes --activate:

  1. Activate the workflow:
    npx n8nac workflow activate <workflowId>
  2. Production test:
    npx n8nac test <workflowId> --prod --data '<payload>'
  3. On success → workflow stays active.
  4. On failure → deactivate via npx n8nac workflow deactivate <workflowId>, report error.

9. mcpTrigger publish notice (manual)

After a successful push, check whether the workflow uses mcpTrigger:

grep -l "mcpTrigger\|n8n-nodes-langchain.mcpTrigger" workflows/<name>.workflow.ts

If yes, resolve the user-facing URL via the CLI (do not string-concat <host>/workflow/<id>):

npx n8nac workflow present <workflowId> --json

Surface a prominent notice using that URL:

⚠️  MANUAL PUBLISH REQUIRED — mcpTrigger detected

The MCP endpoint will return 404 until the workflow is published.

Open n8n UI:  <url from `n8nac workflow present`>
Click:        "Publish" button

n8nac push writes a new draft. The previously-published version stays live, but its MCP endpoint may diverge from the new draft. Each push to an mcpTrigger workflow requires a fresh UI publish — n8nac cannot publish on your behalf.

Safety

  • Always validate before pushing.
  • Workflows deploy as inactive by default. n8nac test uses the test URL, no activation needed.
  • --activate + --prod tests against the production webhook URL — use with caution.
  • Never activate or run the production test without an explicit user request — see the gate note at the top.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.