Skip to content
Frontend
Skill

/antfu-create-pr

Create a reviewable GitHub pull request from the current branch with a Conventional Commits title, a concise evidence-based body, and before/after screenshots for UI changes. Use when asked to open, create, publish, or prepare a PR.

From plugin
skills
6.1k14 skills

Claude Code

$ npx -y skills add antfu/skills --skill antfu-create-pr --agent claude-code

SKILL.md

antfu-create-pr.SKILL.md
name: antfu-create-pr
description: Create a reviewable GitHub pull request from the current branch with a Conventional Commits title, a concise evidence-based body, and before/after screenshots for UI changes. Use when asked to open, create, publish, or prepare a PR.
metadata:
  author: Anthony Fu
  version: "2026.11.16"

Create Pull Request

Open a PR that a reviewer can understand from the body alone. Explain the changed behavior and why, not the list of changed files. Keep the body proportional to the change: a one-line fix gets a few sentences, a cross-module feature gets tables and diagrams.

Workflow

1. Inspect the repo: `git status`, current branch, remotes, default branch, `.github/PULL_REQUEST_TEMPLATE*`, and `AGENTS.md` / `CONTRIBUTING.md` for PR rules. 2. Compute the merge base against the target branch and record the exact `base...head` range the PR publishes. If the branch is stacked on another unmerged branch, target that branch and describe only this PR's own changes. 3. Read the full diff. Separate runtime code from generated files, lockfiles, and snapshots. Trace changed code to its entry points, callers, and external boundaries so architecture claims are backed by file paths or symbols. 4. Classify the PR (feature, fix, refactor, chore, docs) and decide which optional body sections earn their place. See [pr-body](references/pr-body.md). 5. Run the checks that match the changed surfaces (focused tests, typecheck, lint). Record the exact commands and results. 6. If the diff changes user-visible UI, capture before/after evidence. See [visual-evidence](references/visual-evidence.md). 7. Review the commit history and reshape it into atomic Conventional Commits. See [Commits](#commits). 8. Write the title and body (see [Title](#title) and [Body](#body)) to a temporary file. Push the branch. Create the PR with `gh pr create --title ... --body-file ...` (add `--attach` for each screenshot; newer `gh` can upload local images and videos from the CLI, see [Attaching files with GitHub CLI](https://docs.github.com/en/github-cli/github-cli/attaching-files-with-github-cli)). Use `--draft` when checks are still running or the work is not review-ready. 9. Open the created PR and verify title, base, head, rendered tables, diagrams, and images. 10. Get the PR mergeable and green: resolve conflicts, watch CI, fix failures, address review comments. See [After creating](#after-creating).

Commits

Each commit does one logical thing and uses a Conventional Commits message. A reviewer should be able to read `git log --oneline` as the story of the change and review commit by commit.

# Good: each commit is self-contained
feat(api): add task creation endpoint with validation
feat(ui): add task creation form component
feat(ui): connect form to api and add loading state
test(tasks): cover task creation (unit + integration)

# Bad: everything mixed together
feat: add task feature, fix sidebar, update deps, refactor utils
  • Keep unrelated fixes, dependency bumps, and drive-by refactors out of the branch; open separate PRs for them.
  • Before pushing, review the history and split or squash local commits (`git rebase -i <base>`) until each one stands alone and builds.
  • Do not rewrite commits that are already pushed and under review; add new commits instead.

Title

Use Conventional Commits, matching how the repo already writes commit messages:

feat(scope): add retry to upload client
fix(scope): avoid double submit on enter
refactor: extract diff parsing from cli
chore(deps): update vite to v8
docs: clarify worktree setup
  • Lowercase, imperative, no trailing period, under ~70 characters.
  • Scope is the package, module, or feature name the repo already uses. Omit it when the change is repo-wide.
  • Squash-merge repos turn the title into the commit message; write it as the commit you want in history.

Body

Required in every PR:

  • `## Summary`: the problem or capability first, then what changed and why this approach. Mention if the PR is stacked and on what.
  • Linked issues: one per line as a list item, e.g. `- close #123`, `- close #456`, so GitHub renders each as a pretty issue card and auto-closes it. Use `- refs #789` for issues that should stay open.
  • `## User prompts`: the model and harness in use, then a short summary of what the user asked for during the session, facts only. See [pr-body](references/pr-body.md#user-prompts).
  • `## Verification`: exact commands run and their results, plus anything left unverified. Show proof matched to the change type (bug: same input before and after; perf: same workload measured both sides; CLI: real output). See [Evidence by change type](references/pr-body.md#evidence-by-change-type).

Optional, only when it helps the reviewer:

  • `## Change map`: table of module, before, after, reason. Use for changes across several modules or ownership boundaries. Never a raw file list.
  • `## Architecture and behavior`: a Mermaid flow, sequence, or state diagram when ordering, async work, or state transitions changed. For a fix, pair a `Before` and `After` diagram at the same abstraction level.
  • `## Boundaries and risks`: table of invariant, failure mode, protection, evidence. Use when there are real failure modes, migrations, or external effects.
  • `## Visual changes`: before/after image table for UI changes.
  • `## Rollout and follow-up`: migrations, feature flags, known gaps. State whether a gap blocks merge.

If the repo has a PR template, keep its headings and fill them; add sections above only where the template leaves room.

Rules

  • Say what is verified, what is assumed, and what is not verified. Do not write "safe", "fixed", or "backward compatible" without pointing at the evidence.
  • Green CI proves only the checks CI runs. Focused tests prove only the behavior they cover.
  • Do not describe inherited changes from a parent branch as this PR's changes.
  • Use plain hyphens; never em dashes (U+2014) or en dashes (U+2
Read more
@antfu
Ships withskills

A collection of Agent Skills reflecting Anthony Fu's preferences, experience, and best practices, along with usage documentation for the tools.

Stars on GitHub

Momentum

stars in total
6.1k
Star history of antfu/skills on GitHub, a chart by star-history.com

Other skills on skills.

antfu-issue-triage

antfu-issue-triage

Triage open issues and PRs of the current GitHub repo - find already-fixed, duplicate, and spam items, suggest labels, gauge…

@antfu@antfuInstall Skill
antfu-query

antfu-query

Interview the user relentlessly about a plan, decision, or idea until reaching a shared understanding, using the agent's…

@antfu@antfuInstall Skill
antfu-simplify

antfu-simplify

Simplify the changes of the current PR or working tree with an ablation study - remove each piece of the diff and keep only what…

@antfu@antfuInstall Skill
antfu

antfu

Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects,…

@antfu@antfuInstall Skill
nitro

nitro

Nitro is the framework-agnostic server toolkit (powering Nuxt) for building and deploying web servers anywhere. Use when working…

@antfu@antfuInstall Skill
nuxt

nuxt

Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes,…

@antfu@antfuInstall Skill

More skills from other plugins.

next-bundle-optimizer
Auto-invoked

next-bundle-optimizer

Audit and reduce Next.js browser initial-load work. Use for slow route startup, oversized client bundles, duplicate browser…

nextjs9d143k
@vercel@vercelInstall Skill
migrate-radix-to-base

migrate-radix-to-base

Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert…

ui2w127k
@shadcn-ui@shadcn-uiInstall Skill
chrome-release-cls

chrome-release-cls

Given a Chrome Releases blog post URL (chromereleases.googleblog.com), extract every CVE/bug and find the underlying Gerrit CL…

electron9d124k
@electron@electronInstall Skill
taste-skill
Auto-invoked

taste-skill

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One…

Questions about antfu-create-pr.

Which coding agents can use antfu-create-pr?
antfu-create-pr installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.