提示词库

GitHub提示词

用于 GitHub 工作流的提示词:拉取请求描述、Issue 分诊,以及根据已合并的变更生成发布说明。

提示词是英文的,即它们的编写和测试所用的语言。这些页面上的说明和指引已翻译。

  • pull requests
  • code review
  • documentation
100/100 · 154 token

拉取请求描述

根据 diff 编写拉取请求描述:改了什么、为什么改,以及如何测试。

适用场景: 你完成了一项变更,想要一份评审者不必先读完每一行就能着手处理的描述。

prompt
You are a senior software engineer writing a pull request description.

## Task
Write a pull request description for the diff below.

## Requirements
- Describe only changes present in the diff.
- Explain why the change was made using the context provided; write "reason not provided" when the context does not say.
- List the steps a reviewer follows to test the change.
- Name any migration, configuration change, or breaking change.
- Keep the whole description under 250 words.

## Output format
Return markdown with four sections: Summary (2 sentences), Changes (bulleted list), How to test (numbered list), and Notes for reviewers (bulleted list).

## Input
<diff>
{{diff}}
</diff>

<context>
{{context}}
</context>

变量

{{diff}}
该分支的 git diff 输出。
{{context}}
变更对应的 Issue 或原因。

示例输入

diff: adds a retry wrapper around the payment client and a config value PAYMENT_MAX_RETRIES.
context: payments fail when the provider returns 503.

示例输出

## Summary
Retries payment requests that fail with 503. The retry count is configurable.

## Changes
- Add `withRetry` in payment/client.ts
- Add `PAYMENT_MAX_RETRIES` (default 3)

## How to test
1. Set the provider mock to return 503 twice...

仅为示意:为展示预期的形式而编写,并非由模型生成。

  • release notes
  • changelog
  • documentation
100/100 · 162 token

根据已合并的拉取请求生成发布说明

把已合并的拉取请求归类,整理成面向软件使用者的发布说明。

适用场景: 准备发布版本,想把一串拉取请求标题变成用户能读懂的说明。

prompt
You are a maintainer writing release notes for users of the project.

## Task
Write release notes from the list of merged pull requests below.

## Requirements
- Group entries under Added, Changed, Fixed, and Removed.
- Rewrite each entry to say what changed for the user, in one sentence.
- Keep the pull request number at the end of each entry.
- Put breaking changes first under a "Breaking changes" heading, with the action users must take.
- Leave out entries that only change tests, tooling, or internal refactoring.

## Output format
Return markdown with one heading per group that has entries and a bulleted list under each. Do not include empty groups.

## Input
<version>
{{version}}
</version>

<pull_requests>
{{pull_requests}}
</pull_requests>

变量

{{version}}
要发布的版本号。
{{pull_requests}}
已合并的拉取请求,每行一个,附编号和标题。

示例输入

version: 2.4.0
pull_requests: #412 feat: add CSV export; #415 fix: crash on empty project; #418 chore: bump eslint.

示例输出

## Added
- Export any report as a CSV file. (#412)

## Fixed
- Opening a project with no items no longer crashes the app. (#415)

仅为示意:为展示预期的形式而编写,并非由模型生成。

改成你的

修改需求以符合你的标准,然后检查结果。提示词分析器会在你输入时重新评分,优化器会在不丢失任何需求的前提下去掉冗词,安全扫描器会在你发送给模型之前标出密钥和个人数据。

更多类别