# n8n-as-code — AI Agent Superpowers for n8n > Give your AI agent n8n superpowers with 537 node schemas, 7,700+ templates, and TypeScript workflow definitions. Works with Claude Code, Cursor, VS Code, and OpenClaw. MIT license. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use **For Claude Code:** ``` /plugin marketplace add EtienneLescot/n8n-as-code /plugin install n8n-as-code@n8nac-marketplace ``` **For VS Code / Cursor:** Install "n8n-as-code" from the VS Code Marketplace, then open the n8n view and configure your instance connection. **For Terminal / CI:** ```bash npx --yes n8nac init ``` **For OpenClaw:** ``` openclaw plugins install @n8n-as-code/n8nac openclaw n8nac:setup ``` --- ## Intro n8n-as-code transforms AI coding agents into n8n workflow automation experts by embedding a complete knowledge base — 537 official node schemas, 10,209 properties, 7,702 community templates, and 1,243 documentation pages — directly into your development tools. With 630+ GitHub stars and MIT license, it enables AI agents to create, validate, and deploy n8n workflows without external API calls or hallucination. Your AI agent doesn't just read about n8n — it knows n8n with zero latency. Best for: developers using AI agents to build and manage n8n workflow automations. Works with: Claude Code, Cursor, VS Code, OpenClaw, CLI/CI pipelines. Setup time: under 2 minutes. --- ## n8n-as-code — Complete Feature Guide ### Knowledge Base Stats | Metric | Count | |--------|-------| | Official n8n nodes | 537 | | Node properties | 10,209 (100% coverage) | | Community templates | 7,702 | | Documentation pages | 1,243 (93% coverage) | | AI/LangChain nodes | 104 | ### Core Capabilities #### Schema-Aware Workflow Creation AI agents can create valid n8n workflows because they have access to complete node schemas. The agent knows every node, every property, every valid option — no guessing, no hallucination. #### TypeScript Workflow Definitions Write n8n workflows in TypeScript instead of JSON. Bidirectional conversion between JSON and TypeScript keeps workflows version-control friendly. ```typescript // Example: TypeScript workflow definition import { Workflow } from 'n8nac'; export default new Workflow({ name: 'Email Classification', nodes: [ Gmail.trigger({ pollTimes: '*/5 * * * *' }), OpenAI.classify({ model: 'gpt-4o', categories: ['urgent', 'info', 'spam'] }), Switch.route({ field: 'category' }), Slack.send({ channel: '#urgent', message: '{{ $json.subject }}' }), ], }); ``` #### GitOps Sync Engine 3-way merge conflict detection between local TypeScript, remote n8n JSON, and version history. Push and pull workflows like code. #### Template Discovery Search 7,700+ community templates with ~5ms FlexSearch lookup: ``` n8nac search "slack notification when github issue created" ``` #### Full Development Loop Agents can: 1. Search templates for inspiration 2. Create workflows in TypeScript 3. Validate against node schemas 4. Detect missing credentials 5. Provision credentials (asking users only for secrets) 6. Deploy to n8n instance 7. Activate and monitor execution ### Supported Platforms | Platform | Install Method | |----------|---------------| | Claude Code | Plugin marketplace | | VS Code / Cursor | VS Code Marketplace extension | | OpenClaw | openclaw plugins install | | Terminal / CI | npx n8nac init | ### FAQ **Q: What is n8n-as-code?** A: A toolkit that gives AI coding agents complete knowledge of n8n's 537 nodes and 7,700+ templates, enabling them to create, validate, and deploy n8n workflows without hallucination or external API calls. **Q: Is n8n-as-code free?** A: Yes, MIT license. You need a running n8n instance (self-hosted free, or n8n Cloud) for deployment. **Q: Does it work with Claude Code?** A: Yes. Install via `/plugin marketplace add EtienneLescot/n8n-as-code` and the agent gains full n8n knowledge. --- ## Source & Thanks > Created by [Etienne Lescot](https://github.com/EtienneLescot). Licensed under MIT. > > [n8n-as-code](https://github.com/EtienneLescot/n8n-as-code) — ⭐ 630+ Thank you to Etienne Lescot for building the definitive bridge between AI agents and n8n automation. --- ## 快速使用 **Claude Code:** ``` /plugin marketplace add EtienneLescot/n8n-as-code /plugin install n8n-as-code@n8nac-marketplace ``` **VS Code / Cursor:** 从 VS Code Marketplace 安装 "n8n-as-code" 扩展。 **终端 / CI:** ```bash npx --yes n8nac init ``` --- ## 简介 n8n-as-code 将 AI 编程 Agent 变成 n8n 工作流自动化专家,直接嵌入完整知识库——537 个官方节点 Schema、10,209 个属性、7,702 个社区模板和 1,243 页文档。拥有 630+ GitHub Star 和 MIT 许可证,让 AI Agent 无需外部 API 调用即可创建、验证和部署 n8n 工作流,零延迟,零幻觉。 适合人群:使用 AI Agent 构建和管理 n8n 工作流的开发者。 兼容工具:Claude Code、Cursor、VS Code、OpenClaw、CLI/CI。 安装时间:2 分钟以内。 --- ## 核心能力 - **537 个节点 Schema**:100% 属性覆盖,AI 知道每个节点的每个选项 - **7,702 个模板**:~5ms FlexSearch 快速查找 - **TypeScript 工作流**:双向 JSON ↔ TypeScript 转换 - **GitOps 同步**:3-way merge 冲突检测 - **完整开发循环**:搜索→创建→验证→部署→激活→监控 ### FAQ **Q: n8n-as-code 是什么?** A: 让 AI Agent 拥有 n8n 完整知识的工具包,537 个节点 + 7,700+ 模板,零幻觉创建工作流。 **Q: 免费吗?** A: MIT 开源免费,需要一个运行中的 n8n 实例。 --- ## 来源与感谢 > Created by [Etienne Lescot](https://github.com/EtienneLescot). Licensed under MIT. > > [n8n-as-code](https://github.com/EtienneLescot/n8n-as-code) — ⭐ 630+ --- Source: https://tokrepo.com/en/workflows/9de58e04-c1b8-401d-ab38-57553197bb55 Author: TokRepo精选