writing-pr-descriptions
यह क्या करती है
यह स्किल pull request का पाठ ऐसा बनाती है कि समीक्षक हर लाइन पढ़े बिना समस्या और बदलाव समझ सके। यह उन डेवलपर्स के लिए है जो तेज़ और साफ़ कोड समीक्षा चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप pull request खोलने वाले हों और उसका विवरण लिखना हो।
- ✓जब आपको मौजूदा pull request विवरण अपडेट करना हो, बिना उसके स्क्रीनशॉट या लिंक खोए।
- ✓जब कोई समीक्षक pull request को समझना मुश्किल पाए और आप पाठ सुधारना चाहें।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/.agents/skills/writing-pr-descriptions/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे बदलाव के लिए एक साफ़ pull request विवरण लिखिए, जिसमें समस्या और मैंने क्या बदला, यह बताया गया हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह समस्या और उससे कौन प्रभावित है, इससे शुरू करती है, जो अनुमान के बजाय असली स्रोत, जैसे टिकट या रिपोर्ट, से लिया जाता है। फिर यह दिखने वाला असर और मुख्य बदलाव लिखती है, पाठ को छोटा और आसानी से पढ़ने लायक रखती है, और पोस्ट करने से पहले जाँचती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Writing PR descriptions
A reviewer scans a description in seconds and decides where to spend attention. The body is a scanning surface, not an essay, and it has to stand without the diff. A body that narrates the code, or that would fit any PR equally well, teaches its reader to skip the next one.
Order decides whether they understand the change at all. Form and length only decide how fast. So get the order right first, and never buy shape at the cost of it.
Work in five passes: lead, route, cut, shape, check. Run all five. When a body already exists, pass 0 comes first.
Pass 0: keep what the body already holds
gh pr edit --body replaces the whole body, so every part of your draft that has no home is gone the moment you push it.
An existing body holds work you cannot recreate: screenshots and recordings a person uploaded, links they collected, a checkbox they ticked, a note to a named reviewer.
Read the current body and edit it, rather than writing a fresh one over the top:
gh pr view <number> --json body --jq .body > pr-body.md
# edit pr-body.md
gh pr edit <number> --body-file pr-body.md
Carry every image, video, link and ticked box into the new body, under the heading it belongs to, and add the heading when your draft has none. Replace one only when the change made it wrong, and say in the body that you replaced it.
Pass 1: lead with the need
The first line is the one line you can count on being read. You just spent an hour inside the mechanism, so the mechanism comes out first. Push it down and spend that line on the need that caused the work.
- Line 1 of Problem says who is affected and what is wrong for them today. Name the surface or workflow they were on. Four shapes cover almost every PR:
- A fix: what breaks, and for whom.
- A feature: what the person is trying to get done, and what stands in the way. "Analysts who join tables in the SQL editor recompute the same derived column in every query."
- A refactor, a chore or an enabling change: who is blocked, what it costs them, or what class of failure it removes. Nobody sees it, but somebody is waiting.
- A follow-up or a layer in a stack: what the earlier PR left undone, and what this one adds. Link that PR and assume nobody read it.
- Problem must stay true if the author picks a different solution. A missing version of your solution is not a problem: "there is no PDF export" is Changes with a "not" in it.
- Take the need from a source: the request, a linked issue, a thread, a measurement. The writer of a body often has only the diff. Never invent an actor, a cost, or a frequency to make the line read better. When no source gives the reason, say so in one line, so the reviewer knows to ask.
- If line 1 opens with a symbol, a file path, a class, or a setting, you led with the mechanism. Rewrite it.
- Size the problem in one clause where you know it: how many teams, how often, since when.
- The mechanism follows, in the order a reviewer has to check it.
- The first bullet of Changes is the change itself. Renames, regenerated snapshots and comment fixes go last.
- Every Changes bullet a person can notice says what they now see or do differently, then the mechanism under it. One user-facing line in Problem does not discharge this.
- Say in one line which part of Changes is mechanical. A reviewer cannot otherwise tell a purely internal change from a visible one you described as internal.
- If one part of the diff is riskier than the rest, name that part and say the rest is mechanical.
Most of the time you already wrote the need and put it third. Move it up rather than writing a new sentence.
Line 1 can be a bullet or a standalone sentence, whichever reads faster, but one sentence and never a paragraph.
Solution-shaped problems
❌ The dashboard has no PDF export.
✅ Account managers rebuild weekly dashboard summaries in slides to send to customers (linked request).
✅ The request asks for a PDF export of a dashboard and gives no reason. (No source states the need, so the body says that and invents nothing.)
The first good version leaves room for more than one solution. The second is honest, and it tells the reviewer what to ask before approving.
Worked example
❌ The first three bullets, as written:
- The canvas runtime posts to the host with
port?.postMessage(...), so messages sent before the port exists are silently dropped.- The host delivers the MessagePort only after the artifact iframe's load event, w
अक्सर पूछे जाने वाले सवाल
क्या यह समस्या के बारे में विवरण गढ़ देगी?
नहीं। इसे समस्या के असली स्रोत, जैसे टिकट या रिपोर्ट, का उपयोग करने के लिए बनाया गया है, अंदाज़ा लगाने के लिए नहीं।
क्या मौजूदा स्क्रीनशॉट और लिंक बने रहेंगे?
हाँ। यह पहले मौजूदा विवरण पढ़ती है और पाठ बदलते समय चित्र, लिंक और चेक किए गए बॉक्स साथ ले जाती है।
क्या विवरण का कोई तय फ़ॉर्मेट होना चाहिए?
नहीं। यह बुलेट, टेबल या आरेख वहीं इस्तेमाल करती है जहाँ वे पाठक की मदद करें।
जानकारी
लेखक का मूल विवरण
Shapes a PR body so a reviewer can understand the problem and change quickly. Use ALWAYS before writing or editing a PR description, before `gh pr create` or `gh pr edit --body`, or when asked to improve a description. States who is affected and what is wrong for them in Problem, taken from a source and never invented, then the visible effect and mechanism in Changes. Selects bullets, tables, diagrams, screenshots, or collapsed blocks for each fact. Removes unnecessary detail and checks one fact per bullet, sentences under 25 words, active voice, and no idioms. Keeps the body complete without
repo: PostHog/posthog
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6820
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।