Community寫作與編輯github.com

Varnan-Tech/opendirectory

接收 GitHub PR 網址或當前分支,用白話文說明 PR 的內容與原因,並以 PR 評論的形式發布。適用於被要求解釋 PR、總結 PR、以白話文描述 PR、在 PR 中加入摘要評論,或想了解 PR 的變更內容時。

opendirectory 是什麼?

這是一個 AI 輔助技能,旨在自動化 Pull Request 的審查流程。它能從 GitHub 擷取 PR 的詳細資料(中繼資料、差異比較及現有評論),並生成兩段式白話文解釋:第一段專注於具體的技術變更(如修改的檔案、函式或系統),第二段則說明這些變更帶來的商業或產品影響。此技能支援多種輸入方式(PR 網址、編號或「current」關鍵字),並能自動發布評論或僅輸出文字供手動貼上。其內建的自我檢查機制確保說明準確、不誇大,並避免與現有評論重複。此技能在 GitHub CLI (`gh`) 已驗證的環境中執行,並能處理大型差異比較,將讀取的範圍限制在 200 行內,以提升效率。

相容平台✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/Varnan-Tech/opendirectory/tree/main/skills/explain-this-pr

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

解釋此 PR

讀取 GitHub 上的 Pull Request,了解其變更內容,並用白話文撰寫解釋。將其發布為 PR 評論,讓審查者能立即掌握背景資訊。


步驟 1:檢查設定

確認 gh 已通過驗證:

gh auth status

如果未驗證:執行 gh auth login 並依照提示操作。

確認輸入內容。使用者必須提供下列其中一項:

  • GitHub PR 網址(例如 https://github.com/owner/repo/pull/123)
  • 當前儲存庫中的 PR 編號(例如 #123)
  • 關鍵字 "current",表示使用當前分支所對應的 PR

如果沒有輸入,請詢問:「哪個 PR 需要我解釋?請提供網址、PR 編號,或說 'current' 來指定目前分支。」


步驟 2:取得 PR 上下文

取得 PR 中繼資料:

gh pr view PR_URL_OR_NUMBER --json number,url,title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,commits,labels,state,isDraft

如果 isDraft 為 true,請告知使用者:「此 PR 仍在草稿階段。解釋內容是根據其當前狀態。」

取得差異比較:

gh pr diff PR_URL_OR_NUMBER

如果差異超過 400 行,請讀取 --stat 摘要以及差異的前 200 行:

gh pr view PR_URL_OR_NUMBER --json files
gh pr diff PR_URL_OR_NUMBER | head -200

取得現有評論(以避免重複已存在的內容):

gh pr view PR_URL_OR_NUMBER --json comments --jq '.comments[].body' 2>/dev/null | head -20

步驟 3:撰寫解釋

寫兩個段落。在寫作之前,請先閱讀每一條規則。

第一段:做了什麼(技術面)

  • 每個主要變更用一句話說明
  • 指出變更的特定檔案、函式或系統
  • 如果差異比較中能清楚看出變更前後的差異,請說明
  • 如果差異中出現具體數字(如刪除的行數、刪除的表格、新增的端點),請包含這些數字
  • 使用主動語態、現在式

範例:

將 auth.middleware.ts 中的記憶體工作階段快取,改用 Redis 支援的快取(src/cache/redis.ts)。為新的 Redis 模組新增 get、set 和 invalidate 方法,並將 UserService.getById() 包裝成具有 5 分鐘 TTL 的調用。移除了限制在單一程序內、且會在多個實例間造成工作階段漂移的 Map 型快取。

第二段:為什麼重要(商業/產品影響)

  • 誰會受益,以及如何受益
  • 這個變更解決了什麼問題或降低了什麼風險
  • 如果提交訊息中包含「為什麼」,請使用該背景資訊
  • 如果差異比較或提交中沒有明確的「為什麼」,則省略此段落,而非猜測

範例:

在負載下存取 /api/me 端點的使用者,會在不同伺服器實例之間取得不一致的工作階段資料,導致間歇性的 401 錯誤。此變更使所有實例的工作階段狀態保持一致,並透過減少每個已驗證請求所需的一次資料庫查詢,來降低資料庫負載。

兩個段落的規則:

  • 不要使用破折號(em dash),改用逗號或句號
  • 不要使用填充詞彙:「這個 PR」、「這個變更」、「如您所見」
  • 不要編造結果。只能說明在差異比較或提交訊息中直接可見的影響
  • 如果此 PR 是純重構且行為沒有改變,請直接說明:「將 X 重構為 Y,可觀察到的行為不變。」
  • 總字數低於 150 字

步驟 4:自我檢查

在發布之前,請檢查:

  • 第一段中提到了差異比較中的特定檔案或函式
  • 沒有編造的指標或結果
  • 沒有使用破折號
  • 沒有填充詞彙
  • 總字數低於 150 字
  • 如果沒有明確的「為什麼」,則省略第二段,而非猜測

請在發布前修正任何違規事項。


步驟 5:發布為 PR 評論

將解釋呈現給使用者。詢問:「準備好將此發布為 PR 評論了嗎,或者您想先編輯它?」

確認後,透過標準輸入傳遞內文,以安全處理反引號、引號和換行符:

git pr comment PR_URL_OR_NUMBER --body-file - << 'EOF'
EXPLANATION_HERE
EOF

發布後:「評論已添加。請在以下網址檢視:[步驟 2 中的網址]」

如果使用者說「僅輸出」(output only),則在程式碼區塊中呈現解釋,供手動複製貼上,而不發布。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Varnan-Tech/opendirectory

Use when the user asks to generate a blog cover image, thumbnail, or article header. Automatically uses modern typography, brand logos, and Google Search grounding to create beautiful 16:9 images with Gemini 3.1 Flash Image Preview.

Varnan-Tech/opendirectory

World-class brand strategist and naming expert. Uses an interrogation-led discovery phase to extract your brand's DNA, then applies scientific naming frameworks (Phonosemantics) and automated multi-TLD domain checking.

Varnan-Tech/opendirectory

Use when the user asks to generate or update a project's CLAUDE or AGENTS context file from a codebase scan. Writes a focused file under 100 lines containing only the non-obvious build commands, conventions, and gotchas Claude Code needs.

Varnan-Tech/opendirectory

Use when the user wants to verify cold emails, enrich a lead list, or autonomously guess email addresses from a CSV using ValidEmail.co or the open-source Reacher engine.

Varnan-Tech/opendirectory

Competitive intelligence orchestrator tracking companies across 8+ platforms (GitHub, Twitter, Reddit, HN, PH, YC Jobs) with heat scores and AI briefings.

Varnan-Tech/opendirectory

Give it your product URL or description. It finds your top 5 competitors, runs three-track PR research across all of them (editorial, podcasts, communities), identifies which channels appear most frequently, looks up the journalist or host for each, and returns a tiered outreach list with story angles and ready-to-send cold pitch drafts tailored to your product. Use when asked to find PR opportunities, discover where competitors got featured, build a media outreach list, find which journalists cover my space, or get pitch templates for press coverage.

Varnan-Tech/opendirectory

Generate high-converting, deep-dive growth case studies in MDX format. Use this skill when asked to write a case study or blog post about a company's growth, tech stack, or product-led strategy. It handles the full pipeline (researching the company via Tavily, generating a 16:9 cover image, quality checking the draft, uploading assets to cloud storage, and pushing directly to the target repository).

Varnan-Tech/opendirectory

Scans your project for outdated npm, pip, Cargo, Go, or Ruby packages. Runs a CVE security audit. Fetches changelogs, summarizes breaking changes with Gemini, and opens one PR per risk group (patch, minor, major). Includes Diagnosis Mode for install conflicts. Use when asked to update dependencies, check for outdated packages, open dependency PRs, scan for package updates, audit for CVEs, or flag breaking changes in upgrades. Trigger when a user says "check for outdated packages", "update my dependencies", "open PRs for dependency updates", "scan for CVEs", or "which packages need upgrading".

Varnan-Tech/opendirectory

Generates and updates README.md and API reference docs by reading your codebase's functions, routes, types, schemas, and architecture. Uses graphify to build a knowledge graph first, then writes accurate docs from it. Use when asked to write docs, generate a README, document an API, update stale docs, create an API reference from code, add an architecture section, or document a project in any language. Trigger when a user says their docs are missing, outdated, or wants to document their codebase without writing it manually.

Varnan-Tech/opendirectory

Evaluates expired domain candidates against a target niche, scores them by topical relevance, historical activity level, and history cleanliness, then outputs a ranked shortlist with explainable reasoning and risk flags.

Varnan-Tech/opendirectory

Brutally honest developer-experience audit for a GitHub repo. Scores 10 DX dimensions (time-to-first-success, README clarity, visual proof, install, quick-start, docs, examples, community, trust, marketing), writes a shareable roast in the requested tone (brutal/honest/kind), produces a prioritized action plan ranked by impact × effort, and sketches an ideal README. Trigger when user says "roast my repo", "audit my README", "dx audit", "developer experience review", "score my GitHub project", "before launch checklist", or "make my repo shareable".

Varnan-Tech/opendirectory

Drafts and designs a complete HTML email newsletter from a topic or content brief. Outputs paste-ready HTML for Loops, Mailchimp, Beehiiv, Resend, or any standard email platform. Includes subject line options and plain-text fallback. Trigger when a user says "write a newsletter", "draft an email newsletter", "create an HTML email", "design an email for my subscribers", or "write a newsletter about [topic]".

Varnan-Tech/opendirectory

Audit how often LLMs recommend your brand vs competitors and generate a GEO action plan.

Varnan-Tech/opendirectory

Takes a competitor's public GitHub repo URL, fetches their open issues via the GitHub REST API, filters noise locally, clusters issues into 6 demand categories, computes a demand score per issue and per cluster, and outputs a ranked demand gap report with a GTM messaging brief. Use when asked to scan a competitor's GitHub issues, find what their users are begging for, turn GitHub complaints into product positioning, identify competitor feature gaps, or generate messaging from real user demand. Trigger when a user says "scan competitor issues", "what are users asking for on X repo", "find demand gaps in Y", "turn GitHub issues into messaging", or "what should I build based on competitor complaints".

Varnan-Tech/opendirectory

Find recurring confusion in your repo's GitHub Discussions, rank it by urgency, and draft the actual docs fixes and content angles — with verbatim community quotes and source links as evidence.

Varnan-Tech/opendirectory

SEO keyword research workflow for blog generation using Google Trends data. Use when writing blog posts, planning content calendars, or optimizing articles for search engines. Finds breakout keywords, builds content structure, and generates SEO-optimized blog outlines targeting tech and developer audiences.

Varnan-Tech/opendirectory

Generates a professionally designed case study PDF for B2B SaaS sales and marketing. Supports 7 page layouts, 9 style presets, 1-4 page output. Trigger when user says "create a case study", "write a customer story", "make a case study PDF", "design a success story", "turn this customer win into a PDF".

Varnan-Tech/opendirectory

Generates data visualization charts (bar, line, area, pie, doughnut, scatter, radar, treemap) as PNG using Apache ECharts v6. 1080×1080px default, 5 style presets, highlight annotations. Trigger when user says "create a chart", "visualize data", "make a bar chart", "line graph", "pie chart", "data visualization", "chart this data", "plot", "graph", or "visualize these numbers".

Varnan-Tech/opendirectory

Creates professionally designed B2B SaaS e-books in HTML + CSS, exported as print-ready PDF. 3–10 pages, 9 style presets, 11 page layout types. Trigger when user says "create an ebook", "design a lead magnet", "make a PDF guide", "build a gated content piece", "write a B2B ebook", "design a white paper", "create a nurture asset", or "make a PDF report".

Varnan-Tech/opendirectory

Fetches low-star App Store and Google Play reviews, clusters them into broken-promise patterns, and generates a ranked copy brief with positioning opportunities.

相關技能