Index of every page on this site: llms.txt
All skills
n8n-io avatar

/reproduce-bug

@273d130 official
by n8n - Workflow Automationn8n-io/n8n211k stars
61,599
Run it yourself

Reproduce a bug from a Linear ticket with a failing test. Expects the full ticket context (title, description, comments) to be provided as input.

Use this Skill: https://skilld.dev/gh/n8n-io/n8n/reproduce-bug

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈40 tokens for metadata: the name and description. ≈1.4k when used: this file.

Description uses 2.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈165 characters, or 2.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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 Vitest unit NodeTestHarness + nock packages/nodes-base/nodes/*/test/
Node credential Vitest unit vitest-mock-extended packages/nodes-base/nodes/*/test/
Trigger webhook Vitest unit mock IHookFunctions + vi.mock GenericFunctions packages/nodes-base/nodes/*/test/
Binary data Vitest unit NodeTestHarness assertBinaryData packages/core/nodes-testing/
Execution engine Vitest integration WorkflowRunner + DI container packages/cli/src/__tests__/
CLI / API Vitest integration setupTestServer + supertest packages/cli/test/integration/
Config Vitest unit GlobalConfig + Container packages/@n8n/config/src/configs/__tests__/
Editor UI Vitest Vue Test Utils + Pinia packages/frontend/editor-ui/src/**/__tests__/
E2E / Canvas Playwright Test containers + composables packages/quality/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

Complete the test safety gate in /AGENTS.md before you run the test:

  • Trace side effects from imports, constructors, hooks, and mocked branches
  • Keep filesystem access in a test-owned temporary directory
  • Set N8N_USER_FOLDER before importing modules that resolve it
  • When a mock changes a state check, inspect and isolate the branch that it activates

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

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning8mo4 checks · Risk SAFE
  • Gen Agent Trust Hub9mo

    This skill is designed to automate the reproduction of bugs by generating and running test cases based on Linear ticket information. While it involves dynamic code generation and execution, these activities are essential to its primary function. The main risk is indirect prompt injection, where malicious input in a ticket could attempt to influence the generated code.

  • Socket8mo

    No alerts

  • Snyk9mo

    Risk: LOW · No issues

  • Runlayer9mo

    1/1 file flagged

Signed by skilld at 273d130. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
  • Testing
  • n8n
  • bug-reproduction
  • jest
  • vitest
  • playwright
  • regression-test
  • linear
  • workflow

README badge

README badge for n8n-io/n8n/reproduce-bug

Reproduces bugs from Linear tickets by writing failing regression tests in n8n's test suite. Routes the test to the appropriate layer (Jest unit, Jest integration, Vitest, or Playwright) based on the affected component, then traces code paths, forms hypotheses, and generates tests that confirm the bug before any fix is applied.

Generated from the current SKILL.md.

What kind of bugs can this skill reproduce?
Bugs in n8n node operations, credentials, triggers, binary data handling, execution engine, CLI/API, configuration, editor UI, and end-to-end canvas functionality. The skill routes to the appropriate test layer (Jest unit, Jest integration, Vitest, or Playwright) based on the affected area.
What input does this skill expect?
A full Linear ticket context including title, description, reproduction steps, error messages, stack traces, workflow JSON attachments, and the affected area. The skill parses these signals to form a testable hypothesis.
Does this skill actually fix the bug?
No. The skill only reproduces the bug with a failing regression test. It identifies the root cause and location but does not implement the fix.
What if the bug requires real API credentials or external infrastructure?
The skill will bail out and report the bug as SKIPPED, along with the reason. It does not attempt to reproduce bugs that require third-party credentials, race condition timing, or manual UI interaction.
Can this reproduce bugs that are already fixed in the current code?
Yes. If the code has been fixed since the ticket was filed, the skill will report the bug as ALREADY_FIXED and note when the fix was applied.

Generated from the current SKILL.md. These answers refresh after source changes.