Antfu Create PR skill
Prepare an evidence-backed GitHub pull request with the correct diff range and review context.
Community · Anthony Fu| Author | Anthony Fu |
|---|---|
| Licence | MIT |
| Source | antfu/skills · SKILL.md on GitHub |
| Works in | Claude Code · Codex, Gemini CLI, Cursor, Copilot |
| Read from the source on |
The antfu-create-pr skill prepares a GitHub pull request from the current branch using evidence from its actual diff.
It checks the base/head range, repository template, relevant tests and before/after UI evidence. Its workflow includes push and PR creation, which still require the user's authorization.
From the skill's SKILL.md: antfu-create-pr
What it does
- Inspect branch, remotes, template and the exact merge-base range.
- Read the complete diff and collect checks appropriate to the changed behavior.
- Prepare a concise title and body; verify the created PR only when publication is authorized.
What you get
- A reviewable PR title, body and verification record, plus attachments when needed and authorized.
When to use it
- Prepare a focused or stacked PR that a reviewer can understand independently.
When not to use it
- Rewriting shared history, uploading private screenshots or treating passing CI as proof of every behavior.
What it needs
- Git and authenticated GitHub CLI for live operations; curl for the attachment fallback, plus project checks and browser tools for UI evidence.
Files in the skill
| File or folder | What it is for |
|---|---|
SKILL.md | Workflow, PR-body and visual-evidence references, with an optional attachment upload helper. |
references/ | Workflow, PR-body and visual-evidence references, with an optional attachment upload helper. |
scripts/ | Workflow, PR-body and visual-evidence references, with an optional attachment upload helper. |
Licence as found in the repository on 2026-11-27: MIT.
Example prompts
Type one of these after installing; naming the skill makes sure it is used.
- Prepare a PR draft from this branch without pushing or publishing it.
- Explain only this stacked branch's own base-to-head changes.
- Review the verification section and identify unsupported compatibility claims.
How to install antfu-create-pr
Keep publication separate from preparation
Install the full folder so its references and helper remain available. The helper uploads files to GitHub and is not a local-only renderer; verify destination, content and CLI capabilities before use.
npx skills add antfu/skills --skill antfu-create-prA skill is a folder with a SKILL.md file. You install it once; the agent reads its short description at the start of each session and loads the full instructions only when a request matches. Pick the place you use:
Claude Code: copy the folder into your skills folder
Put the skill's folder in ~/.claude/skills/ to use it in every project on this computer, or in .claude/skills/ inside a repository to share it with everyone who works there (commit it).
git clone --depth 1 https://github.com/antfu/skills.git
mkdir -p ~/.claude/skills
cp -R skills/skills/antfu-create-pr ~/.claude/skills/Claude Code notices new or changed skills in these folders during the session. If the skills folder did not exist when the session started, run /reload-skills once. Then type /antfu-create-pr or just describe the task.
On Windows, run the commands in Git Bash or WSL, or copy the folder into the same place with File Explorer.
Codex, Gemini CLI, Cursor and GitHub Copilot
These agents read the same SKILL.md folders. The one folder all four accept inside a project is .agents/skills/, so this copies the skill there:
git clone --depth 1 https://github.com/antfu/skills.git
mkdir -p .agents/skills
cp -R skills/skills/antfu-create-pr .agents/skills/| Agent | Project folder | Your user folder | Notes |
|---|---|---|---|
| OpenAI Codex | .agents/skills/ | ~/.agents/skills/ | Type $ or run /skills to pick a skill; Codex also chooses one when your task matches. |
| Gemini CLI | .agents/skills/.gemini/skills/ | ~/.agents/skills/~/.gemini/skills/ | Or install from Git with gemini skills install <git URL> --path <folder> --consent. Google replaced Gemini CLI with Antigravity CLI for free-tier and Google One users on 18 June 2026; Antigravity uses .agents/skills/ in a project and ~/.gemini/config/skills/ for you. |
| Cursor | .agents/skills/.cursor/skills/ | ~/.agents/skills/~/.cursor/skills/ | Type / in Agent chat to pick a skill. Cursor also reads Claude Code's .claude/skills/ folders. |
| GitHub Copilot | .github/skills/.agents/skills/.claude/skills/ | ~/.copilot/skills/~/.agents/skills/ | Works in Copilot CLI, the cloud agent, and agent mode in VS Code, Visual Studio and JetBrains (IDE support depends on the version). Or run gh skill install OWNER/REPOSITORY SKILL (public preview, GitHub CLI 2.90.0 or later). |
Sources for these steps
Checked against each vendor's documentation on 2026-11-14:
Bind evidence to the reviewed revision
Use genuine base-state captures and exact commands, not a simulated revert or an unsupported claim. Sanitize screenshots and keep private prompts and secrets out of the body.
Preserve shared branch history
The source distinguishes local history preparation from already-pushed review commits. Resolve conflicts and CI failures within the approved scope; do not force-push or merge merely because a skill describes it.
Questions about antfu-create-pr
Does the skill create a PR automatically?
The source includes that step, but the requested scope and repository authorization decide whether to publish or stop at a draft artifact.
Why does the base branch matter?
A stacked branch can include inherited work. Compare the correct merge base and describe only the changes this PR owns.
Can I assume attachment upload is supported?
Check the installed GitHub CLI. The source includes a curl-based fallback, which still uploads data and needs authorization.
Does green CI prove the feature works?
It proves only the checks CI ran. Record actual behavior evidence and identify what remains unverified.
More AI skills
Related skills
Antfu skill
Community · Anthony FuApply Anthony Fu's JavaScript and TypeScript tooling preferences to a compatible project.Daymade Skill Creator
Community · daymadeCreate and improve skills while preserving source ownership, capabilities and evidence boundaries.Jezweb Design Review skill
Community · Jeremy Dawes (Jezweb)Review rendered layout, typography, color and responsive consistency with screenshot evidence.React Patterns skill (Jezweb)
Community · Jeremy Dawes (Jezweb)Review React composition, async waterfalls and rendering costs in priority order.Caveman skill
Community · JuliusBrusseeShorten agent replies while preserving code, negations, paths, numbers and units.Leader skill (Khazix)
Community · KKKKhazixTurn a vague idea into a bounded execution brief with evidence, checkpoints and stop conditions.