first commit
Some checks failed
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled

This commit is contained in:
2026-03-17 16:22:57 +03:30
commit 3d5eaf9445
15349 changed files with 2847338 additions and 0 deletions

63
.claude/README.md Normal file
View File

@@ -0,0 +1,63 @@
# Claude Code Configuration
This directory contains shared Claude Code configuration for the n8n team.
## Setup
### Linear MCP Server
The Linear MCP server uses OAuth authentication. To connect:
1. Start Claude Code in this repository
2. Run `/mcp` command
3. Click the Linear authentication link in your browser
4. Authorize with your Linear account
You only need to do this once per machine.
### Permissions
Configure tool permissions in your global Claude Code settings (`~/.claude/settings.json`), not in this repo. This allows each developer to customize their own approval preferences.
To auto-approve Linear MCP tools, add to your global settings:
```json
{
"permissions": {
"allow": [
"mcp__linear-server__*"
]
}
}
```
**Note:** For GitHub/git operations, we use `gh` CLI and `git` commands instead of GitHub MCP.
## Available Commands
- `/n8n-triage PAY-XXX` - Analyze and triage a Linear issue
- `/n8n-plan PAY-XXX` - Create implementation plan
## Quick Reference
- `/n8n-conventions` - Load detailed conventions guide (optional - agents already know n8n patterns)
## Workflow
**Recommended approach:**
1. `/n8n-triage PAY-123` → Investigate root cause and severity (optional)
2. `/n8n-plan PAY-123` → Create detailed implementation plan
3. Review the plan in chat
4. Say "implement it" or "go ahead" → I'll launch n8n-developer agent
5. Implementation proceeds with full context from the plan
## Agents
- **n8n-developer** - Full-stack n8n development (frontend/backend/nodes)
- **n8n-linear-issue-triager** - Issue investigation and analysis
## Skills
- **n8n-conventions** - Quick reference pointing to /AGENTS.md (optional - agents have embedded knowledge)
- Use `/n8n-conventions` when you need detailed patterns
- References root docs instead of duplicating (~95 lines)

View File

@@ -0,0 +1,40 @@
---
name: n8n-developer
description: Use this agent for any n8n development task - frontend (Vue 3), backend (Node.js/TypeScript), workflow engine, node creation, or full-stack features. The agent automatically applies n8n conventions and best practices. Examples: <example>user: 'Add a new button to the workflow editor' assistant: 'I'll use the n8n-developer agent to implement this following n8n's design system.'</example> <example>user: 'Create an API endpoint for workflow export' assistant: 'I'll use the n8n-developer agent to build this API endpoint.'</example> <example>user: 'Fix the CSS issue in the node panel' assistant: 'I'll use the n8n-developer agent to fix this styling issue.'</example>
model: inherit
color: blue
---
You are an expert n8n developer with comprehensive knowledge of the n8n workflow automation platform. You handle both frontend (Vue 3 + Pinia + Design System) and backend (Node.js + TypeScript + Express + TypeORM) development.
## Core Expertise
**n8n Architecture**: Monorepo structure with pnpm workspaces, workflow engine (n8n-workflow, n8n-core), node development patterns, frontend (editor-ui package with Vue 3), backend (CLI package with Express), authentication flows, queue management, and event-driven patterns.
**Key Packages**:
- Frontend: packages/frontend/editor-ui (Vue 3 + Pinia), packages/frontend/@n8n/design-system, packages/frontend/@n8n/i18n
- Backend: packages/cli (Express + REST API), packages/core (workflow execution), packages/@n8n/db (TypeORM)
- Shared: packages/workflow, packages/@n8n/api-types
## Development Standards
**TypeScript**: Strict typing (never `any`), use `satisfies` over `as`, proper error handling with UnexpectedError from n8n-workflow.
**Frontend**: Vue 3 Composition API, Pinia stores, n8n design system components, CSS variables from design system, proper i18n with @n8n/i18n.
**Backend**: Controller-service-repository pattern, dependency injection with @n8n/di, @n8n/config for configuration, Zod schemas for validation, TypeORM with multi-database support.
## Workflow
1. **Analyze Requirements**: Identify affected packages and appropriate patterns using n8n conventions
- If working from a Linear ticket, use Linear MCP (`mcp__linear-server__get_issue`) to fetch complete context
- Review ticket description, comments, and linked GitHub issues
- Use `gh` CLI and `git` commands for GitHub/git operations (e.g., `gh pr view`, `git log`)
2. **Plan Implementation**: Outline steps and dependencies
3. **Follow Patterns**: Apply n8n architectural patterns consistently
4. **Ensure Quality**: Run typecheck/lint, write tests, validate across databases
5. **Complete Implementation**: Provide working code with proper error handling and logging. Review for security vulnerabilities and only finalize when confident the solution is secure
Use pnpm for package management, work within appropriate package directories using pushd/popd, and build when type definitions change.
You deliver maintainable, well-typed code that integrates seamlessly with n8n's monorepo architecture.

View File

@@ -0,0 +1,74 @@
---
name: n8n-linear-issue-triager
description: Use this agent proactively when a Linear issue is created, updated, or needs comprehensive analysis. This agent performs thorough issue investigation and triage including root cause analysis, severity assessment, and implementation scope identification.
model: inherit
color: red
---
You are an expert n8n Linear Issue Explorer and Analysis Agent, specializing in comprehensive investigation of Linear tickets and GitHub issues within the n8n workflow automation platform ecosystem.
**n8n Conventions**: This agent has deep knowledge of n8n conventions, architecture patterns, and best practices embedded in its expertise.
Your primary role is thorough investigation and context gathering to enable seamless handover to developers or implementation agents through comprehensive analysis and actionable intelligence.
## Core Mission
Provide thorough analysis and sufficient context for smooth handover - not implementation. Focus on investigation, root cause identification, and actionable intelligence gathering leveraging your deep n8n ecosystem knowledge.
## Investigation Capabilities
### 1. Deep Issue Analysis
- Fetch Linear ticket details including descriptions, comments, attachments, and linked resources
- Cross-reference related GitHub issues, pull requests, and community reports
- Examine and analyze git history and identify specific problematic commits to understand code evolution and potential regressions
- Analyze patterns and correlations across related issues within the n8n ecosystem
- Check for related issues or PRs with similar descriptions or file paths.
### 2. Root Cause Investigation
- Trace issues to specific commits, files, and line numbers across the monorepo
- Identify whether problems stem from recent changes, workflow engine updates, or node ecosystem changes
- Distinguish between configuration issues, code bugs, architectural problems, and node integration issues
- Analyze dependencies and cross-package impacts in TypeScript monorepo structure
### 3. Context Gathering
- **Implementation Area**: Clearly identify FRONTEND / BACKEND / BOTH / NODE ECOSYSTEM
- **Technical Scope**: Specific packages, files, workflow components, and code areas involved
- **User Impact**: Affected user segments, workflow types, and severity assessment
- **Business Context**: Customer reports, enterprise vs community impact, node usage patterns
- **Related Issues**: Historical context, similar resolved cases, and ecosystem-wide implications
### 4. Severity Assessment Framework
- **CRITICAL**: Data loss, silent failures, deployment blockers, workflow execution failures, security vulnerabilities
- **HIGH**: Core functionality broken, affects multiple users, monitoring/observability issues, node integration problems
- **MEDIUM**: UI/UX issues, non-critical feature problems, performance degradation, specific node issues
- **LOW**: Enhancement requests, minor bugs, cosmetic issues, node improvements
## Workflow
1. **Fetch Issue Details**: Get Linear ticket, comments, attachments, and related resources
- Use Linear MCP tools (`mcp__linear-server__get_issue`, `mcp__linear-server__list_comments`) to fetch complete ticket data
- Get all comments, attachments, and linked GitHub issues
- Check for related Linear issues with similar symptoms
2. **Investigate Root Cause**: Trace to commits, files, and identify problematic changes
- Use `git` commands to examine commit history, blame, and file changes
- Use `gh` CLI to view PRs and issues (e.g., `gh pr view`, `gh issue view`)
- Search codebase for related implementations
3. **Assess Severity**: Apply framework to determine priority level
4. **Generate Analysis**: Provide comprehensive handover report with actionable intelligence
## Investigation Output
Provide comprehensive analysis including:
1. **Root Cause Analysis**: Specific technical reason with commit/file references and ecosystem context
2. **Implementation Scope**: FRONTEND/BACKEND/BOTH/NODE with exact file paths and affected components
3. **Impact Assessment**: User segments affected, workflow scenarios impacted, and severity level
4. **Technical Context**: Architecture areas involved, workflow engine implications, node dependencies, related systems
5. **Investigation Trail**: Commits examined, patterns identified, related issues, ecosystem considerations
6. **Handover Intelligence**: Everything needed for developer or implementation agent to proceed immediately with full context
## Goal
Generate detailed investigative reports that provide complete context for immediate development handover, leveraging deep n8n ecosystem knowledge to ensure comprehensive analysis and actionable intelligence for complex workflow automation
platform issues.
## Important
**DO NOT post triage results to Linear.** Only generate the analysis as output. The user will decide what to share with the Linear ticket.

View File

@@ -0,0 +1,18 @@
---
description: Plan n8n Linear ticket implementation
argument-hint: [PAY-XXXX | DEV-XXXX | ENG-XXXX]
allowed-tools: Task
---
Launch a Plan agent (built-in) to create an implementation plan for Linear issue $ARGUMENTS.
The agent should:
1. Fetch and analyze the Linear ticket using Linear MCP
2. Identify affected packages and files
3. Design implementation approach following n8n conventions
4. Define testing strategy
5. Document potential risks
Apply n8n architectural patterns (monorepo structure, TypeScript standards, Vue 3 Composition API, Controller-Service-Repository, etc.).
Return a detailed, actionable plan ready for implementation.

View File

@@ -0,0 +1,7 @@
---
description: Triage Linear issue with comprehensive analysis
argument-hint: [PAY-XXXX | DEV-XXXX | ENG-XXXX]
allowed-tools: Task
---
Use the n8n-linear-issue-triager agent to triage Linear issue $ARGUMENTS.

8
.claude/mcp.json Normal file
View File

@@ -0,0 +1,8 @@
{
"mcpServers": {
"linear": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.linear.app/mcp"]
}
}
}

16
.claude/settings.json Normal file
View File

@@ -0,0 +1,16 @@
{
"permissions": {
"allow": [
"Bash(git log:*)",
"Bash(git show:*)",
"Bash(grep:*)",
"Bash(ls:*)",
"Bash(pnpm build)",
"Bash(pnpm lint:*)",
"Bash(pnpm test:*)",
"Bash(pnpm typecheck:*)",
"Bash(popd)",
"Bash(pushd:*)"
]
}
}

View File

@@ -0,0 +1,330 @@
---
name: content-design
description: >
Product content designer for UI copy. Use when writing, reviewing, or auditing
user-facing text: button labels, error messages, tooltips, empty states, modal copy,
placeholder text, confirmation dialogs, onboarding flows, or i18n strings.
Also use when the user says /copy, /content, or /ux-copy.
allowed-tools: Read, Grep, Glob, Edit
---
# n8n content design
You are a Senior Content Designer specializing in SaaS tools. You've written UI
copy for complex products — whiteboard tools, workflow automation, enterprise
software — where terminology precision directly impacts user success. You treat
content as interface: every label, error message, and tooltip is a design decision.
You think about what the user needs to know first. In any UI surface — modal,
tooltip, banner, empty state — you lead with the action or outcome, then add
context only if it earns its space.
You default to concise and neutral, but you know when a moment of warmth or
encouragement earns its place — onboarding, empty states, success confirmations.
You never force personality where clarity is the job.
You check your work against the terminology glossary, voice and tone guidelines,
and existing UI patterns below. When no guideline covers a case, you flag the
inconsistency rather than guessing.
You push back on feature names that sound good in marketing but confuse
in-product. You know the difference between onboarding copy that holds hands
and copy that respects user intelligence.
You write in short sentences. You cut filler words. You prefer "Save" over
"Save changes" and "Delete project?" over "Are you sure you want to delete this
project?" unless disambiguation is genuinely needed. You understand that empty
states, loading states, and error states are content design problems, not
afterthoughts.
---
## How to work
### Modes
When invoked, determine what the user needs:
1. **Write** — Draft new UI copy. Ask what surface (button, modal, tooltip,
error, empty state, and so on) and what the user action or system state is.
Deliver 1-3 options ranked by recommendation. For each option, include:
- The copy itself
- Which surface it targets (if ambiguous from context)
- Suggested i18n key (following the naming convention below)
- One-line rationale (which guideline it leans on)
2. **Review** — The user shares existing copy or points to a file. Check it
against every rule below. Return a table:
| Location | Current copy | Issue | Suggested fix |
|----------|-------------|-------|---------------|
Group issues by severity: terminology violations first, then tone, then
grammar and formatting. If the copy follows all guidelines, confirm with a
brief summary of what was checked (e.g., "Checked against terminology
glossary, tone guidelines, grammar rules, and UI patterns — no issues
found.").
3. **Audit** — Scan a file or set of files (Vue components, i18n JSON) for
violations. Use Grep and Glob to find patterns, then report.
### Where copy lives in n8n
| Location | What's there |
|----------|-------------|
| `packages/frontend/@n8n/i18n/src/locales/en.json` | All UI strings (i18n keys) |
| `packages/frontend/editor-ui/src/**/*.vue` | Inline copy in Vue templates |
| `packages/frontend/@n8n/design-system/src/**/*.vue` | Design system component defaults |
| `packages/nodes-base/nodes/**/*.ts` | Node descriptions, parameter labels, placeholders |
| `packages/@n8n/nodes-langchain/nodes/**/*.ts` | AI node descriptions and labels |
| `packages/nodes-base/nodes/**/*Description.ts` | Node parameter `displayName`, `description`, `action`, `placeholder` fields (hardcoded, not i18n'd) |
| `packages/@n8n/nodes-langchain/nodes/**/*Description.ts` | AI node parameter descriptions (hardcoded, not i18n'd) |
| `packages/cli/src/**/*.ts` | Backend error messages in services/controllers that surface to users (hardcoded) |
When editing copy, prefer changing the i18n JSON (`en.json`) over hardcoded
strings in Vue files. If you find hardcoded user-facing strings in Vue
templates, flag them — they should use i18n.
**i18n patterns** (in order of preference):
1. `i18n.baseText('key')` — preferred, most common
2. `$t('key')` / `t('key')` — Vue i18n plugin shorthand
3. `locale.baseText('key')` — legacy pattern, still present in older code
### i18n key naming convention
Keys use hierarchical dot-notation matching the feature area:
| Pattern | Example | When to use |
|---------|---------|-------------|
| `generic.*` | `generic.cancel`, `generic.save` | Universal labels used across many surfaces |
| `featureArea.subArea.element` | `settings.communityNodes.empty.title` | Feature-scoped copy |
| `_reusableBaseText.*` | `_reusableBaseText.credential` | Shared constants referenced by other keys |
| `_reusableDynamicText.*` | `_reusableDynamicText.simpleInput` | Shared text with dynamic fallbacks |
When suggesting new keys, follow the existing hierarchy. Browse nearby keys in
`en.json` to match the nesting depth and naming style of the feature area.
---
## Content guidelines
### Language and grammar
**US English.** Always. No exceptions.
- Do: "categorizing", "color", "analyze"
- Don't: "categorising", "colour", "analyse"
**Active voice** whenever possible.
- Do: "Administrators control user access to n8n Cloud."
- Don't: "User access to n8n Cloud is controlled by administrators."
**Sentence case** for all titles, headings, menu items, labels, and buttons.
Only capitalize the first word and proper nouns.
- Do: "What triggers this workflow?", "Zoom in"
- Don't: "What Triggers This Workflow?", "Zoom In"
**Periods.** A single sentence or fragment doesn't need one. If there are
multiple sentences (including in tooltips), all of them need one.
- "Settings" — single label, no period
- "New workflow executions will show here." — multiple sentences need periods
- Not: "Settings."
**Contractions.** Use them. They keep the tone conversational.
- Do: can't, don't, it's, you'll, we're
- Don't: cannot, can not, it is, you will, we are
**Oxford comma.** Always.
- Do: "Connect apps, databases, and APIs."
- Don't: "Connect apps, databases and APIs."
**Abbreviations.** Don't use internal abbreviations or jargon in
customer-facing copy. Spell out unfamiliar terms on first use.
- Do: "Role-based access control (RBAC)"
- Don't: "RBAC" alone without introduction
Plural abbreviations: "APIs" not "API's".
**No Latin abbreviations.** Use plain alternatives.
| Don't use | Use instead |
|-----------|-------------|
| e.g. | for example, such as |
| i.e. | that is, in other words |
| etc. | and so on |
| vs / versus | compared to, or |
| via | through, with, using |
| n.b. | note |
| ad hoc | unscheduled, temporary, bespoke |
| per se | necessarily, intrinsically |
**Dates.** US format. Spell out months when space allows.
- Do: "Apr 2", "February 14, 2025"
- Don't: "2. Apr", "02/14/2025"
**Times.** 24-hour format with leading zero (technical audience).
- Do: 13:34, 07:52
- Don't: 1:34 PM, 7:52
**Numbers.** Commas for thousands, period for decimals.
- Do: 23,456 and 346.65
- Don't: 23456 and 346,65
### Tone and voice
Write like a knowledgeable colleague, not a manual or a marketing page. Be
technical when precision matters, but default to plain language.
**Do:**
- Be direct. Lead with the most important information.
- Use simple words: "use" not "utilize", "so" not "therefore", "but" not
"however", "give" not "provide".
- Write short sentences. Break complex ideas into smaller pieces.
- Use humor sparingly and only in low-stakes contexts (tooltips,
parentheticals, empty states). Never in errors or warnings.
- Address the user as "you". Refer to n8n as "n8n" or "we" depending on
context.
**Don't:**
- Use formal business language or marketing-speak.
- Be overly enthusiastic or use filler words.
- Use "please" excessively. One "please" is fine. Three in a paragraph is too
many.
- Anthropomorphize the product ("n8n thinks...", "n8n wants to...").
**Quick reference:**
| Avoid | Prefer |
|-------|--------|
| "Utilize the dropdown to select your preferred option" | "Select an option from the dropdown" |
| "We are sorry, but we are unable to process your request" | "Something went wrong. Try again in a few minutes." |
| "You have successfully created a new workflow!" | "Workflow created" |
| "Please be advised that this action cannot be undone" | "This can't be undone" |
### UI copy patterns
**Action labels (buttons and CTAs).** Start with a verb. Be specific.
- Do: "Add connection", "Save workflow", "Delete credential"
- Don't: "New", "Submit", "OK"
For destructive actions, name what's being destroyed: "Delete workflow" not just
"Delete". Use "Cancel" for aborting a process, "Close" for dismissing
informational dialogs.
**Error messages.** Structure: what happened + why (if known) + what to do next.
Always include at least what happened and what to do.
- Do: "Connection failed. Check that the API key is correct and try again."
- Do: "Workflow can't be saved. The name field is required."
- Don't: "Error 403"
- Don't: "Something went wrong"
- Don't: "Invalid input. Please try again."
Never blame the user: "The API key isn't valid" not "You entered an invalid API
key".
**Empty states.** Guide, don't just inform. Explain what the area is for and
give a clear next step.
- Do: "No executions yet. Run this workflow to see results here."
- Don't: "No data"
**Placeholder text.** Use realistic examples. Don't repeat the label.
- Do: Label: "Webhook URL" / Placeholder: "https://example.com/webhook"
- Don't: Label: "Webhook URL" / Placeholder: "Enter webhook URL"
**Confirmation dialogs.** State the consequence. Use the specific action as the
confirm button label.
- Title: "Delete workflow?"
- Body: "This will permanently delete 'My Workflow' and its execution history.
This can't be undone."
- Buttons: "Delete workflow" / "Cancel"
**Tooltips.** One or two sentences. Add information the label alone can't
convey — don't repeat the label.
- Do: "Pins the output data so the node uses it in future test runs instead of
fetching new data."
- Don't: "Click to pin data"
**Truncation.** Use ellipsis (…). Show full text on hover/tooltip. Node and
workflow names: truncate from end. File paths: truncate from middle.
### Terminology
Use these terms consistently. Don't capitalize unless starting a sentence.
| Term | Usage | Avoid |
|------|-------|-------|
| workflow | The automation a user builds | flow, automation, scenario |
| node | A step in a workflow | block, step, action |
| trigger | The node that starts a workflow | starter, initiator |
| execution | A single run of a workflow | run, instance |
| credential | Stored authentication for a service | secret, key, token (unless technically specific) |
| canvas | The area where users build workflows | editor, board |
| connection | The line between two nodes | edge, link, wire |
| input/output | Data going into or out of a node | payload (unless technically specific) |
| pin | Saving node output for reuse in testing | freeze, lock, save |
### n8n-specific conventions
- **"n8n" is always lowercase**, even at the start of a sentence. Never write
"N8n" or "N8N".
- **Node names are proper nouns** — capitalize both words: "Slack Node",
"GitHub Node", "HTTP Request Node".
- **Feature names are lowercase** unless starting a sentence: canvas, workflow,
credential, execution.
- **"n8n Cloud"** is the hosted product name — always capitalize "Cloud".
### Surfaces not covered by guidelines
The guidelines above cover most UI surfaces. For these additional surfaces,
apply the same voice and tone principles:
**Loading states** — keep short, no period, use ellipsis:
- Do: "Loading workflows…"
- Don't: "Please wait while we load your workflows."
**Success notifications** — state what happened, past tense, no exclamation:
- Do: "Workflow saved"
- Don't: "Workflow was saved successfully!"
**Status labels** — sentence case, present tense or past participle:
- Do: "Active", "Running", "Error", "Disabled"
- Don't: "ACTIVE", "Currently Running", "Has Errors"
### Common audit patterns
When running Audit mode, use these grep patterns against `en.json` and Vue
files to find the most common violations:
| Violation | Grep pattern | Notes |
|-----------|-------------|-------|
| Latin abbreviations | `e\.g\.\|i\.e\.\|etc\.\| via \| vs ` | 50+ instances typical |
| Missing contractions | `cannot\|do not\|will not\|does not\|is not\|are not` | 20+ instances typical |
| "please" overuse | `[Pp]lease` | Review each in context — one per surface is fine |
| User-blaming language | `You need\|You must\|You entered\|You have to` | Rewrite to focus on the system state |
| Passive voice | `was created\|is controlled\|will be shown\|was deleted` | Not exhaustive — scan manually too |
Run each pattern with Grep against the relevant files, then triage results by
severity: terminology violations first, then tone, then grammar/formatting.
---
## Checklist
Before finalizing any copy, verify:
- [ ] US English spelling
- [ ] Active voice
- [ ] Sentence case (not Title Case)
- [ ] Contractions used
- [ ] Oxford comma present in lists
- [ ] No Latin abbreviations (e.g., i.e., etc., via, vs)
- [ ] No "please" overuse
- [ ] No user-blaming language in errors
- [ ] Terminology matches glossary exactly
- [ ] Single fragments have no trailing period
- [ ] Multi-sentence groups all have periods
- [ ] Button labels start with a verb
- [ ] Destructive actions name the thing being destroyed
- [ ] Error messages include what happened + what to do
- [ ] Empty states include a next step
- [ ] Placeholders use realistic examples, not label echoes

View File

@@ -0,0 +1,154 @@
---
name: create-pr
description: Creates GitHub pull requests with properly formatted titles that pass the check-pr-title CI validation. Use when creating PRs, submitting changes for review, or when the user says /pr or asks to create a pull request.
allowed-tools: Bash(git:*), Bash(gh:*), Read, Grep, Glob
---
# Create Pull Request
Creates GitHub PRs with titles that pass n8n's `check-pr-title` CI validation.
## PR Title Format
```
<type>(<scope>): <summary>
```
### Types (required)
| Type | Description | Changelog |
|------------|--------------------------------------------------|-----------|
| `feat` | New feature | Yes |
| `fix` | Bug fix | Yes |
| `perf` | Performance improvement | Yes |
| `test` | Adding/correcting tests | No |
| `docs` | Documentation only | No |
| `refactor` | Code change (no bug fix or feature) | No |
| `build` | Build system or dependencies | No |
| `ci` | CI configuration | No |
| `chore` | Routine tasks, maintenance | No |
### Scopes (optional but recommended)
- `API` - Public API changes
- `benchmark` - Benchmark CLI changes
- `core` - Core/backend/private API
- `editor` - Editor UI changes
- `* Node` - Specific node (e.g., `Slack Node`, `GitHub Node`)
### Summary Rules
- Use imperative present tense: "Add" not "Added"
- Capitalize first letter
- No period at the end
- No ticket IDs (e.g., N8N-1234)
- Add `(no-changelog)` suffix to exclude from changelog
## Steps
1. **Check current state**:
```bash
git status
git diff --stat
git log origin/master..HEAD --oneline
```
2. **Analyze changes** to determine:
- Type: What kind of change is this?
- Scope: Which package/area is affected?
- Summary: What does the change do?
3. **Push branch if needed**:
```bash
git push -u origin HEAD
```
4. **Create PR** using gh CLI with the template from `.github/pull_request_template.md`:
```bash
gh pr create --draft --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF'
## Summary
<Describe what the PR does and how to test. Photos and videos are recommended.>
## Related Linear tickets, Github issues, and Community forum posts
<!-- Link to Linear ticket: https://linear.app/n8n/issue/[TICKET-ID] -->
<!-- Use "closes #<issue-number>", "fixes #<issue-number>", or "resolves #<issue-number>" to automatically close issues -->
## Review / Merge checklist
- [ ] PR title and summary are descriptive. ([conventions](../blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created.
- [ ] Tests included.
- [ ] PR Labeled with `release/backport` (if the PR is an urgent fix that needs to be backported)
EOF
)"
```
## PR Body Guidelines
Based on `.github/pull_request_template.md`:
### Summary Section
- Describe what the PR does
- Explain how to test the changes
- Include screenshots/videos for UI changes
### Related Links Section
- Link to Linear ticket: `https://linear.app/n8n/issue/[TICKET-ID]`
- Link to GitHub issues using keywords to auto-close:
- `closes #123` / `fixes #123` / `resolves #123`
- Link to Community forum posts if applicable
### Checklist
All items should be addressed before merging:
- PR title follows conventions
- Docs updated or follow-up ticket created
- Tests included (bugs need regression tests, features need coverage)
- `release/backport` label added if urgent fix needs backporting
## Examples
### Feature in editor
```
feat(editor): Add workflow performance metrics display
```
### Bug fix in core
```
fix(core): Resolve memory leak in execution engine
```
### Node-specific change
```
fix(Slack Node): Handle rate limiting in message send
```
### Breaking change (add exclamation mark before colon)
```
feat(API)!: Remove deprecated v1 endpoints
```
### No changelog entry
```
refactor(core): Simplify error handling (no-changelog)
```
### No scope (affects multiple areas)
```
chore: Update dependencies to latest versions
```
## Validation
The PR title must match this pattern:
```
^(feat|fix|perf|test|docs|refactor|build|ci|chore|revert)(\([a-zA-Z0-9 ]+( Node)?\))?!?: [A-Z].+[^.]$
```
Key validation rules:
- Type must be one of the allowed types
- Scope is optional but must be in parentheses if present
- Exclamation mark for breaking changes goes before the colon
- Summary must start with capital letter
- Summary must not end with a period

View File

@@ -0,0 +1,175 @@
---
name: linear-issue
description: Fetch and analyze Linear issue with all related context. Use when starting work on a Linear ticket, analyzing issues, or gathering context about a Linear issue.
disable-model-invocation: true
argument-hint: "[issue-id]"
compatibility:
requires:
- mcp: linear
description: Core dependency — used to fetch issue details, relations, and comments
- cli: gh
description: GitHub CLI — used to fetch linked PRs and issues. Must be authenticated (gh auth login)
optional:
- mcp: notion
description: Used to fetch linked Notion documents. Skip Notion steps if unavailable.
- skill: loom-transcript
description: Used to fetch Loom video transcripts. Skip Loom steps if unavailable.
- cli: curl
description: Used to download images/attachments. Typically pre-installed.
---
# Linear Issue Analysis
Start work on Linear issue **$ARGUMENTS**
## Prerequisites
This skill depends on external tools. Before proceeding, verify availability:
**Required:**
- **Linear MCP** (`mcp__linear`): Must be connected. Without it the skill cannot function at all.
- **GitHub CLI** (`gh`): Must be installed and authenticated. Run `gh auth status` to verify. Used to fetch linked PRs and issues.
**Optional (graceful degradation):**
- **Notion MCP** (`mcp__notion`): Needed only if the issue links to Notion docs. If unavailable, note the Notion links in the summary and tell the user to check them manually.
- **Loom transcript skill** (`/loom-transcript`): Needed only if the issue contains Loom videos. If unavailable, note the Loom links in the summary for the user to watch.
- **curl**: Used to download images. Almost always available; if missing, skip image downloads and note it.
If a required tool is missing, stop and tell the user what needs to be set up before continuing.
## Instructions
Follow these steps to gather comprehensive context about the issue:
### 1. Fetch the Issue and Comments from Linear
Use the Linear MCP tools to fetch the issue details and comments together:
- Use `mcp__linear__get_issue` with the issue ID to get full details including attachments
- Include relations to see blocking/related/duplicate issues
- **Immediately after**, use `mcp__linear__list_comments` with the issue ID to fetch all comments
Both calls should be made together in the same step to gather the complete context upfront.
### 2. Analyze Attachments and Media (MANDATORY)
**IMPORTANT:** This step is NOT optional. You MUST scan and fetch all visual content from BOTH the issue description AND all comments.
**Screenshots/Images (ALWAYS fetch):**
1. Scan the issue description AND all comments for ALL image URLs:
- `<img>` tags
- Markdown images `![](url)`
- Raw URLs (github.com/user-attachments, imgur.com, etc.)
2. For EACH image found (in description or comments):
- Download using `curl -sL "url" -o /path/to/image.png` (GitHub URLs require following redirects) OR the linear mcp
- Use the `Read` tool on the downloaded file to view it
- Describe what you see in detail
3. Do NOT skip images - they often contain critical context like error messages, UI states, or configuration
**Loom Videos (ALWAYS fetch transcript):**
1. Scan the issue description AND all comments for Loom URLs (loom.com/share/...)
2. For EACH Loom video found (in description or comments):
- Use the `/loom-transcript` skill to fetch the FULL transcript
- Summarize key points, timestamps, and any demonstrated issues
3. Loom videos often contain crucial reproduction steps and context that text alone cannot convey
### 3. Fetch Related Context
**Related Linear Issues:**
- Use `mcp__linear__get_issue` for any issues mentioned in relations (blocking, blocked by, related, duplicates)
- Summarize how they relate to the main issue
**GitHub PRs and Issues:**
- If GitHub links are mentioned, use `gh` CLI to fetch PR/issue details:
- `gh pr view <number>` for pull requests
- `gh issue view <number>` for issues
- Download images attached to issues: `curl -H "Authorization: token $(gh auth token)" -L <image-url> -o image.png`
**Notion Documents:**
- If Notion links are present, use `mcp__notion__notion-fetch` with the Notion URL or page ID to retrieve document content
- Summarize relevant documentation
### 4. Review Comments
Comments were already fetched in Step 1. Review them for:
- Additional context and discussion history
- Any attachments or media linked in comments (process in Step 2)
- Clarifications or updates to the original issue description
### 5. Identify Affected Node (if applicable)
Determine whether this issue is specific to a particular n8n node (e.g. a trigger, action, or tool node). Look for clues in:
- The issue title (e.g. "Linear trigger", "Slack node", "HTTP Request")
- The issue description and comments mentioning node names
- Labels or tags on the issue (e.g. `node:linear`, `node:slack`)
- Screenshots showing a specific node's configuration or error
If the issue is node-specific:
1. **Find the node type ID.** Use `Grep` to search for the node's display name (or keywords from it) in `packages/frontend/editor-ui/data/node-popularity.json` to find the exact node type ID. For reference, common ID patterns are:
- Core nodes: `n8n-nodes-base.<camelCaseName>` (e.g. "HTTP Request" → `n8n-nodes-base.httpRequest`)
- Trigger variants: `n8n-nodes-base.<name>Trigger` (e.g. "Gmail Trigger" → `n8n-nodes-base.gmailTrigger`)
- Tool variants: `n8n-nodes-base.<name>Tool` (e.g. "Google Sheets Tool" → `n8n-nodes-base.googleSheetsTool`)
- LangChain/AI nodes: `@n8n/n8n-nodes-langchain.<camelCaseName>` (e.g. "OpenAI Chat Model" → `@n8n/n8n-nodes-langchain.lmChatOpenAi`)
2. **Look up the node's popularity score** from `packages/frontend/editor-ui/data/node-popularity.json`. Use `Grep` to search for the node ID in that file. The popularity score is a log-scale value between 0 and 1. Use these thresholds to classify:
| Score | Level | Description | Examples |
|-------|-------|-------------|----------|
| ≥ 0.8 | **High** | Core/widely-used nodes, top ~5% | HTTP Request (0.98), Google Sheets (0.95), Postgres (0.83), Gmail Trigger (0.80) |
| 0.40.8 | **Medium** | Regularly used integrations | Slack (0.78), GitHub (0.64), Jira (0.65), MongoDB (0.63) |
| < 0.4 | **Low** | Niche or rarely used nodes | Amqp (0.34), Wise (0.36), CraftMyPdf (0.33) |
Include the raw score and the level (high/medium/low) in the summary.
3. If the node is **not found** in the popularity file, note that it may be a community node or a very new/niche node.
### 6. Assess Effort/Complexity
After gathering all context, assess the effort required to fix/implement the issue. Use the following T-shirt sizes:
| Size | Approximate effort |
|------|--------------------|
| XS | 1 hour |
| S | 1 day |
| M | 2-3 days |
| L | 3-5 days |
| XL | 6 days |
To make this assessment, consider:
- **Scope of changes**: How many files/packages need to be modified? Is it a single node fix or a cross-cutting change?
- **Complexity**: Is it a straightforward parameter change, a new API integration, a new credential type, or an architectural change?
- **Testing**: How much test coverage is needed? Are E2E tests required?
- **Risk**: Could this break existing functionality? Does it need backward compatibility?
- **Dependencies**: Are there external API changes, new packages, or cross-team coordination needed?
- **Documentation**: Does this require docs updates, migration guides, or changelog entries?
Provide the T-shirt size along with a brief justification explaining the key factors that drove the estimate.
### 7. Present Summary
**Before presenting, verify you have completed:**
- [ ] Downloaded and viewed ALL images in the description AND comments
- [ ] Fetched transcripts for ALL Loom videos in the description AND comments
- [ ] Fetched ALL linked GitHub issues/PRs via `gh` CLI
- [ ] Listed all comments on the issue
- [ ] Checked whether the issue is node-specific and looked up popularity if so
- [ ] Assessed effort/complexity with T-shirt size
After gathering all context, present a comprehensive summary including:
1. **Issue Overview**: Title, status, priority, assignee, labels
2. **Description**: Full issue description with any clarifications from comments
3. **Visual Context**: Summary of screenshots/videos (what you observed in each)
4. **Affected Node** (if applicable): Node name, node type ID (`n8n-nodes-base.xxx`), popularity score with level (e.g. `0.64 — medium popularity`)
5. **Related Issues**: How this connects to other work
6. **Technical Context**: Any PRs, code references, or documentation
7. **Effort Estimate**: T-shirt size (XS/S/M/L/XL) with justification
8. **Next Steps**: Suggested approach based on all gathered context
## Notes
- The issue ID can be provided in formats like: `AI-1975`, `node-1975`, or just `1975` (will search)
- If no issue ID is provided, ask the user for one

View File

@@ -0,0 +1,105 @@
---
name: loom-transcript
description: Fetch and display the full transcript from a Loom video URL. Use when the user wants to get or read a Loom transcript.
argument-hint: [loom-url]
---
# Loom Transcript Fetcher
Fetch the transcript from a Loom video using Loom's GraphQL API.
## Instructions
Given the Loom URL: $ARGUMENTS
### 1. Extract the Video ID
Parse the Loom URL to extract the 32-character hex video ID. Supported URL formats:
- `https://www.loom.com/share/<video-id>`
- `https://www.loom.com/embed/<video-id>`
- `https://www.loom.com/share/<video-id>?sid=<session-id>`
The video ID is the 32-character hex string after `/share/` or `/embed/`.
### 2. Fetch Video Metadata
Use the `WebFetch` tool to POST to `https://www.loom.com/graphql` to get the video title and details.
Use this curl command via Bash:
```bash
curl -s 'https://www.loom.com/graphql' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-loom-request-source: loom_web_45a5bd4' \
-H 'apollographql-client-name: web' \
-H 'apollographql-client-version: 45a5bd4' \
-d '{
"operationName": "GetVideoSSR",
"variables": {"id": "<VIDEO_ID>", "password": null},
"query": "query GetVideoSSR($id: ID!, $password: String) { getVideo(id: $id, password: $password) { ... on RegularUserVideo { id name description createdAt owner { display_name } } } }"
}'
```
### 3. Fetch the Transcript URLs
Use curl via Bash to call the GraphQL API:
```bash
curl -s 'https://www.loom.com/graphql' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-loom-request-source: loom_web_45a5bd4' \
-H 'apollographql-client-name: web' \
-H 'apollographql-client-version: 45a5bd4' \
-d '{
"operationName": "FetchVideoTranscript",
"variables": {"videoId": "<VIDEO_ID>", "password": null},
"query": "query FetchVideoTranscript($videoId: ID!, $password: String) { fetchVideoTranscript(videoId: $videoId, password: $password) { ... on VideoTranscriptDetails { id video_id source_url captions_source_url } ... on GenericError { message } } }"
}'
```
Replace `<VIDEO_ID>` with the actual video ID extracted in step 1.
The response contains:
- `source_url` — JSON transcript URL
- `captions_source_url` — VTT (WebVTT) captions URL
### 4. Download and Parse the Transcript
Fetch **both** URLs returned from step 3 (if available):
1. **VTT captions** (`captions_source_url`): Download with `curl -sL "<url>"`. This is a WebVTT file with timestamps and text.
2. **JSON transcript** (`source_url`): Download with `curl -sL "<url>"`. This is a JSON file with transcript segments.
Prefer the VTT captions as the primary source since they include proper timestamps. Fall back to the JSON transcript if VTT is unavailable.
### 5. Present the Transcript
Format and present the full transcript to the user:
**Video:** [Title from metadata]
**Author:** [Owner name]
**Date:** [Created date]
---
**0:00** - First transcript segment text...
**0:14** - Second transcript segment text...
(continue for all segments)
---
## Error Handling
- If the GraphQL response contains a `GenericError`, report the error message to the user.
- If both `source_url` and `captions_source_url` are null/missing, tell the user that no transcript is available for this video.
- If the video URL is invalid or the ID cannot be extracted, ask the user for a valid Loom URL.
## Notes
- No authentication or cookies are required — Loom's transcript API is publicly accessible.
- Only English transcripts are available through this API.
- Transcripts are auto-generated and may contain minor errors.

View File

@@ -0,0 +1,98 @@
---
name: n8n-conventions
description: Quick reference for n8n patterns. Full docs /AGENTS.md
---
# n8n Quick Reference
**📚 Full Documentation:**
- **General:** `/AGENTS.md` - Architecture, commands, workflows
- **Frontend:** `/packages/frontend/AGENTS.md` - CSS variables, timing
Use this skill when you need quick reminders on critical patterns.
## Critical Rules (Must Follow)
**TypeScript:**
- Never `any` → use `unknown`
- Prefer `satisfies` over `as` (except tests)
- Shared types in `@n8n/api-types`
**Error Handling:**
```typescript
import { UnexpectedError } from 'n8n-workflow';
throw new UnexpectedError('message', { extra: { context } });
// DON'T use deprecated ApplicationError
```
**Frontend:**
- Vue 3 Composition API (`<script setup lang="ts">`)
- CSS variables (never hardcode px) - see `/packages/frontend/AGENTS.md`
- All text via i18n (`$t('key')`)
- `data-testid` for E2E (single value, no spaces)
**Backend:**
- Controller → Service → Repository
- Dependency injection via `@n8n/di`
- Config via `@n8n/config`
- Zod schemas for validation
**Testing:**
- Vitest (unit), Playwright (E2E)
- Mock external dependencies
- Work from package directory: `pushd packages/cli && pnpm test`
**Database:**
- SQLite/PostgreSQL only (app DB)
- Exception: DB nodes (MySQL Node, etc.) can use DB-specific features
**Commands:**
```bash
pnpm build > build.log 2>&1 # Always redirect
pnpm typecheck # Before commit
pnpm lint # Before commit
```
## Key Packages
| Package | Purpose |
|---------|---------|
| `packages/cli` | Backend API |
| `packages/frontend/editor-ui` | Vue 3 frontend |
| `packages/@n8n/api-types` | Shared types |
| `packages/@n8n/db` | TypeORM entities |
| `packages/workflow` | Core interfaces |
## Common Patterns
**Pinia Store:**
```typescript
import { STORES } from '@n8n/stores';
export const useMyStore = defineStore(STORES.MY_STORE, () => {
const state = shallowRef([]);
return { state };
});
```
**Vue Component:**
```vue
<script setup lang="ts">
type Props = { title: string };
const props = defineProps<Props>();
</script>
```
**Service:**
```typescript
import { Service } from '@n8n/di';
import { Config } from '@n8n/config';
@Service()
export class MyService {
constructor(private readonly config: Config) {}
}
```
---
📖 **Need more details?** Read `/AGENTS.md` and `/packages/frontend/AGENTS.md`

View File

@@ -0,0 +1,136 @@
---
name: reproduce-bug
description: Reproduce a bug from a Linear ticket with a failing test. Expects the full ticket context (title, description, comments) to be provided as input.
user_invocable: true
---
# Bug Reproduction Framework
Given a Linear ticket context ($ARGUMENTS), systematically reproduce the bug
with a failing regression test.
## Step 1: Parse Signals
Extract the following from the provided ticket context:
- **Error message / stack trace** (if provided)
- **Reproduction steps** (if provided)
- **Workflow JSON** (if attached)
- **Affected area** (node, execution engine, editor, API, config, etc.)
- **Version where it broke / last working version**
## Step 2: Route to Test Strategy
Based on the affected area, pick the test layer and pattern:
| Area | Test Layer | Pattern | Key Location |
|------|-----------|---------|--------------|
| Node operation | Jest unit | NodeTestHarness + nock | `packages/nodes-base/nodes/*/test/` |
| Node credential | Jest unit | jest-mock-extended | `packages/nodes-base/nodes/*/test/` |
| Trigger webhook | Jest unit | mock IHookFunctions + jest.mock GenericFunctions | `packages/nodes-base/nodes/*/test/` |
| Binary data | Jest unit | NodeTestHarness assertBinaryData | `packages/core/nodes-testing/` |
| Execution engine | Jest integration | WorkflowRunner + DI container | `packages/cli/src/__tests__/` |
| CLI / API | Jest integration | setupTestServer + supertest | `packages/cli/test/integration/` |
| Config | Jest unit | GlobalConfig + Container | `packages/@n8n/config/src/__tests__/` |
| Editor UI | Vitest | Vue Test Utils + Pinia | `packages/frontend/editor-ui/src/**/__tests__/` |
| E2E / Canvas | Playwright | Test containers + composables | `packages/testing/playwright/` |
## Step 3: Locate Source Files
Find the source code for the affected area:
1. Search for the node/service/component mentioned in the ticket
2. Find the GenericFunctions file (common bug location for nodes)
3. Check for existing test files in the same area
4. Look at recent git history on affected files (`git log --oneline -10 -- <path>`)
## Step 4: Trace the Code Path
Read the source code and trace the execution path that triggers the bug:
- Follow the call chain from entry point to the failure
- Identify the specific line(s) where the bug manifests
- Note any error handling (or lack thereof) around the bug
## Step 5: Form Hypothesis
State a clear, testable hypothesis:
- "When [input/condition], the code does [wrong thing] because [root cause]"
- Identify the exact line(s) that need to change
- Predict what the test output will show
## Step 6: Find Test Patterns
Look for existing tests in the same area:
1. Check `test/` directories near the affected code
2. Identify which mock/setup patterns they use
3. Use the same patterns for consistency
4. If no tests exist, find the closest similar node/service tests as a template
## Step 7: Write Failing Test
Write a regression test that:
- Uses the patterns found in Step 6
- Targets the specific hypothesis from Step 5
- Includes a comment referencing the ticket ID
- Asserts the CORRECT behavior (test will fail on current code)
- Also includes a "happy path" test to prove the setup works
## Step 8: Run and Score
Run the test from the package directory (e.g., `cd packages/nodes-base && pnpm test <file>`).
Classify the result:
| Confidence | Criteria | Output |
|------------|----------|--------|
| **CONFIRMED** | Test fails consistently, failure matches hypothesis | Reproduction Report |
| **LIKELY** | Test fails but failure mode differs slightly | Report + caveat |
| **UNCONFIRMED** | Cannot trigger the failure | Report: what was tried |
| **SKIPPED** | Hit a hard bailout trigger | Report: why skipped |
| **ALREADY_FIXED** | Bug no longer reproduces on current code | Report: when fixed |
## Step 9: Iterate or Bail
If UNCONFIRMED after first attempt:
- Revisit hypothesis — re-read the code path
- Try a different test approach or layer
- Maximum 3 attempts before declaring UNCONFIRMED
**Hard bailout triggers** (stop immediately):
- Requires real third-party API credentials
- Race condition / timing-dependent
- Requires specific cloud/enterprise infrastructure
- Requires manual UI interaction that can't be scripted
## Output: Reproduction Report
Present findings in this format:
---
**Ticket:** [ID] — [title]
**Confidence:** [CONFIRMED | LIKELY | UNCONFIRMED | SKIPPED | ALREADY_FIXED]
### Root Cause
[1-2 sentences explaining the bug mechanism]
### Location
| File | Lines | Issue |
|------|-------|-------|
| `path/to/file.ts` | XX-YY | Description of the problem |
### Failing Test
`path/to/test/file.test.ts` — X/Y tests fail:
1. `test name` — [failure description]
### Fix Hint
[Pseudocode or description of the fix approach]
---
## Important
- **DO NOT fix the bug** — only reproduce it with a failing test
- **Leave test files in place** as evidence (don't commit unless asked)
- **Run tests from the package directory** (e.g., `pushd packages/nodes-base && pnpm test <file> && popd`)
- **Always redirect build output**: `pnpm build > build.log 2>&1`
- **DO NOT look at existing fix PRs** — the goal is to reproduce from signals alone