n8n:create-pr
GitHub用于创建符合n8n规范的GitHub PR,自动校验标题格式、分析变更内容并生成描述。
触发场景
安装
npx skills add n8n-io/n8n --skill n8n:create-pr -g -y
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 changesbenchmark- Benchmark CLI changescore- Core/backend/private APIeditor- Editor UI changesengine- 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
-
Check current state:
git status git diff --stat git log origin/master..HEAD --oneline -
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 isscdekov/PAY-1234-some-feature, check forPAY-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. -
If this is a security fix, audit every public-facing artifact before proceeding (see Security Fixes below).
-
Analyze changes to determine:
- Type: What kind of change is this?
- Scope: Which package/area is affected?
- Summary: What does the change do?
-
Push branch if needed:
git push -u origin HEAD -
Create PR using gh CLI. Read
.github/pull_request_template.mdas 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:
- 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.
- Each sentence names who does what: a component, a process, or a person as the subject, with a plain technical verb.
- Each domain term has a plain definition where it first appears.
- 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.
- Keep the Summary and the Why together under about 200 words. A small PR needs much less.
- Define each domain term in plain words where it first appears. Do not use a ticket ID or an internal name as an explanation.
- 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).
- Use plain technical verbs, not metaphors ("passes the value", not "hands the value" or "lets the value through").
Summary: what the PR does
- Start with one to three sentences of background for a reader who is new to the area. Then state what the PR does.
- 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.
- If the PR changes no product code, say so in the first sentence (for example: "This PR only adds tests.").
- Do not justify the change here. The justification goes in the Why.
- 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:
- Do not repeat the Summary.
- State the problem or the constraint that makes the pre-existing code unfit.
- 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/backportlabel 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


