Agent Skills › n8n-io/n8n › n8n:create-pr

n8n:create-pr

GitHub

用于创建符合n8n规范的GitHub PR,自动校验标题格式、分析变更内容并生成描述。

.agents/skills/create-pr/SKILL.md n8n-io/n8n

触发场景

用户要求创建PR 输入/pr指令

安装

npx skills add n8n-io/n8n --skill n8n:create-pr -g -y
更多选项

非标准路径

npx skills add https://github.com/n8n-io/n8n/tree/master/.agents/skills/create-pr -g -y

不安装直接使用

npx skills use n8n-io/n8n@n8n:create-pr

指定 Agent (Claude Code)

npx skills add n8n-io/n8n --skill n8n:create-pr -a claude-code -g -y

安装 repo 全部 skill

npx skills add n8n-io/n8n --all -g -y

预览 repo 内 skill

npx skills add n8n-io/n8n --list

SKILL.md

Frontmatter
{
    "name": "n8n: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
  • engine - New workflow execution engine v2 (@n8n/engine package & engine-v2 module in cli)
  • * 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, unless the type already excludes it

Steps

  1. Check current state:

    git status
    git diff --stat
    git log origin/master..HEAD --oneline
    
  2. Check for implementation plan: Look for a plan file in the repository plan directories (.claude/plans/ or .agents/plans/ when present) that matches the current branch's ticket ID (e.g. if branch is scdekov/PAY-1234-some-feature, check for PAY-1234.md). If a plan file exists, ask the user whether they want to include it in the PR description as a collapsible <details> section (see Plan Section below). Only include the plan if the user explicitly approves.

  3. If this is a security fix, audit every public-facing artifact before proceeding (see Security Fixes below).

  4. Analyze changes to determine:

    • Type: What kind of change is this?
    • Scope: Which package/area is affected?
    • Summary: What does the change do?
  5. Push branch if needed:

    git push -u origin HEAD
    
  6. Create PR using gh CLI. Read .github/pull_request_template.md as the body structure, then populate each section with actual content before creating the PR:

    • Summary: describe what the PR does
    • Why: explain why the change is needed (see Why below)
    • How to test: describe how to test the changes. Include an example workflow if appropriate
    • Related tickets: add the Linear ticket URL (https://linear.app/n8n/issue/[TICKET-ID]) and any GitHub issue links
    • Checklist: keep as-is from the template
      • Add a "🤖 PR Summary generated by AI" at the end of the body

    Before you create the PR, proofread the body with these checks. Rewrite each sentence that fails a check:

    1. The Summary and the Why together are under the word budget. If not, first remove the details that the reviewer reads in the diff, then shorten the Why.
    2. Each sentence names who does what: a component, a process, or a person as the subject, with a plain technical verb.
    3. Each domain term has a plain definition where it first appears.
    4. Each sentence is true for the diff.

    When a later commit changes a fact in the body, update the body.

    gh pr create --draft --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF'
    <populated body based on pull_request_template.md>
    EOF
    )"
    

PR Body Guidelines

Based on .github/pull_request_template.md:

Write for a reviewer who does not know this area of the code. The reviewer must understand the change before they open the diff. Use ASD-STE100 Simplified Technical English: short sentences, active voice.

  1. Keep the Summary and the Why together under about 200 words. A small PR needs much less.
  2. Define each domain term in plain words where it first appears. Do not use a ticket ID or an internal name as an explanation.
  3. Leave out details that the reviewer reads in the diff: error cases, status codes, renamed fields, the order of calls, file lists, test names. Mention one only when it changes behaviour that a reviewer could miss. Also leave out what reviewers already know (framework behaviour).
  4. Use plain technical verbs, not metaphors ("passes the value", not "hands the value" or "lets the value through").

Summary: what the PR does

  1. Start with one to three sentences of background for a reader who is new to the area. Then state what the PR does.
  2. Write prose about behaviour, not a list of code edits. Name a class or a function when it represents an essential/core concept and it helps the reader to navigate the change.
  3. If the PR changes no product code, say so in the first sentence (for example: "This PR only adds tests.").
  4. Do not justify the change here. The justification goes in the Why.
  5. Include screenshots or videos for UI changes.

Why: the reasoning

Always fill the ## Why section. The Summary and the core of the Why are what the reviewer needs most. Keep the core short:

  1. Do not repeat the Summary.
  2. State the problem or the constraint that makes the pre-existing code unfit.
  3. If there are accepted gaps, or changes for existing code paths, state them in a separate short paragraph.

Add rejected alternatives only when a reviewer would otherwise ask about them, if any. Use one or two sentences for each alternative: state the concrete reason it fails. Write an alternative that was never built in the conditional. Together, the alternatives must be shorter than the core Why section.

How to test Section

  • Explain how to test the changes
  • Include an example workflow if appropriate
  • If the feature is gated in a default n8n instance (requires a non-default module via N8N_ENABLED_MODULES, an enterprise license, a feature flag, or similar), note which env vars/license are needed so the tester can deploy a correctly configured instance

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:

  • The human author of the PR has checked the "I have seen this code, I have run this code, and I take responsibility for this code." checkbox
  • 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

feat(core): Experimental feature not enabled yet (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

Plan Section

If a matching plan file was found in a repository plan directory and the user has approved including it, add a collapsible section at the end of the PR body (after the checklist, before EOF):

<details>
<summary>Implementation plan</summary>

<!-- paste plan file contents here -->

</details>

Security Fixes

This repo is public. Never expose the attack vector in any public artifact. Describe what the code does, not what threat it prevents.

Artifact BAD GOOD
Branch fix-sql-injection-in-webhook fix-webhook-input-validation
PR title fix(core): Prevent SSRF fix(core): Validate outgoing URLs
Commit msg fix: prevent denial of service fix: add payload size validation
PR body "attacker could trigger SSRF…" "validates URL protocol and host"
Linear ref URL with slug (leaks title) URL without slug or ticket ID only
Test name 'should prevent SQL injection' 'should sanitize query parameters'

Before pushing a security fix, verify: no branch name, commit, PR title, PR body, Linear URL, test name, or code comment hints at the vulnerability.

When in doubt, check the Linear issue for possible extra precautions

版本历史

  • 7a334e3 当前 2026-10-20 06:37

    优化PR描述长度以适配新评审者;修正no-changelog标签的使用逻辑。

  • 8ff280e 2026-09-28 20:45

    更新 engine scope 说明,修正为包含 engine-v2 模块及 cli 位置的具体描述。

  • c31d0e5 2026-08-20 19:07

同 Skill 集合

.agents/skills/agent-design-language/SKILL.md
.agents/skills/community-pr-readiness-check/SKILL.md
.agents/skills/content-design/SKILL.md
.agents/skills/conventions/SKILL.md
.agents/skills/create-agent-builder-eval/SKILL.md
.agents/skills/create-community-node-lint-rule/SKILL.md
.agents/skills/create-instance-ai-eval/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-skill/SKILL.md
.agents/skills/db-migrations/SKILL.md
.agents/skills/design-system/SKILL.md
.agents/skills/env-var-docs/SKILL.md
.agents/skills/experiments/SKILL.md
.agents/skills/gh-stack/SKILL.md
.agents/skills/human-like-code-review/SKILL.md
.agents/skills/linear-issue/SKILL.md
.agents/skills/loom-transcript/SKILL.md
.agents/skills/nathan/SKILL.md
.agents/skills/node-add-oauth/SKILL.md
.agents/skills/protect-endpoints/SKILL.md
.agents/skills/public-api/SKILL.md
.agents/skills/reproduce-bug/SKILL.md
.agents/skills/spec-driven-development/SKILL.md
.agents/skills/telemetry/SKILL.md
.agents/skills/ui-design/SKILL.md
.claude/plugins/n8n/skills/setup-mcps/SKILL.md
.opencode/skills/setup-mcps/SKILL.md
packages/@n8n/cli/skills/n8n-cli/SKILL.md
packages/@n8n/instance-ai/skills/agent-builder/SKILL.md
packages/@n8n/instance-ai/skills/config-evals/SKILL.md
packages/@n8n/instance-ai/skills/credential-recipe-research/SKILL.md
packages/@n8n/instance-ai/skills/credential-setup-with-computer-use/SKILL.md
packages/@n8n/instance-ai/skills/debugging-executions/SKILL.md
packages/@n8n/instance-ai/skills/instance-awareness/SKILL.md
packages/@n8n/instance-ai/skills/n8n-docs-assistant/SKILL.md
packages/@n8n/instance-ai/skills/planned-task-runtime/SKILL.md
packages/@n8n/instance-ai/skills/planning/SKILL.md
packages/@n8n/instance-ai/skills/post-build-flow/SKILL.md
packages/@n8n/instance-ai/skills/suggest-automations/SKILL.md
packages/@n8n/instance-ai/skills/data-table-manager/SKILL.md
packages/@n8n/instance-ai/skills/intent-recognition/SKILL.md
packages/@n8n/instance-ai/skills/model-selection/SKILL.md
packages/@n8n/instance-ai/skills/one-off-operations/SKILL.md
packages/@n8n/instance-ai/skills/progressive-building/SKILL.md
packages/@n8n/instance-ai/skills/workflow-builder/SKILL.md

元信息

文件数
0
版本
7a334e3
Hash
dbdef10c
收录时间
2026-08-20 19:07

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 16:46
浙ICP备14020137号-1