Detailed Pr Description

biw/skills/skills/detailed-pr-description

作者 biw5b8d923883cf29dcfe0bd1c16f6e886590c7e284无许可证2 个星标收录于 2026年10月9日更新于 2026年10月9日仓库6天前更新

Assess test coverage or draft/update GitHub PR descriptions with self-contained context, risks, follow-up work, focused code references, and validation results.

AI 生成的概览

评估分支测试覆盖度,并基于证据起草或更新 GitHub PR 描述,包含风险与验证结果。

功能
该技能引导智能体评估分支测试是否足够充分,并起草或更新 GitHub 拉取请求描述。它从 git 状态、差异、提交、变更文件、测试、文档、迁移和配置中收集证据,然后生成一份自包含的 PR 正文,涵盖问题、方案、结果、风险、兼容性、边界情况和验证结果。它还可以给出覆盖度判断(充分、部分充分或不充分),并在明确授权时写入草稿文件或将正文发布到 GitHub。
适用场景
当拉取请求需要一份详尽且有证据支撑的描述时,或当你想在评审前诚实判断分支测试是否充分时使用。它适用于需要为评审者记录 PR 背景、风险和验证结果的工作流程。
运行要求
需要 git 和 GitHub CLI(gh)来检查与发布 PR,并需要仓库访问权限和访问 GitHub 的网络连接。它不附带脚本,依赖 PR 正文模板资源和可选的智能体配置。

Detailed PR Description

Resolve the outcome

  • Assessment: judge whether branch tests are strong enough; do not draft or update a PR body.
  • Draft: produce a proposed body locally or in the response; do not mutate GitHub.
  • Update/post: draft and update GitHub only when explicitly asked to update, edit, post, or publish.

Perform each requested outcome when combined. CLI access is never authorization to mutate a PR.

Workflow

  1. Identify the PR and base. Prefer gh pr view --json number,title,body,baseRefName,headRefName,url; without a PR, compare against the user-provided or repository default base. Fetch before relying on stale refs.
  2. Establish evidence from git status --short, diff stats and names, relevant commits, changed files, tests, docs, migrations, config, and generated artifacts. Treat .context/ as scratch and restate any useful fact because it is untracked. Do not rely on chat or memory for behavioral claims.
  3. Determine the problem, approach, outcome, deliberate exclusions, risk, compatibility, edge cases, operational gotchas, migrations, flags, cleanup, and reviewer focus. For close-review items, give a precise file/line reference and explanation. Every PR body must include one fenced excerpt of actual changed code, configuration, or documentation from the most review-critical hunk, capped at 15 lines; a link-only review section is insufficient.
  4. Inventory affected and added tests. Run the narrowest reliable checks, then documented broader validation when feasible. Classify coverage as sufficient, partially sufficient, or insufficient; name regressions it catches, important gaps, and concrete follow-up tests. Never claim confidence from unrun or irrelevant tests.
  5. Deliver only the authorized outcome:
    • Assessment: report evidence and coverage judgment without creating a body.
    • Draft: return the body or write .context/pr-description.md; never call gh pr edit.
    • Update/post: write .context/pr-description.md, then use gh pr edit <number> --body-file .context/pr-description.md. If posting fails, preserve the draft and explain why.

PR body

For draft/update work, load assets/pr-body.md.tmpl unless the repository has a stronger template. The body must stand alone without chat or local notes. Prefer high-signal context; add screenshots, rollout, migrations, flags, performance, accessibility, security, or release notes only when relevant. Remove an empty section only when it genuinely does not apply; use Not applicable when omitting it could hide an important review dimension.

Quality bar

  • Ground claims in code, tests, docs, commits, or command output; distinguish facts from assumptions and judgment.
  • Preserve the existing title and useful body content unless replacement is clearer.
  • Name behavior instead of saying “various fixes” or “improves behavior.”
  • Cite precise file/line references for close-review items. Include one actual changed excerpt in a fenced code block; it must be materially helpful and at most 15 lines.
  • Include failed, skipped, and unavailable validation with reasons.
  • Do not make unrelated code changes unless explicitly asked.

Final response

Report the PR URL when one exists, whether the outcome was an assessment, local draft, or posted update, validation commands/results, and the bottom-line coverage assessment. If an authorized post failed, report the draft path.

来源与署名

来源:biw/skills位于skills/detailed-pr-description提交5b8d923

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架