Skip to content
Back to search

n8n-as-code

Give your AI agent n8n superpowers. 537 nodes with full schemas, 7,700+ templates, Git-like sync, and TypeScript workflows.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/etiennelescot--n8n-as-code/badge.svg)](/listings/etiennelescot--n8n-as-code)

HTML

<a href="/listings/etiennelescot--n8n-as-code"><img src="/api/listings/etiennelescot--n8n-as-code/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

VS Code / Cursor

1. Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code) or [Open VSX](https://open-vsx.org/extension/etienne-lescot/n8n-as-code). 2. Open a folder or `.code-workspace`. 3. Click on the extension icon then on the gear icon to configure your workspace. 4. Create or select an `n8n environment`. 5. Pull or create workflows with the integrated Agent Workbench or the agent of your choice.

The configuration UI uses the same model as the CLI: workspace environments are repository context, local managed instances are machine resources.

[VS Code / Cursor guide](https://n8nascode.dev/docs/usage/vscode-extension/)

Claude Code

/plugin marketplace add https://github.com/EtienneLescot/n8n-as-code
/plugin install n8n-as-code@n8nac-marketplace

Then ask Claude for the workflow you want. The `n8n-architect` skill handles workspace setup, n8n context, validation, and sync steps as needed.

[Claude setup docs](https://n8nascode.dev/docs/usage/claude-plugin/)

Generic Agent Skills

Install the skill from the repository skills directory:

https://github.com/EtienneLescot/n8n-as-code/tree/main/skills

Then ask your agent for the workflow you want. The skill gives it the n8n schemas, examples, validation rules, and workspace commands it needs to handle the rest.

If your agent asks for an explicit skill path, use `skills/n8n-architect`.

[Skills reference](https://n8nascode.dev/docs/usage/skills/)

CLI

Install first. `update-ai` then writes agent instructions that name the local binary directly; without an install they fall back to `npx`, which pays npm's own startup on every one of the tens of calls an agent makes per task.

Create a workspace environment for an existing n8n URL:

npm install n8nac
npx --yes n8nac env add Dev --base-url https://n8n.example.com --workflows-path workflows/dev
printf '%s' "$N8N_API_KEY" | npx --yes n8nac env auth set Dev --api-key-stdin
npx --yes n8nac env use Dev
npx --yes n8nac update-ai

Or attach a local managed instance:

npm install n8nac
n8n-manager instance list
npx --yes n8nac env add Local --managed-instance <id> --workflows-path workflows/local
npx --yes n8nac env use Local
npx --yes n8nac update-ai

Then sync workflows explicitly:

npx --yes n8nac list
npx --yes n8nac pull <workflow-id>
npx --yes n8nac push workflows/dev/my-workflow.workflow.ts --verify
npx --yes n8nac promote --from Dev --to Prod --dry-run

Use `promote` to move workflow source from one environment `workflowsPath` to another. Pass a workflow path for a single workflow, or omit it to promote every `*.workflow.ts` file in the source environment, including nested folders. Promotion rewrites target project metadata, remaps credentials and supported Execute Workflow references, records stable source-to-target bindings in `n8nac-promotion.json`, and pushes by default unless `--no-push` is set. `--dry-run` performs discovery for an accurate create/update plan, but does not write files, push, or update the promotion config.

[CLI guide](https://n8nascode.dev/docs/usage/cli/) · [n8n-manager guide](https://n8nascode.dev/docs/usage/n8n-manager/)

Prereleases

To test upcoming features before they hit the stable release, append `@next` to any CLI/npm command or switch to the pre-release channel in your editor:

- **CLI**: `npm install -g n8nac@next` or run on demand with `npx --yes n8nac@next <command>` - **VS Code / Cursor**: Click **"Switch to Pre-Release Version"** on the [Marketplace](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code) or run:

  code --install-extension etienne-lescot.n8n-as-code --pre-release

- **OpenClaw**: `openclaw plugins install @n8n-as-code/n8nac@next`

> **Note**: When testing prereleases, keep all entry points on the `@next` tag so that the extension, CLI, and agent skills remain aligned.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 39 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "n8nac-marketplace",
  3. "owner": {
  4. "name": "Etienne Lescot"
  5. },
  6. "metadata": {
  7. "description": "Community marketplace for n8n-as-code Claude Code plugin releases. The plugin name stays user-facing as n8n-as-code; n8nac is kept as the CLI alias.",
  8. "version": "2.4.1"
  9. },
  10. "plugins": [
  11. {
  12. "name": "n8n-as-code",
  13. "source": "./plugins/claude/n8n-as-code",
  14. "description": "Expert n8n workflow engineering skills for Claude Code. Uses n8n-manager, the n8nac CLI, and the n8n-as-code knowledge base to manage instances, search nodes, inspect schemas, and generate TypeScript workflows.",
  15. "version": "2.4.1",
  16. "author": {
  17. "name": "Etienne Lescot"
  18. },
  19. "homepage": "https://n8nascode.dev/docs/usage/claude-plugin/",
  20. "repository": "https://github.com/EtienneLescot/n8n-as-code",
  21. "license": "MIT",
  22. "category": "automation",
  23. "keywords": [
  24. "n8n",
  25. "workflow",
  26. "automation",
  27. "claude-code",
  28. "skill",
  29. "n8nac"
  30. ],
  31. "tags": [
  32. "n8n",
  33. "typescript-workflows",
  34. "gitops",
  35. "node-schemas"
  36. ]
  37. }
  38. ]
  39. }
README.md · README · 293 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. # <img src="res/logo.png" alt="n8n-as-code" width="40" height="40"> n8n-as-code
  3. ### The agentic toolkit for n8n.
  4. **VS Code / Cursor Agent · n8n Environments · n8n-manager · GitOps · AI Skills · TypeScript Workflows**
  5. <a href="https://trendshift.io/repositories/22772?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-22772" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/22772" alt="EtienneLescot%2Fn8n-as-code | Trendshift" width="250" height="55"/></a>
  6. <a href="https://trendshift.io/developers/12646?utm_source=developer-badge&amp;utm_medium=badge&amp;utm_campaign=badge-developer-12646" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/developers/12646" alt="EtienneLescot | Trendshift" width="250" height="55"/></a>
  7. [![CI](https://github.com/EtienneLescot/n8n-as-code/actions/workflows/ci.yml/badge.svg)](https://github.com/EtienneLescot/n8n-as-code/actions/workflows/ci.yml)
  8. [![Documentation](https://github.com/EtienneLescot/n8n-as-code/actions/workflows/docs.yml/badge.svg)](https://n8nascode.dev/)
  9. [![VS Code Marketplace](https://img.shields.io/visual-studio-marketplace/v/etienne-lescot.n8n-as-code?label=VS%20Code&logo=visualstudiocode)](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code)
  10. [![Open VSX](https://img.shields.io/open-vsx/v/etienne-lescot/n8n-as-code?label=Open%20VSX&logo=eclipseide)](https://open-vsx.org/extension/etienne-lescot/n8n-as-code)
  11. [![npm: cli](https://img.shields.io/npm/v/n8nac?label=cli&logo=npm)](https://www.npmjs.com/package/n8nac)
  12. [![npm: skills](https://img.shields.io/npm/v/@n8n-as-code/skills?label=skills&logo=npm)](https://www.npmjs.com/package/@n8n-as-code/skills)
  13. [![Claude Code](https://img.shields.io/badge/Claude%20Code-Beta%20%2F%20Pending%20Review-orange)](https://n8nascode.dev/docs/usage/claude-plugin/)
  14. [![X](https://img.shields.io/badge/X-@LescotEtienne-000000?logo=x&logoColor=white)](https://x.com/LescotEtienne)
  15. [![Sponsor](https://img.shields.io/github/sponsors/EtienneLescot?logo=githubsponsors&label=Sponsor)](https://github.com/sponsors/EtienneLescot)
  16. [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
  17. <br>
  18. <img src="res/n8n-as-code-intro.gif" alt="n8n-as-code intro" width="800">
  19. <br>
  20. **Build, edit, deploy, and debug n8n workflows from your editor with an agent that has live n8n context.**
  21. [**Documentation**](https://n8nascode.dev/) · [**Getting Started**](https://n8nascode.dev/docs/getting-started/) · [**VS Code Guide**](https://n8nascode.dev/docs/usage/vscode-extension/) · [**CLI Guide**](https://n8nascode.dev/docs/usage/cli/)
  22. </div>
  23. ---
  24. > **n8n version compatibility** — The node schema bundled with n8n-as-code is built against the latest stable release of n8n. Keep your n8n instance up to date for best generation and validation results.
  25. > **Independent project** — n8n-as-code is an independent community project and is not affiliated with, endorsed by, or sponsored by n8n.
  26. ---
  27. ## What n8n-as-code Gives You
  28. n8n-as-code turns a repository into a full n8n development workspace:
  29. | Capability | What it means |
  30. |---|---|
  31. | **Editor-native workflow work** | Browse, open, edit, validate, and sync n8n workflows from VS Code, Cursor, or the terminal. |
  32. | **Agent-ready context** | Generate grounded instructions, schemas, examples, and node knowledge so AI agents can work on real n8n workflows safely. |
  33. | **GitOps-style sync** | Pull and push workflows explicitly, review diffs, resolve conflicts, and keep workflow source in version control. |
  34. | **TypeScript workflow authoring** | Convert workflows into readable `.workflow.ts` files that are easier for people and agents to edit. |
  35. | **Live n8n operations** | Verify workflows, inspect credentials, run tests, activate workflows, and inspect executions against a selected n8n environment. |
  36. The repository stores workflow files, generated agent context, and workspace-safe configuration. Secrets and machine-local runtime state stay local.
  37. ## Quick Start
  38. ### VS Code / Cursor
  39. 1. Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code) or [Open VSX](https://open-vsx.org/extension/etienne-lescot/n8n-as-code).
  40. 2. Open a folder or `.code-workspace`.
  41. 3. Click on the extension icon then on the gear icon to configure your workspace.
  42. 4. Create or select an `n8n environment`.
  43. 5. Pull or create workflows with the integrated Agent Workbench or the agent of your choice.
  44. The configuration UI uses the same model as the CLI: workspace environments are repository context, local managed instances are machine resources.
  45. [VS Code / Cursor guide](https://n8nascode.dev/docs/usage/vscode-extension/)
  46. ### Claude Code
  47. ```text
  48. /plugin marketplace add https://github.com/EtienneLescot/n8n-as-code
  49. /plugin install n8n-as-code@n8nac-marketplace
  50. ```
  51. Then ask Claude for the workflow you want. The `n8n-architect` skill handles workspace setup, n8n context, validation, and sync steps as needed.
  52. [Claude setup docs](https://n8nascode.dev/docs/usage/claude-plugin/)
  53. ### Generic Agent Skills
  54. Install the skill from the repository skills directory:
  55. ```text
  56. https://github.com/EtienneLescot/n8n-as-code/tree/main/skills
  57. ```
  58. Then ask your agent for the workflow you want. The skill gives it the n8n schemas, examples, validation rules, and workspace commands it needs to handle the rest.
  59. If your agent asks for an explicit skill path, use `skills/n8n-architect`.
  60. [Skills reference](https://n8nascode.dev/docs/usage/skills/)
  61. ### CLI
  62. Install first. `update-ai` then writes agent instructions that name the local binary directly; without an install they fall back to `npx`, which pays npm's own startup on every one of the tens of calls an agent makes per task.
  63. Create a workspace environment for an existing n8n URL:
  64. ```bash
  65. npm install n8nac
  66. npx --yes n8nac env add Dev --base-url https://n8n.example.com --workflows-path workflows/dev
  67. printf '%s' "$N8N_API_KEY" | npx --yes n8nac env auth set Dev --api-key-stdin
  68. npx --yes n8nac env use Dev
  69. npx --yes n8nac update-ai
  70. ```
  71. Or attach a local managed instance:
  72. ```bash
  73. npm install n8nac
  74. n8n-manager instance list
  75. npx --yes n8nac env add Local --managed-instance <id> --workflows-path workflows/local
  76. npx --yes n8nac env use Local
  77. npx --yes n8nac update-ai
  78. ```
  79. Then sync workflows explicitly:
  80. ```bash
  81. npx --yes n8nac list
  82. npx --yes n8nac pull <workflow-id>
  83. npx --yes n8nac push workflows/dev/my-workflow.workflow.ts --verify
  84. npx --yes n8nac promote --from Dev --to Prod --dry-run
  85. ```
  86. Use `promote` to move workflow source from one environment `workflowsPath` to another. Pass a workflow path for a single workflow, or omit it to promote every `*.workflow.ts` file in the source environment, including nested folders. Promotion rewrites target project metadata, remaps credentials and supported Execute Workflow references, records stable source-to-target bindings in `n8nac-promotion.json`, and pushes by default unless `--no-push` is set. `--dry-run` performs discovery for an accurate create/update plan, but does not write files, push, or update the promotion config.
  87. [CLI guide](https://n8nascode.dev/docs/usage/cli/) · [n8n-manager guide](https://n8nascode.dev/docs/usage/n8n-manager/)
  88. ### Prereleases
  89. To test upcoming features before they hit the stable release, append `@next` to any CLI/npm command or switch to the pre-release channel in your editor:
  90. - **CLI**: `npm install -g n8nac@next` or run on demand with `npx --yes n8nac@next <command>`
  91. - **VS Code / Cursor**: Click **"Switch to Pre-Release Version"** on the [Marketplace](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code) or run:
  92. ```bash
  93. code --install-extension etienne-lescot.n8n-as-code --pre-release
  94. ```
  95. - **OpenClaw**: `openclaw plugins install @n8n-as-code/n8nac@next`
  96. > **Note**: When testing prereleases, keep all entry points on the `@next` tag so that the extension, CLI, and agent skills remain aligned.
  97. ## Command Groups
  98. ### Primary Usage: `n8nac env`
  99. ```bash
  100. n8nac env list
  101. n8nac env add Dev --base-url <url> --workflows-path workflows/dev
  102. n8nac env add Local --managed-instance <id> --workflows-path workflows/local
  103. n8nac env use Dev
  104. n8nac env auth set Dev --api-key-stdin
  105. n8nac env remove Dev
  106. ```
  107. Use `n8nac env` for everything that describes how this repository connects to n8n.
  108. ### Workspace Inspection: `n8nac workspace`
  109. ```bash
  110. n8nac workspace status --json
  111. n8nac env status --json
  112. ```
  113. Use `env status --json` as the source of truth for active environment readiness.
  114. ### Managed Local Instances: `n8n-manager`
  115. ```bash
  116. n8n-manager instance list
  117. n8n-manager instance create
  118. n8n-manager instance start <id>
  119. n8n-manager instance stop <id>
  120. n8n-manager instance remove <id>
  121. n8n-manager tunnel start <id>
  122. n8n-manager tunnel stop <id>
  123. ```
  124. Use `n8n-manager` only for local managed instances and machine-local operations. Do not use it as the workspace source of truth.
  125. ## GitOps For n8n
  126. ```bash
  127. n8nac env use Dev
  128. n8nac list
  129. n8nac pull <workflow-id>
  130. n8nac push workflows/dev/my-workflow.workflow.ts --verify
  131. n8nac resolve <workflow-id> --mode keep-current
  132. ```
  133. Sync is explicit. Nothing is pushed or pulled unless you ask for it.
  134. ## AI Skills
  135. The skills layer gives agents grounded n8n knowledge: node schemas, docs, examples, templates, validation rules, and safe workflow operations.
  136. ```bash
  137. npx --yes n8nac skills search "send slack message when google sheet is updated"
  138. npx --yes n8nac skills node-info slack
  139. npx --yes n8nac skills validate workflows/dev/my-workflow.workflow.ts
  140. ```
  141. ## TypeScript Workflows
  142. ```typescript
  143. import { workflow, node, links } from '@n8n-as-code/transformer';
  144. @workflow({ id: 'abc123', name: 'Slack Notifier', active: true })
  145. export class SlackNotifierWorkflow {
  146. @node()
  147. Trigger = {
  148. type: 'n8n-nodes-base.webhook',
  149. parameters: { path: '/notify', method: 'POST' },
  150. position: [250, 300],
  151. };
  152. @node()
  153. Slack = {
  154. type: 'n8n-nodes-base.slack',
  155. parameters: {
  156. resource: 'message',
  157. operation: 'post',
  158. channel: '#alerts',
  159. text: '={{ $json.message }}',
  160. },
  161. position: [450, 300],
  162. };
  163. @links([{ from: 'Trigger', to: 'Slack' }])
  164. connections = {};
  165. }
  166. ```
  167. ```bash
  168. n8nac convert workflow.json --format typescript
  169. n8nac convert-batch workflows/ --format typescript
  170. ```
  171. ## Packages
  172. | Package | What it does | Install |
  173. |:--------|:-------------|:--------|
  174. | **[VS Code Extension](packages/vscode-extension)** | Editor experience with sidebar, canvas, integrated Agent Workbench, and n8n environments | [Marketplace](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code) |
  175. | **[n8nac](packages/cli)** | CLI for workspace environments, sync, validation, AI context, and automation | `npx n8nac` |
  176. | **[Agent Skills](skills)** | Portable AI skills and embedded n8n knowledge for agents | [repo skills directory](https://github.com/EtienneLescot/n8n-as-code/tree/main/skills) |
  177. | **[@n8n-as-code/n8nac](plugins/openclaw/n8n-as-code)** | OpenClaw plugin with prompt context and portable skills | `openclaw plugins install @n8n-as-code/n8nac` |
  178. | **[@n8n-as-code/transformer](packages/transformer)** | JSON to TypeScript workflow converter and back | `npm i @n8n-as-code/transformer` |
  179. > **Prereleases**: Append `@next` to test any package or plugin before release (e.g. `npx n8nac@next`, `npm i @n8n-as-code/transformer@next`).
  180. ## How The Pieces Fit
  181. - **VS Code/Cursor extension**: visual workflow workspace and integrated Agent Workbench.
  182. - **`n8nac env`**: repository-level environment source of truth.
  183. - **`n8nac workspace`**: readiness and unified workspace migration.
  184. - **`n8n-manager`**: local managed instances, Docker lifecycle, tunnels, and machine-local secrets.
  185. - **Skills and MCP**: grounded n8n knowledge for agents.
  186. ## Sponsor
  187. If `n8n-as-code` saves you time, you can support its development through [GitHub Sponsors](https://github.com/sponsors/EtienneLescot).
  188. ## Contributing
  189. Contributions welcome.
  190. 1. Fork the project.
  191. 2. Create a branch: `git checkout -b feature/amazing`.
  192. 3. Run tests: `npm test`.
  193. 4. Open a Pull Request.
  194. ## License
  195. [MIT License](LICENSE) — free to use, modify, and distribute.
  196. Third-party community workflow metadata and downloadable workflow files remain subject to their respective upstream licenses.
  197. ## Acknowledgements
  198. `n8n-as-code` exists because [n8n](https://n8n.io/) exists.
  199. Thanks to the n8n team and community for building and maintaining the workflow automation platform this project builds on.
  200. <div align="center">
  201. **If n8n-as-code saves you time, give us a star.**
  202. [Star on GitHub](https://github.com/EtienneLescot/n8n-as-code) · [Documentation](https://n8nascode.dev/) · [Report a Bug](https://github.com/EtienneLescot/n8n-as-code/issues)
  203. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.