/n8n-autopilot:deploy <workflow-name>.workflow.ts [--activate] [--prod]from n8n-autopilot
Pushes a local .workflow.ts file to n8n, validates it, checks for drift, and runs a live test. Use when deploying or shipping n8n workflows.
Ships in n8n-autopilot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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/--prodor "aktivieren" / "activate" in their request). Otherwise stop after step 7 and ask once whether to activate. (Before 5.6.2 the skill carrieddisable-model-invocation: true; CLAUDE.md routed plain-language deploy requests to it anyway, so they were refused.)
workflows/create-lead.workflow.ts) — use directlycreate lead) — find matching .workflow.ts in workflows/If $ARGUMENTS is provided, use it. Otherwise, ask the user.
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.
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.
# 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:
| status | Action |
|---|---|
TRACKED | Safe to push. Proceed to step 4. |
LOCAL_ONLY | New workflow (no remote yet). Safe to push (no overwrite risk). |
CONFLICT / MODIFIED_BOTH / DIVERGED | STOP. 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_ONLY | Local file references a remote id but no local tracking entry. Run npx n8nac pull "$WF_ID" first. |
ARCHIVED | Read-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
mcpTrigger check: If the workflow contains
mcpTrigger, the PreToolUse hook (ensure-mcp-trigger-setting.sh) auto-fixesavailableInMCP: false → trueon push and warns when the field is missing entirely — see the warning and patch the source file if needed.
@workflowdescription field (n8nac 1.7.0+): Setdescriptionfor better discoverability inn8nac 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.
npx n8nac workflow credential-required <workflowId>
npx n8nac test-plan <workflowId> --json
Extract triggerType, testable, suggestedPayload.
| Trigger | Testable via CLI? | Action |
|---|---|---|
webhook, chat, form | yes | proceed to live test |
schedule, manual, errorTrigger | no | skip 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 |
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>'
--verify) → re-test (max 3 cycles).--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:
npx n8nac workflow activate <workflowId>
npx n8nac test <workflowId> --prod --data '<payload>'
npx n8nac workflow deactivate <workflowId>, report error.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.
n8nac test uses the test URL, no activation needed.--activate + --prod tests against the production webhook URL — use with caution.What SKILL.md sets; muted values are Claude Code's defaults
25 skills in this plugin
/build-stack-v2EXPERIMENTAL deterministic builder for a whole n8n workflow STACK (multiple sub-workflows wired via Execute Workflow), JS-orchestrated. Takes a PRP-style end-to-end use case, decomposes it into sub-workflows along known rules, fixes the handover contracts between them, documents the architecture (mermaid) in one central file, then builds each sub-workflow bottom-up via build-workflow-v2. Two modes: GREENFIELD (new stack) and EXTEND (change an existing one). Decomposition rules, build order (topological), and per-sub-WF gates are JS control flow the model cannot skip. Use for multi-workflow use cases; for a single workflow use build-workflow-v2./build-workflowFull 3-phase pipeline (Research → Write+Validate → Deploy+Test) for shipping an n8n workflow end-to-end. Wraps Etienne's `n8n-as-code:n8n-architect` skill for schema research + authoring, adds repo-scoped orchestration — community-template lookup, validate-push-test loop, mcpTrigger publish gate, execution inspection, Completion Report./build-workflow-v2EXPERIMENTAL deterministic variant of build-workflow + deploy, JS-orchestrated. Two modes: GREENFIELD (new workflow) and EDIT (change an existing one). Phase ordering, gate-checks (validate / drift-safe push --verify), and fix-loop limits are enforced by a Claude Code JS Workflow script instead of prose — gates become if/while control flow the model cannot skip or short-circuit. Subagent roles live in agents/n8n-*.md. Use when you want hard-enforced discipline over the soft prose pipelines.npx claudepluginhub neurawork-git/n8n-autopilot --plugin n8n-autopilotOther plugins' skills for the same job