@n8n-as-code/skills 2.3.0-next.150 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ description: Use when the user explicitly wants to create, edit, validate, sync,
5
5
 
6
6
  # n8n Architect
7
7
 
8
- Use this skill for all n8n-as-code work: workspace readiness, migration, environments, managed local instances, tunnels, workflow authoring, validation, sync, push, and pull.
8
+ Use this skill for all n8n-as-code work: workspace readiness, environments, managed local instances, tunnels, workflow authoring, validation, sync, push, and pull.
9
9
 
10
10
  Use `{{N8NAC_CMD}}` as the primary interface. Use `{{N8N_MANAGER_CMD}}` only for local managed runtime lifecycle, tunnels, and workflow presentation commands that are explicitly exposed by n8n-manager.
11
11
 
@@ -30,41 +30,15 @@ Use `{{N8NAC_CMD}}` as the primary interface. Use `{{N8N_MANAGER_CMD}}` only for
30
30
 
31
31
  ## Workspace Readiness
32
32
 
33
- Use the unified migration preflight before resolving the effective environment. The dry-run is safe and reports whether any workspace migration is required:
33
+ Resolve the effective environment through the backend before workflow work:
34
34
 
35
35
  ```bash
36
- {{N8NAC_CMD}} workspace migrate --json
37
36
  {{N8NAC_CMD}} env status --json
38
37
  ```
39
38
 
40
- - Treat `workspace migrate --json` as the source of migration need.
41
- - Treat `env status --json` as the source of effective workspace readiness only after migration is not required or has been applied.
39
+ - Treat `env status --json` as the source of effective workspace readiness.
42
40
  - Do not infer readiness from raw files, generated agent docs, or directory names.
43
- - If migration is required, do not edit config files by hand or continue with environment/workflow work until it has been applied or explicitly deferred by the user.
44
-
45
- ## Migration
46
-
47
- Migration is one user-facing command. Do not reason about internal migration phases directly; summarize the report `operations` array when explaining what will change.
48
-
49
- 1. Run the dry-run first:
50
-
51
- ```bash
52
- {{N8NAC_CMD}} workspace migrate --json
53
- ```
54
-
55
- 2. If the dry-run reports `status: "dry-run"`, `required: true`, or otherwise indicates pending changes, stop and ask once before applying it. Do not run `workspace migrate --write` unless the user already directly requested applying migration.
56
- 3. After confirmation, apply migration and re-check readiness:
57
-
58
- ```bash
59
- {{N8NAC_CMD}} workspace migrate --write
60
- {{N8NAC_CMD}} workspace migrate --json
61
- {{N8NAC_CMD}} env status --json
62
- ```
63
-
64
- - Do not run `workspace migrate --write` without explicit confirmation unless the user already directly requested applying migration.
65
- - When reporting a dry-run, summarize the unified `operations` list and ask for exactly one confirmation for `{{N8NAC_CMD}} workspace migrate --write`.
66
- - Do not ask separately for different operation types. `{{N8NAC_CMD}} workspace migrate --write` applies the required migration as one operation.
67
- - Do not run environment, workflow, or setup commands while `workspace migrate --json` still reports migration required.
41
+ - If `env status --json` fails because the workspace is not configured, use `env add`, `env auth set`, and `env use` to create or select a V4 workspace environment.
68
42
  - Managed local instances remain machine-global runtime resources.
69
43
  - Workspace environments remain workspace-scoped and are managed through `{{N8NAC_CMD}} env ...`.
70
44
 
@@ -72,14 +46,12 @@ Migration is one user-facing command. Do not reason about internal migration pha
72
46
 
73
47
  1. `cd` to the context root.
74
48
  2. Run `{{N8NAC_CMD}} update-ai`, then read `AGENTS.md`.
75
- 3. Run `{{N8NAC_CMD}} workspace migrate --json`.
76
- 4. If migration is required, stop and ask for confirmation before `{{N8NAC_CMD}} workspace migrate --write` unless the user already requested applying migration.
77
- 5. Run `{{N8NAC_CMD}} env status --json` after migration is not required or has been applied.
78
- 6. If the context root is not ready, inspect managed local instances with `{{N8N_MANAGER_CMD}} instance list`.
79
- 7. Reuse an existing environment or managed local instance when suitable.
80
- 8. If no suitable environment exists, stop and ask the user whether they want to connect a remote n8n URL or create/reuse a managed local n8n instance. Do not create infrastructure by default. If the user chooses a managed local instance, ask separately whether they want a public tunnel.
81
- 9. Ask for host/API key only for an explicitly remote n8n environment.
82
- 10. Configure the environment with:
49
+ 3. Run `{{N8NAC_CMD}} env status --json`.
50
+ 4. If the context root is not ready, inspect managed local instances with `{{N8N_MANAGER_CMD}} instance list`.
51
+ 5. Reuse an existing environment or managed local instance when suitable.
52
+ 6. If no suitable environment exists, stop and ask the user whether they want to connect a remote n8n URL or create/reuse a managed local n8n instance. Do not create infrastructure by default. If the user chooses a managed local instance, ask separately whether they want a public tunnel.
53
+ 7. Ask for host/API key only for an explicitly remote n8n environment.
54
+ 8. Configure the environment with:
83
55
 
84
56
  ```bash
85
57
  {{N8NAC_CMD}} env add <name> --base-url <url> --workflows-path workflows/<name>
@@ -94,7 +66,7 @@ For a managed local instance:
94
66
  {{N8NAC_CMD}} env use Local
95
67
  ```
96
68
 
97
- 11. Run `{{N8NAC_CMD}} update-ai` after changing environments when the facade does not do it automatically.
69
+ 9. Run `{{N8NAC_CMD}} update-ai` after changing environments when the facade does not do it automatically.
98
70
 
99
71
  ## Environments
100
72
 
@@ -232,6 +204,40 @@ Never guess n8n node parameters.
232
204
  - Prefer the highest valid `typeVersion` returned by schema output.
233
205
  - For fixed collections such as Switch/If rules, Wait form fields, or nested options, read the full `node-info` output before writing values.
234
206
 
207
+ ## Optional Native n8n MCP Assist
208
+
209
+ The `n8n-as-code` MCP server is a client adapter for N8NAC tools. The native n8n MCP server is a separate live n8n instance endpoint. Native n8n MCP can complement this workflow for native knowledge, live state, and runtime execution, but it does not replace `{{N8NAC_CMD}}`, bundled knowledge, `.workflow.ts`, Git, or the sync discipline.
210
+
211
+ Use this routing policy:
212
+
213
+ - Default to local `{{N8NAC_CMD}}` for code-first workflow authoring, validation, pull, push, credentials, execution history, and presentation. Use `{{N8NAC_SKILLS_CMD}}` as the bundled offline knowledge default.
214
+ - Native MCP assist is configured per n8n-as-code environment. When creating or updating an environment, offer to configure it with `{{N8NAC_CMD}} native-mcp configure <environment> --token-stdin`; do not ask the user to manually configure a separate MCP server for Claude Code or the VS Code Workbench.
215
+ - If native MCP assist is configured, use it where it complements n8n-as-code: read-only live discovery, server-side validation, native SDK/reference knowledge, live node definitions, credential metadata without secrets, execution inspection, projects, folders, and explicit runtime execution/test strategy when supported.
216
+ - Check native availability with `{{N8NAC_CMD}} native-mcp status --include-tools --json` before relying on native tools.
217
+ - For user requests about the current/live n8n instance, existing remote workflows, available nodes in this instance, credential metadata, projects, folders, executions, drift, or duplicate discovery, prefer native MCP read-only tools after the status check. Do not fall back to local `{{N8NAC_CMD}} list`, `fetch`, `verify`, or bundled `skills` as the primary source for those live-audit facts when native MCP read-only tools are available.
218
+ - Do not expose native MCP assist on non-loopback HTTP/SSE transports unless the MCP transport is authenticated and `N8NAC_NATIVE_MCP_ALLOW_REMOTE=1` is explicitly set.
219
+ - Do not request full live execution payloads with `includeData=true` unless the user explicitly needs payload data and `N8NAC_NATIVE_MCP_ALLOW_EXECUTION_DATA=1` is set.
220
+ - Prefer `{{N8NAC_CMD}} test` when the execution strategy is to exercise the real webhook, chat, or form trigger contract.
221
+ - Prefer native runtime execution only when the generated execution strategy explicitly calls for it and it does something better than `{{N8NAC_CMD}} test`, such as workflow ID execution, non-webhook workflow testing, native pin-data test preparation, or direct execution diagnostics.
222
+ - Treat native execute/test as a side-effecting runtime action, like `{{N8NAC_CMD}} test`; do not run it just because the tool exists.
223
+ - Do not use native MCP create, update, publish, unpublish, archive, or destructive data-table tools unless the user explicitly requests direct native MCP mode and the tool is gated by permissions.
224
+ - If a workflow is ever created or changed through native MCP direct mode, immediately pull it back with `{{N8NAC_CMD}} pull <workflowId>` so the `.workflow.ts` file and Git remain the source of truth.
225
+ - If native MCP validation and local validation disagree, stop and report the divergence instead of forcing a push or direct update.
226
+ - Never put native MCP tokens in project files, generated docs, command arguments, or responses.
227
+
228
+ Use-case routing examples:
229
+
230
+ - Workflow authoring, editing, pull, push, sync, credentials, and durable workflow changes: use local `{{N8NAC_CMD}}` commands and `.workflow.ts` files.
231
+ - Offline node knowledge, examples, documentation, and schema-first authoring: use local `{{N8NAC_SKILLS_CMD}}` commands first.
232
+ - Live workflow discovery, drift investigation, projects, folders, credentials metadata, duplicate discovery, and execution inspection: prefer native MCP read-only tools when configured because the user is asking for current instance state.
233
+ - Connected-version node definitions or server-side validation: prefer native MCP read-only tools when the user asks what is available in this instance or needs validation against the connected n8n version. Use bundled knowledge for offline authoring when live instance state is not needed.
234
+ - Runtime execution: prefer `{{N8NAC_CMD}} test` for real webhook, chat, or form trigger contracts; prefer native runtime execution only for explicit workflow-ID execution, non-webhook testing, native pin-data preparation, or direct execution diagnostics.
235
+ - Direct native workflow creation, update, publish, unpublish, archive, or destructive operations: do not use them as an automatic path; require an explicit direct-native request and sync-back plan.
236
+
237
+ Do not treat the presence of any MCP server as permission to call native n8n MCP tools. Native n8n MCP is used if and only if the generated execution or investigation strategy needs live n8n capabilities that local N8NAC cannot provide as well.
238
+
239
+ Native MCP assist is a complementary knowledge, live-state, and runtime enrichment path, not the primary authoring or sync path.
240
+
235
241
  ## Knowledge Commands
236
242
 
237
243
  Use these commands instead of guessing: