reproduce-bug

작성자: n8n-io

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

npx skills add https://github.com/n8n-io/n8n --skill reproduce-bug

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:

AreaTest LayerPatternKey Location
Node operationVitest unitNodeTestHarness + nockpackages/nodes-base/nodes/*/test/
Node credentialVitest unitvitest-mock-extendedpackages/nodes-base/nodes/*/test/
Trigger webhookVitest unitmock IHookFunctions + vi.mock GenericFunctionspackages/nodes-base/nodes/*/test/
Binary dataVitest unitNodeTestHarness assertBinaryDatapackages/core/nodes-testing/
Execution engineVitest integrationWorkflowRunner + DI containerpackages/cli/src/__tests__/
CLI / APIVitest integrationsetupTestServer + supertestpackages/cli/test/integration/
ConfigVitest unitGlobalConfig + Containerpackages/@n8n/config/src/configs/__tests__/
Editor UIVitestVue Test Utils + Piniapackages/frontend/editor-ui/src/**/__tests__/
E2E / CanvasPlaywrightTest containers + composablespackages/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:

ConfidenceCriteriaOutput
CONFIRMEDTest fails consistently, failure matches hypothesisReproduction Report
LIKELYTest fails but failure mode differs slightlyReport + caveat
UNCONFIRMEDCannot trigger the failureReport: what was tried
SKIPPEDHit a hard bailout triggerReport: why skipped
ALREADY_FIXEDBug no longer reproduces on current codeReport: 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

FileLinesIssue
path/to/file.tsXX-YYDescription 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

n8n-io의 다른 스킬

n8n-cli
n8n-io
n8n CLI를 사용하여 n8n 인스턴스에서 워크플로, 자격 증명, 실행 등을 관리합니다. 사용자가 n8n과 상호작용하거나 워크플로를 자동화하도록 요청할 때 사용합니다.
official
create-issue
n8n-io
n8n 규칙에 따라 Linear 티켓이나 GitHub 이슈를 생성합니다. 사용자가 티켓 생성, 버그 제보, 이슈 열기, 또는 /create-issue를 요청할 때 사용하세요.
official
node-add-oauth
n8n-io
기존 n8n 노드에 OAuth2 자격 증명 지원을 추가합니다 — 자격 증명 파일을 생성하고, 노드를 업데이트하며, 테스트를 추가하고, CLI 상수를 동기화 상태로 유지합니다. 다음 경우에 사용하세요…
official
spec-driven-development
n8n-io
구현과 명세를 동기화합니다. .claude/specs/에 명세가 있는 기능을 작업할 때, 사용자가 /spec이라고 말할 때, 또는 시작할 때 사용합니다.
official
content-design
n8n-io
Product content designer for UI copy. Use when writing, reviewing, or auditing user-facing text: button labels, error messages, tooltips, empty states, modal…
official
create-issue
n8n-io
n8n 규칙에 따라 Linear 티켓 또는 GitHub 이슈를 생성합니다. 사용자가 티켓 생성, 버그 제보, 이슈 열기, 또는 /create-issue를 요청할 때 사용합니다.
official
agent-builder
n8n-io
타겟 n8n 에이전트의 빌드 구성(채팅 통합/트리거, MCP 서버, 노드 도구 리소스 로케이터 등)을 생성, 구성 또는 편집할 때 사용합니다.
official
create-pr
n8n-io
GitHub 풀 리퀘스트를 생성하며, check-pr-title CI 검증을 통과하는 적절한 형식의 제목을 사용합니다. PR 생성이나 변경 사항 검토 제출 시 사용합니다…
official