Use when the user explicitly wants to create, edit, validate, sync, or troubleshoot n8n workflows, asks about n8n nodes or automation, or wants to use n8n-as-code in the current context root.
72
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use this skill for all n8n-as-code work: workspace readiness, environments, managed local instances, tunnels, workflow authoring, validation, sync, push, and pull.
Use npx --yes n8nac as the primary interface. Use npx --yes @n8n-as-code/n8n-manager only for local managed runtime lifecycle, tunnels, and workflow presentation commands that are explicitly exposed by n8n-manager.
n8nac-config.json, AGENTS.md, .agents/skills, and the configured workflowsPath.npx --yes n8nac update-ai from the context root, then read AGENTS.md. update-ai is designed to create or refresh the n8n-as-code block without destroying existing user or agent instructions.n8nac command and n8n-manager command listed in AGENTS.md. Those context-root commands override the portable examples in this skill.npx --yes n8nac env ..., npx --yes n8nac workspace ..., npx --yes n8nac list, pull, push, validate, test, and update-ai command from the context root unless the user explicitly gives another context root.AGENTS.md is bootstrap context only, not a source of configuration truth.workflowsPath from AGENTS.md.npx --yes n8nac env status --jsonworkflowsPath for workflow files. It is the configured workflow directory for the active environment.workflowsPath from environment name/id, instanceIdentifier, instanceUserIdentifier, projectId, projectName, or legacy sync fields.n8nac-config.json, ~/.n8n-manager, or n8n-manager secret files by hand.Resolve the effective environment through the backend before workflow work:
npx --yes n8nac env status --jsonenv status --json as the source of effective workspace readiness.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.npx --yes n8nac env ....cd to the context root.npx --yes n8nac update-ai, then read AGENTS.md.npx --yes n8nac env status --json.npx --yes @n8n-as-code/n8n-manager instance list.npx --yes n8nac env add <name> --base-url <url> --workflows-path workflows/<name>
npx --yes n8nac env auth set <name> --api-key-stdin
npx --yes n8nac env use <name>For a managed local instance:
npx --yes n8nac env add Local --managed-instance <id> --workflows-path workflows/local
npx --yes n8nac env use Localnpx --yes n8nac update-ai after changing environments when the facade does not do it automatically.Use npx --yes n8nac env ... for workspace environments, remote URLs, active environment, API-key binding, projects, and workflow paths.
npx --yes n8nac env status --json
npx --yes n8nac env list
npx --yes n8nac env add <name> --base-url <url> --workflows-path workflows/<name>
npx --yes n8nac env auth set <name> --api-key-stdin
npx --yes n8nac env use <name>--api-key-stdin for API keys.env auth set binds the key to one environment, so several environments may share a base URL with one key each. Run it once per environment; apiKeySource in env status --json is workspace-environment when the environment uses its own key.npx --yes n8nac env --help or npx --yes n8nac env <subcommand> --help.Attach a managed local instance to the workspace with npx --yes n8nac env ...:
npx --yes n8nac env add Local --managed-instance <id> --workflows-path workflows/local
npx --yes n8nac env use LocalUse npx --yes @n8n-as-code/n8n-manager only for local managed instance lifecycle, tunnels, and workflow presentation commands that are part of the local runtime layer.
Inspect existing managed instances before changing local machine state:
npx --yes @n8n-as-code/n8n-manager instance list
npx --yes @n8n-as-code/n8n-manager instance --help
npx --yes @n8n-as-code/n8n-manager config getDo not invent n8n-manager subcommands. Use npx --yes @n8n-as-code/n8n-manager <subcommand> --help when unsure.
When the context root is not configured and no suitable existing instance is available, stop and ask the user to choose. Do not create infrastructure by default.
Present these choices clearly:
npx --yes n8nac env.If the user chooses a managed local Docker instance, ask the tunnel question separately:
Do not enable, refresh, or start a public tunnel unless the user explicitly requested public access, webhook testing, or approved the tunnel option. If public access is not needed, create/start the managed instance without --tunnel.
Only run these commands after the user has explicitly chosen the corresponding option.
Managed local instance without public tunnel:
npx --yes @n8n-as-code/n8n-manager instance create
npx --yes @n8n-as-code/n8n-manager instance start <id>
npx --yes @n8n-as-code/n8n-manager instance listManaged local instance with public tunnel:
npx --yes @n8n-as-code/n8n-manager instance create
npx --yes @n8n-as-code/n8n-manager instance start <id>
npx --yes @n8n-as-code/n8n-manager tunnel start <id>Instance and tunnel operations are per managed local instance:
npx --yes @n8n-as-code/n8n-manager instance start <id>
npx --yes @n8n-as-code/n8n-manager instance stop <id>
npx --yes @n8n-as-code/n8n-manager instance remove <id>
npx --yes @n8n-as-code/n8n-manager tunnel start <id>
npx --yes @n8n-as-code/n8n-manager tunnel stop <id>list to inspect workflow IDs, file paths, and sync status.npx --yes n8nac list
npx --yes n8nac pull <workflowId>
npx --yes n8nac push <path-to-workflow.workflow.ts> --verifypush requires the full workflow file path, either absolute or context-root-relative. Do not pass a bare filename.workflowsPath returned by env status --json, then confirm it with npx --yes n8nac list --local.pull and conflict resolution operate on a single workflow ID.list is the lightweight command that covers all workflows at once.If push or pull reports a conflict, stop and inspect the conflict. Use explicit resolution commands only after choosing the intended direction:
npx --yes n8nac resolve <workflowId> --mode keep-current
npx --yes n8nac resolve <workflowId> --mode keep-incomingkeep-current force-pushes the local version.keep-incoming force-pulls the remote version.Never guess n8n node parameters.
npx --yes n8nac skills examples search "<workflow pattern>"
npx --yes n8nac skills search "<node or capability>"
npx --yes n8nac skills node-info <nodeName>
npx --yes n8nac skills validate <workflow.workflow.ts>type and valid typeVersion values from node-info.typeVersion returned by schema output.node-info output before writing values.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 npx --yes n8nac, bundled knowledge, .workflow.ts, Git, or the sync discipline.
Use this routing policy:
npx --yes n8nac for code-first workflow authoring, validation, pull, push, credentials, execution history, and presentation. Use npx --yes n8nac skills as the bundled offline knowledge default.npx --yes n8nac 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.npx --yes n8nac native-mcp status --include-tools --json before relying on native tools.npx --yes n8nac list, fetch, verify, or bundled skills as the primary source for those live-audit facts when native MCP read-only tools are available.N8NAC_NATIVE_MCP_ALLOW_REMOTE=1 is explicitly set.includeData=true unless the user explicitly needs payload data and N8NAC_NATIVE_MCP_ALLOW_EXECUTION_DATA=1 is set.npx --yes n8nac test when the execution strategy is to exercise the real webhook, chat, or form trigger contract.npx --yes n8nac test, such as workflow ID execution, non-webhook workflow testing, native pin-data test preparation, or direct execution diagnostics.npx --yes n8nac test; do not run it just because the tool exists.npx --yes n8nac pull <workflowId> so the .workflow.ts file and Git remain the source of truth.Use-case routing examples:
npx --yes n8nac commands and .workflow.ts files.npx --yes n8nac skills commands first.npx --yes n8nac 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.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.
Native MCP assist is a complementary knowledge, live-state, and runtime enrichment path, not the primary authoring or sync path.
Use these commands instead of guessing:
npx --yes n8nac skills search "<node or capability>"
npx --yes n8nac skills node-info <nodeName>
npx --yes n8nac skills node-schema <nodeName>
npx --yes n8nac skills docs "<topic>"
npx --yes n8nac skills guides "<topic>"
npx --yes n8nac skills examples search "<workflow pattern>"
npx --yes n8nac skills examples info <id>
npx --yes n8nac skills examples download <id>examples search when the user asks for a common automation pattern.npx --yes n8nac <subcommand> --help; do not invent flags.@n8n-as-code/transformer.source.out(0).to(target.in(0))..uses(), never .out().to().ai_tool and ai_document connections are arrays: ai_tool: [this.Tool.output].ai_languageModel: this.Model.output.node-info for connection-dependent boolean flags before declaring .uses() connections.Every .workflow.ts file starts with a <workflow-map> block. Read that map first, locate the property name you need, then read only the relevant class section.
import { workflow, node, links } from '@n8n-as-code/transformer';
@workflow({
name: 'Workflow Name',
active: false
})
export class MyWorkflow {
@node({
name: 'Descriptive Name',
type: '/* exact type from node-info */',
version: 4,
position: [250, 300]
})
MyNode = {
/* parameters from node-info */
};
@node({
name: 'Next Node',
type: '/* exact type from node-info */',
version: 3,
position: [520, 300]
})
NextNode = {};
@links()
defineRouting() {
this.MyNode.out(0).to(this.NextNode.in(0));
}
}{{ $json.fieldName }}.{{ $('Node Name').item.json.field }}.$node["Name"].json.field unless you are preserving an existing workflow and have a reason.value1 is the expression being evaluated and value2 is the literal comparison value.Get Customers, Send Slack Alert, or Normalize Payload.Node1, HTTP Request, or Code when a more specific name is available.Use the <workflow-map> block as the index before loading large workflow files.
// <workflow-map>
// Workflow : My Workflow
// Nodes : 12 | Connections: 14
//
// NODE INDEX
// Property name Node type (short) Flags
// ScheduleTrigger scheduleTrigger
// AgentGenerateApplication agent [AI] [creds]
// OpenaiChatModel lmChatOpenAi [creds] [ai_languageModel]
// Memory memoryBufferWindow [ai_memory]
// GithubCheckBranchRef httpRequest [onError->out(1)]
//
// ROUTING MAP
// ScheduleTrigger
// -> Configuration
// -> BuildProfileSources -> LoopOverProfileSources
//
// AI CONNECTIONS
// AgentGenerateApplication.uses({ ai_languageModel: OpenaiChatModel, ai_memory: Memory })
// </workflow-map>Navigation rule:
<workflow-map> first.AI sub-nodes are not regular data-flow nodes.
@links()
defineRouting() {
this.ChatTrigger.out(0).to(this.AiAgent.in(0));
this.AiAgent.uses({
ai_languageModel: this.OpenaiModel.output,
ai_memory: this.Memory.output,
ai_outputParser: this.OutputParser.output,
ai_tool: [this.SearchTool.output],
});
}.uses() for language models, memory, tools, parsers, embeddings, vector stores, retrievers, and other AI sub-nodes..out().to().ai_tool and ai_document must be arrays.node-info before declaring .uses()..out().to().ai_tool: this.Tool.output instead of ai_tool: [this.Tool.output].value1 and value2.formFieldsUi.fieldItems when the current schema expects formFields: { values: [...] }.push.After pushing:
npx --yes n8nac verify <workflowId>
npx --yes n8nac test-plan <workflowId> --jsonFor webhook, chat, or form workflows, prefer the production test sequence:
npx --yes n8nac workflow activate <workflowId>
npx --yes n8nac test <workflowId> --prodnpx --yes n8nac workflow present is the standard way to show a workflow to the user. It is v4-environment aware and part of the workflow authoring loop.
Run it whenever one of these is true:
npx --yes n8nac workflow present <workflowId> --jsonRules:
url returned by workflow present --json as the user-facing URL.npx --yes n8nac list first and select the matching workflow.npx --yes @n8n-as-code/n8n-manager presentWorkflowResult; it is a legacy runtime command and is not workspace-environment aware.workflow present fails, report the backend diagnostic and then provide the best direct n8n URL only as a fallback.For webhook, chat, or form workflows:
test-plan to inspect trigger type, endpoint, and suggested payload.--prod by default.npx --yes n8nac push <path-to-workflow.workflow.ts> --verify
npx --yes n8nac test-plan <workflowId> --json
npx --yes n8nac workflow activate <workflowId>
npx --yes n8nac test <workflowId> --prodUse bare npx --yes n8nac test <workflowId> only when a test URL was intentionally armed in the n8n editor.
For GET/HEAD webhooks that read from $json.query, prefer:
npx --yes n8nac test <workflowId> --query '{"key":"value"}' --prodIf a webhook returns success but the workflow behavior is wrong, inspect executions instead of guessing:
npx --yes n8nac execution list --workflow-id <workflowId> --limit 5 --json
npx --yes n8nac execution get <executionId> --include-data --jsonWhen a workflow is blocked by missing credentials, resolve the credential gap without rewriting unrelated workflow logic.
npx --yes n8nac workflow credential-required <workflowId> --json
npx --yes n8nac credential schema <type>
npx --yes n8nac credential list --json
npx --yes n8nac credential create --type <type> --name <name> --file cred.json --json
npx --yes n8nac workflow activate <workflowId>workflow credential-required exits non-zero when at least one credential is missing. Treat that as a signal to act, not as a workflow-code failure.credential schema to discover required fields.--file for credential creation. Do not pass secrets inline in shell arguments.For most workflow tasks:
env status --json.workflowsPath from the backend response.list..workflow.ts file.--verify.npx --yes n8nac workflow present <workflowId> --json.npx --yes n8nac workflow present <workflowId> --json instead of composing a URL manually.n8nac env ... for workspace environments and n8n-manager only for managed local instances.878d54d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.