Community寫作與編輯github.com

Varnan-Tech/opendirectory

當使用者要求撰寫、草稿、產生或更新當前分支的 GitHub Pull Request 描述時使用。讀取分支差異和提交訊息,撰寫結構化的 PR 內容(摘要、變更、測試),並可透過 gh CLI 建立或更新 PR。

opendirectory 是什麼?

此技能會自動為當前 Git 分支產生結構化的 GitHub Pull Request 描述。它首先檢查 `gh` CLI 的驗證狀態與 Git 環境,然後收集分支差異、提交訊息和完整 diff。為確保品質,它會參考 `references/pr-format-guide.md` 中的格式指南,並遵循嚴格的寫作風格(主動語態、現在式、簡潔具體)。最後,它會將描述呈現給使用者,並依指示建立新 PR、更新現有 PR,或僅輸出內容。支援所有使用 GitHub 與 `gh` CLI 的平台(如 Claude Code、Cursor、Codex)。

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

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

在你喜歡的 AI 中提問

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

說明文件

PR 描述撰寫器

讀取當前分支的差異,並撰寫完整的 GitHub Pull Request 描述。使用一個指令即可建立或更新 PR。

寫作風格

所有產生的 PR 描述均套用以下規則:

  • 使用主動語態。例如「新增快取層」而非「快取層已被新增」。
  • 摘要使用現在式(「新增快取層」),背景說明使用過去式(「舊方法在每次渲染時造成 N 個請求」)
  • 使用簡短句子,一個想法一個項目符號
  • 不使用長破折號 — 請改用逗號或句號
  • 不使用贅詞:「此 PR」、「此提交」、「根據討論」
  • 具體勝過概括:「將 p95 延遲從 800ms 降低至 90ms」優於「改善效能」

步驟 1:檢查設定

確認 gh 已通過驗證:

gh auth status

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

確認當前目錄是 Git 儲存庫且有活動分支:

git branch --show-current

如果處於分離 HEAD 或沒有分支,請停止並詢問使用者想要描述哪個分支。


步驟 2:收集差異上下文

執行以下三個指令以建立上下文:

檔案摘要(變更了什麼):

git diff main...HEAD --stat

提交訊息(為什麼變更):

git log main...HEAD --oneline

完整差異(如何變更):

優先使用 origin/main(始終為最新),若無則使用本地 main,再來是 master:

if git rev-parse origin/main &>/dev/null 2>&1; then
  BASE=origin/main
elif git rev-parse main &>/dev/null 2>&1; then
  BASE=main
else
  BASE=master
fi
git diff $BASE...HEAD

如果差異非常大(超過 500 行),僅讀取 --stat 摘要與提交訊息。同時讀取差異的前 200 行,以瞭解主要變更,而不處理整個輸出。

同時檢查是否有現有的 PR,並讀取其當前標題/內容:

gh pr view --json title,body,baseRefName 2>/dev/null

步驟 3:閱讀格式指南

在撰寫任何內容之前,完整閱讀 references/pr-format-guide.md。內化:

  • 必要的章節及其順序
  • 如何撰寫每個章節
  • 應包含與應省略的內容
  • 測試章節的格式

步驟 4:產生描述

使用 references/pr-format-guide.md 中的格式撰寫 PR 描述。

規則:

  • 變更章節中的每個項目符號都必須對應到差異中的某處
  • 不要憑空發明未由程式碼變更暗示的測試步驟
  • 如果某個章節沒有相關內容,則完全省略(不要寫「無」或留空)
  • 螢幕截圖章節:僅當差異中顯示有 UI 變更時才包含
  • 如果提交訊息解釋了「為什麼」,請在摘要中使用該上下文

品質檢查點: 在呈現之前,請驗證:

  • 摘要為 1-2 句,主動語態,無贅詞
  • 每個變更項目符號都具體且對應到差異
  • 沒有憑空發明的指標或結果
  • 測試步驟是可操作的(他人可以遵循)
  • 任何一行都沒有使用長破折號

步驟 5:建立或更新 PR

向使用者呈現描述,並詢問:「準備好建立 PR、更新現有 PR,還是僅輸出?」

建立新的 PR:

透過標準輸入傳遞內容,以安全處理反引號、引號和換行:

gh pr create --title "TITLE_HERE" --body-file - << 'EOF'
BODY_HERE
EOF

根據提交訊息和差異摘要建議一個標題。標題應使用祈使語氣,且長度不超過 72 個字元:「為使用者 session 查詢新增 Redis 快取」而非「已新增快取」

更新現有的 PR:

gh pr edit --body-file - << 'EOF'
BODY_HERE
EOF

僅輸出: 在程式碼區塊中呈現標題和內容,供手動複製貼上。

建立或更新後,確認:「PR 描述已更新。請在以下網址檢視:[URL]」

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

Takes a GitHub PR URL or the current branch and writes a plain-English explanation of what it does and why, then posts it as a PR comment. Use when asked to explain a PR, summarize a pull request, write a plain-English description of a PR, add a summary comment to a PR, or understand what a PR changes. Trigger when a user says "explain this PR", "summarize this pull request", "what does this PR do", "add a comment explaining the PR", or shares a GitHub PR URL and asks what it does.

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

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

相關技能