antfu-create-pr
ما الذي تفعله
يجهز هذه المهارة طلب سحب على GitHub من فرعك الحالي ويفتحه. وتكتب عنوانًا ووصفًا يفهمهما المراجع دون قراءة كل الملفات.
متى تستخدمها
- ✓عندما تنتهي من تغييرات الكود وتريد فتح طلب سحب على GitHub.
- ✓عندما تريد عنوان طلب سحب ووصفًا مكتوبين للمراجع.
- ✓عندما يغيّر تغييرك الواجهة ويحتاج المراجع إلى لقطات قبل التغيير وبعده.
رابط المهارة
https://github.com/antfu/skills/blob/main/skills/antfu-create-pr/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“افتح طلب سحب لفرعي الحالي بعنوان واضح وشرح قصير للتغيير.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يتحقق الوكيل من فرعك وكل تغييراته، ويشغّل الاختبارات المناسبة، ثم يكتب طلب سحب يشرح السلوك والسبب. ويضيف صورًا قبل التغيير وبعده للتغييرات المرئية.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
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
- Inspect the repo:
git status, current branch, remotes, default branch,.github/PULL_REQUEST_TEMPLATE*, andAGENTS.md/CONTRIBUTING.mdfor PR rules. - Compute the merge base against the target branch and record the exact
base...headrange the PR publishes. If the branch is stacked on another unmerged branch, target that branch and describe only this PR's own changes. - 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.
- Classify the PR (feature, fix, refactor, chore, docs) and decide which optional body sections earn their place. See pr-body.
- Run the checks that match the changed surfaces (focused tests, typecheck, lint). Record the exact commands and results.
- If the diff changes user-visible UI, capture before/after evidence. See visual-evidence.
- Review the commit history and reshape it into atomic Conventional Commits. See Commits.
- Write the body to a temporary file. Push the branch. Create the PR with
gh pr create --title ... --body-file ...(add--attachfor each screenshot; newerghcan upload local images and videos from the CLI, see Attaching files with GitHub CLI). Use--draftwhen checks are still running or the work is not review-ready. - Open the created PR and verify title, base, head, rendered tables, diagrams, and images.
- Address review comments: fix each confirmed issue, run focused checks, push, reply with evidence, and resolve the thread.
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.
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.
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:
closes #123/fixes #123/refs #123so GitHub links and auto-closes. ## Verification: exact commands run and their results, plus anything left unverified.
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 aBeforeandAfterdiagram 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-u
الأسئلة الشائعة
هل تحتاج إلى صلاحية الوصول إلى GitHub؟
نعم، تفتح طلب السحب على GitHub، لذلك تحتاج إلى صلاحية الوصول إلى المستودع أولًا.
هل ستنظم التزاماتي؟
نعم، تراجع سجل الالتزامات وقد تعيد تشكيله إلى التزامات صغيرة وواضحة.
هل تتبع قواعد مشروعي؟
نعم، تتحقق من قالب طلب السحب وملاحظات المساهمة في المشروع قبل الكتابة.
التفاصيل
الوصف الأصلي من المؤلف
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.
repo: antfu/skills
الشعبية
- نجوم GitHub
- 6.0k
- الترتيب
- #14435
- الترخيص
- MIT
- آخر تحديث
- 30/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
antfu-issue-triage
6.0kيساعد وكيلك على فرز قضايا GitHub وطلبات السحب المفتوحة، فيكشف المكرر والمُصلَح، ثم يسألك قبل أن يتصرف.
antfu-query
6.0kيسألك وكيلك خطوة بخطوة عن خطة أو فكرة، حتى يتفقا على فهم واضح ومُختبَر.
antfu-simplify
6.0kيساعد وكيلك على تقليص تغييرات الكود إلى أصغر نسخة صحيحة، بإزالة الأجزاء غير الضرورية.
antfu
6.0kيعلّم وكيلك العادات التي يفضلها Anthony Fu في مشاريع JavaScript وTypeScript، من تنظيم الملفات إلى اختيار الأدوات.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.