मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग29k · #9363

pr-splitter

यह क्या करती है

यह स्किल एक बड़े कोड बदलाव को कई छोटी पुल रिक्वेस्ट में बांटने की योजना बनाती है। यह मूल ब्रांच का बैकअप रखती है और हर हिस्से को ट्रैक करती है, ताकि कुछ न खोए।

कब इस्तेमाल करें

  • ✓जब कोई पुल रिक्वेस्ट इतनी बड़ी या उलझी हो कि ठीक से रिव्यू न हो सके।
  • ✓जब आप एक ब्रांच से स्टैक्ड या समानांतर पुल रिक्वेस्ट की योजना बनाना चाहें।
  • ✓जब रिव्यू के फ़ीडबैक से स्टैक का एक हिस्सा बदले और बाद के हिस्सों को अपडेट करना पड़े।

Skill का लिंक

https://github.com/mastra-ai/mastra/blob/main/.claude/skills/pr-splitter/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mastra-ai/mastra/blob/main/.claude/skills/pr-splitter/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस पुल रिक्वेस्ट में रीफ़ैक्टरिंग और नया व्यवहार आपस में मिले हैं। इसे छोटी पुल रिक्वेस्ट में बांटने में मेरी मदद कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट मूल ब्रांच का बैकअप लेता है, बदली फ़ाइलें सूचीबद्ध करता है, और उन्हें रिव्यू इकाइयों में समूहित करता है। फिर वह स्टैक की योजना बनाता है, हर हिस्सा निकालता है, और आगे बढ़ने से पहले हर एक की जांच करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

PR Splitter

Preserve the original PR as source material, build smaller reviewable PRs intentionally, and track drift locally as review feedback changes the stack.

Required workflow

  1. Snapshot before touching history

    • Check git status.
    • Create an immutable local reference to the original branch: git branch backup/original-large-pr.
    • Do not delete or rewrite the original branch until the split is complete.
  2. Inventory the original PR

    • Inspect git diff --stat <base>...HEAD, git diff --name-only <base>...HEAD, and git log --oneline <base>..HEAD.
    • Classify changes by review unit: prep/refactor, API/type changes, behavior, tests, docs, cleanup, generated/lock files.
  3. Create a local scratchpad

    • Write split notes to an uncommitted local file, preferably .notes/pr-split.md.
    • Ensure .notes/ is ignored or leave it untracked. Do not commit scratchpad notes unless the user explicitly asks.
    • Track: original branch, base branch, planned PRs, files/hunks extracted, verification per PR, remaining original diff, and intentional drift from review feedback.
  4. Choose the split shape

    • Use stacked PRs when later work depends on earlier work.
    • Use parallel PRs only when changes are truly independent.
    • Use foundation + parallel follow-ups when one shared prep change unlocks independent work.
  5. Extract changes safely

    • Prefer fresh branches from the correct base plus selective restore over rewriting messy history.
    • Use path-level extraction for clean file ownership: git checkout backup/original-large-pr -- path/to/file.
    • Use hunk-level extraction for mixed files: git restore -p --source backup/original-large-pr -- path/to/file.
    • Keep each PR independently buildable and reviewable.
  6. Verify each PR independently

    • Run the narrowest relevant build, typecheck, lint, and tests for that PR's scope.
    • Do not leave tests, docs, or generated files separated from the code they validate unless the split plan explicitly calls for it.
  7. Manage drift deliberately

    • Treat reviewer-approved changes as the new source of truth for the stack.
    • After changing an earlier PR, rebase dependent PRs onto it and resolve conflicts in favor of the reviewed direction, not blindly in favor of the original branch.
    • Compare the evolving stack against backup/original-large-pr to find remaining intent, not to force byte-for-byte equality.
    • Record intentional differences in .notes/pr-split.md.
  8. Use range-diff for rewritten stacks

    • Use git range-diff after rebases, conflict resolution, or force-pushes to understand what changed.
    • Summarize meaningful range-diff results for reviewers when updating a stacked PR.

PR description pattern

Keep PR descriptions concise and reviewer-facing:

## Summary

This is PR N of M split from a larger change.

## Scope

- ...

## Intentionally excluded

- Follow-up PR will handle ...

## Verification

- ...

Do not put the full split ledger in PR descriptions. Keep detailed extraction notes and drift tracking in .notes/pr-split.md.

Scratchpad template

# PR split scratchpad

Original branch: backup/original-large-pr
Base branch: main

## Planned PRs

1. branch-name
   - Scope:
   - Files/hunks extracted:
   - Verification:
   - Changeset: (package names, bump type, scoped message)
   - Status:

## Remaining original intent

- ...

## Drift notes

- Date / branch / reason:

Changesets

Each split PR must carry its own changeset scoped to the changes in that PR. Do not keep the original changeset from the source branch — it covers the full combined change and does not belong in any single split PR.

After extracting changes into a split branch:

  1. Delete any changeset files carried over from the original branch. These were written for the combined diff and will produce incorrect changelog entries.
  2. Create a new changeset for each PR using the CLI (see .mastracode/commands/changeset.md):
    pnpm changeset -s -m "your scoped message" (--major | --minor | --patch) pkg-name
    
  3. Scope the message to that PR's changes only. The changeset message should describe what this specific PR does, not the full original feature.
  4. Include only the packages actually changed in this PR. If the original changeset listed five packages but this PR only touches @mastra/core, the new changeset should only reference `@ma
अक्सर पूछे जाने वाले सवाल

क्या मूल ब्रांच मिटा दी जाएगी?

नहीं। स्किल बैकअप बनाती है और बंटवारा पूरा होने तक मूल ब्रांच रखती है।

क्या स्टैक्ड और समानांतर दोनों पुल रिक्वेस्ट समर्थित हैं?

हाँ। जब बाद का काम पहले के काम पर निर्भर हो तो स्टैक्ड चुनती है, और जब बदलाव स्वतंत्र हों तो समानांतर।

क्या योजना के नोट साझा होते हैं?

नहीं। नोट एक स्थानीय फ़ाइल में रहते हैं, जो आपके कहने तक कमिट नहीं होती।

जानकारी

लेखक का मूल विवरण

Use when breaking a large, complex, messy, or hard-to-review pull request into multiple smaller PRs; planning stacked PRs; extracting independent changes from a branch; splitting mixed refactor and behavior changes; managing drift after review feedback; rebasing follow-up PRs as earlier PRs change; or preserving original branch intent while shipping incrementally.

repo: mastra-ai/mastra

लोकप्रियता

GitHub स्टार
29k
रैंकिंग में स्थान
#9363
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

debugging-difficult-bugs

29k

यह आपके एजेंट को कठिन बग ढूंढने में मदद करती है, असली प्रोग्राम के रनटाइम लॉग से, केवल टेस्ट देखकर अंदाज़ा लगाने की जगह।

कोडिंगटेस्टिंग

mastra-frontend

29k

यह आपके एजेंट को Mastra playground डिज़ाइन सिस्टम के तैयार कॉम्पोनेंट जोड़कर ऐप स्क्रीन बनाने में मदद करती है, शुरू से स्टाइल करने की जगह।

कोडिंगवेबसाइट और UI (frontend)

pr-explainer

29k

यह आपके एजेंट को पुल रिक्वेस्ट को एक साफ़, स्व-निहित HTML पेज में बदलने में मदद करती है, जो रिव्यूअर को बदलाव समझाए।

कोडिंगसामान्य कोडिंग

ralph-plan

29k

यह आपके एजेंट को कुछ छोटी बातचीत से एक केंद्रित, व्यवस्थित टास्क कमांड की योजना बनाने में मदद करती है, ताकि काम के साफ़ चरण और जांच हों।

AI और एजेंटप्रॉम्प्ट और LLM

मिलती-जुलती skills