Community写作与编辑github.com

Varnan-Tech/opendirectory

当用户要求为当前分支编写、起草、生成或更新 GitHub 拉取请求描述时使用。读取分支差异和提交消息,编写结构化的 PR 正文(摘要、变更、测试),并可选地通过 gh CLI 创建或更新 PR。

opendirectory 是什么?

该技能自动生成 GitHub 拉取请求 (PR) 描述。它首先检查 `gh` CLI 是否已认证以及当前目录是否为有效的 Git 仓库。然后,它获取分支差异(包括文件统计、提交消息和完整差异),并参考一个可选的格式指南(`references/pr-format-guide.md`)来生成结构化的 PR 正文。生成的描述遵循严格的写作规范,例如使用主动语态、保持简洁、避免填充词(如“this PR”),并确保所有变更点都可追溯到实际差异。最后,它通过 `gh` CLI 创建新 PR、更新现有 PR,或仅输出文本供手动复制。此技能通过标准化 PR 描述质量并自动化重复任务,节省开发者的时间并减少沟通错误。

兼容平台✓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 拉取请求描述。通过一个命令创建或更新 PR。

写作风格

适用于所有生成的 PR 描述:

  • 主动语态。使用“添加了 X”而不是“X 已被添加”。
  • 摘要使用现在时(“添加了缓存层”),上下文使用过去时(“旧方法导致每次渲染 N 个请求”)。
  • 短句,每个要点一个想法。
  • 避免使用破折号(em dash),改用逗号或句号。
  • 避免填充词,如“这个 PR”、“这个提交”、“根据讨论”。
  • 具体性优于概括性:“将 p95 延迟从 800ms 降低到 90ms”优于“提升了性能”。

步骤 1:检查设置

确认 gh 已认证:

git 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 并读取其当前标题/正文:

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

步骤 3:阅读格式指南

在编写任何内容之前,完整阅读 references/pr-format-guide.md。内化:

  • 必需的章节及其顺序
  • 如何编写每个章节
  • 包含与省略的内容
  • 测试章节的格式

步骤 4:生成描述

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

规则:

  • 变更章节中的每个要点都必须追溯到差异中的某处更改
  • 不要发明代码更改所未隐含的测试步骤
  • 如果某个章节没有相关的内容,则完全省略该章节(不要写“N/A”或留空)
  • 截图章节:仅在差异中可见 UI 更改时才包含
  • 如果提交消息解释了“为什么”,则在摘要中使用该上下文

质量检查点: 在呈现之前,请验证:

  • 摘要为 1-2 句,主动语态,无填充词
  • 每个更改要点都具体且可追溯到差异
  • 没有发明度量或结果
  • 测试步骤可操作(其他人可以按照执行)
  • 任何行中都没有破折号

步骤 5:创建或更新 PR

向用户呈现描述并询问:“准备好创建 PR、更新现有 PR 还是仅输出?”

创建新 PR:

通过标准输入传递正文以安全处理反引号、引号和换行符:

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

根据提交消息和差异摘要建议一个标题。标题应为祈使语气,长度不超过 72 个字符:“为用户会话查找添加 Redis 缓存”而不是“已添加缓存”。

更新现有 PR:

git 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.

相关技能