Community写作与编辑github.com

Varnan-Tech/opendirectory

接受一个 GitHub PR URL 或当前分支,生成一份纯英文解释(做什么和为什么),然后将它作为 PR 评论发布。

opendirectory 是什么?

该技能自动为给定的 GitHub Pull Request 生成结构化的纯英文解释,并直接以评论形式发布。它首先确认 gh 工具已认证,然后获取 PR 元数据、差异(diff)和现有评论。如果差异超过 400 行,技能会智能地只读取总结统计和前 200 行,以节省上下文窗口。接着,它严格遵循规则撰写两段解释:第一段描述技术变更(具体文件、函数、变化方向),第二段说明业务影响(受益方、解决的问题)。发布前会自动执行质量检查(自 QA),确保无虚构指标、无填充短语、字数不超过 150。该技能适用于 Cursor、Claude Code、Codex、GitHub Copilot 等支持 gh 的 AI 编码工具,显著减少人工审查 PR 的认知负担,让团队成员快速理解变更的实质。

兼容平台✓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 URL(例如 https://github.com/owner/repo/pull/123)
  • 当前仓库中的 PR 编号(例如 #123)
  • 关键词 "current",用于使用当前分支的 PR

如果没有输入,询问:“我应该解释哪个 PR?请分享 URL、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 步:编写解释

写两段话。在写之前阅读每条规则。

第 1 段:它做了什么(技术方面)

  • 每个主要更改用一个句子描述
  • 指出发生更改的具体文件、函数或系统
  • 如果差异中明确,说明变化前后的状态
  • 如果差异中出现了具体数字,请包含这些数字(删除的行数、删除的表、添加的端点)
  • 使用主动语态、现在时

示例:

将 auth.middleware.ts 中的内存会话缓存替换为基于 Redis 的缓存(src/cache/redis.ts)。向新的 Redis 模块添加 get、set 和 invalidate 方法,并为 UserService.getById() 包装了 5 分钟的 TTL。移除了仅限于单个进程并导致跨多个实例会话漂移的基于 Map 的缓存。

第 2 段:为什么重要(业务/产品影响)

  • 谁受益,如何受益
  • 解决了什么问题或降低了什么风险
  • 如果提交消息中包含“为什么”,请使用该上下文
  • 如果差异或提交中没有明确的“为什么”,请省略此段,而不是猜测

示例:

在负载下访问 /api/me 端点的用户会跨服务器实例获得不一致的会话数据,导致间歇性的 401 错误。此更改使会话状态在所有实例中保持一致,并通过消除每个身份验证请求的一个查询来减少数据库负载。

两段的规则:

  • 不要使用破折号——改用逗号或句号
  • 不要用填充词:“这个 PR”、“这个更改”、“可以看到”
  • 不要编造结果。只陈述在差异或提交消息中能直接看到的影响
  • 如果 PR 是纯重构且没有行为变化,则明确说明:“将 X 重构为 Y,观察到的行为没有变化。”
  • 总字数少于 150 字

第 4 步:自我质量检查

在发布之前,请检查:

  • 第 1 段指出了差异中的具体文件或函数
  • 没有编造的指标或结果
  • 没有破折号
  • 没有填充短语
  • 总字数少于 150 字
  • 如果没有明确的“为什么”,则省略第 2 段而非猜测

在发布前修正任何违规。


第 5 步:作为 PR 评论发布

向用户展示解释。询问:“准备好将此作为 PR 评论发布,还是您想先编辑它?”

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

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

发布后:“评论已添加。查看地址:[第 2 步中的 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

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.

相关技能