HumanKaylee/prompt-starter-pack
GitHub: HumanKaylee/prompt-starter-pack
一套经过实战检验的开发者 prompt 模板包,覆盖代码审查、调试、架构等二十个常见工程任务,兼容主流大语言模型。
Stars: 0 | Forks: 0
# Prompt 入门包
**经过实战检验的开发者 prompt 模板。** 别再从零开始写同样的 prompt 了。从这些在实际使用中提炼出来的模板开始吧。
## 适用人群
如果你是一名经常使用 AI 助手(如 Claude、GPT-4、Gemini 等)的软件工程师、技术主管或工程经理,并且希望获得**真正有效**的 prompt —— 不是泛泛的建议,而是包含变量、实践示例和真实会话调优笔记的具体模板。
如果你来到这里是为了寻找**适用于 Claude 的 prompt 模板**、**面向开发者的 ChatGPT prompt**,或是用于真实软件开发工作的 **AI 工作流模板**,请先从这份免费包开始。这些模板是为实际工程任务编写的,而不是通用的“变得更聪明”的 prompt。
## 根据你的任务从这里开始
- **代码审查 / PR 审查**:[`templates/code-review.md`](templates/code-review.md)
- **调试疑难 Bug**:[`templates/debugging-protocol.md`](templates/debugging-protocol.md)
- **架构 / 设计决策**:[`templates/architecture-decision-record.md`](templates/architecture-decision-record.md)
- **安全 / 威胁分析**:[`templates/security-review.md`](templates/security-review.md)
- **性能 / 慢查询 / 扩展**:[`templates/performance-optimization.md`](templates/performance-optimization.md)
- **Prompt 系统或 AI 原生工作**:[高级包](https://flamewulfe.gumroad.com/l/prompt-starter-pack-premium/LAUNCH9) 增加了关于 agent 设计、LLM evals、RAG 审查和 prompt 链分解的模板。
## 包含内容
涵盖最常见开发者任务的 20 个模板:
| 模板 | 用途 |
|---|---|
| [`code-review.md`](templates/code-review.md) | 在合并前获取针对代码变更的详尽、可执行反馈 |
| [`debugging-protocol.md`](templates/debugging-protocol.md) | 系统性地诊断你无法重现或理解的 Bug |
| [`refactoring-brief.md`](templates/refactoring-brief.md) | 在修改杂乱代码之前获取结构化的重构计划 |
| [`test-generation.md`](templates/test-generation.md) | 为函数、类或模块生成全面的测试 |
| [`architecture-decision-record.md`](templates/architecture-decision-record.md) | 记录包含完整背景和逻辑依据的架构决策 |
| [`commit-message.md`](templates/commit-message.md) | 根据 diff 编写清晰、规范的 commit message |
| [`pr-description.md`](templates/pr-description.md) | 编写详尽的 PR 描述以协助审查者 |
| [`incident-postmortem.md`](templates/incident-postmortem.md) | 根据事件记录起草无指责的事后分析报告 |
| [`requirements-elicitation.md`](templates/requirements-elicitation.md) | 将模糊的功能需求转化为可实现的规范 |
| [`legacy-code-explainer.md`](templates/legacy-code-explainer.md) | 理解非你编写且难以运行的遗留代码 |
| [`security-review.md`](templates/security-review.md) | 在代码发布前识别安全漏洞 |
| [`api-design-review.md`](templates/api-design-review.md) | 在实现之前审查或设计 REST/GraphQL/RPC API |
| [`performance-optimization.md`](templates/performance-optimization.md) | 识别并优先处理性能瓶颈 |
| [`documentation-generator.md`](templates/documentation-generator.md) | 生成 docstring、README、运维手册和架构文档 |
| [`database-schema-review.md`](templates/database-schema-review.md) | 审查数据库 schema 的正确性和性能 |
| [`monorepo-migration.md`](templates/monorepo-migration.md) | 规划从多个仓库安全迁移至 monorepo 的方案 |
| [`dependency-upgrade-assessment.md`](templates/dependency-upgrade-assessment.md) | 决定是否现在就进行有风险的依赖项升级 |
| [`on-call-handoff.md`](templates/on-call-handoff.md) | 在值班工程师之间顺畅地交接操作上下文 |
| [`feature-flag-strategy.md`](templates/feature-flag-strategy.md) | 为带标记的功能设计安全的发布和回滚计划 |
| [`capacity-planning.md`](templates/capacity-planning.md) | 评估系统是否能够承受预期的负载变化 |
3 个完整的实践示例,展示了从准备到结果的完整会话过程:
| 示例 | 演示内容 |
|---|---|
| [`code-review-session.md`](examples/code-review-session.md) | 在 TypeScript API key middleware 中捕获 SQL 注入及 4 个其他问题 |
| [`debugging-session.md`](examples/debugging-session.md) | 诊断导致重复数据库行的 TOCTOU 竞态条件 |
| [`adr-session.md`](examples/adr-session.md) | 在 Redis、PostgreSQL 和 JWT 之间决定会话存储方案 |
## 快速开始
**1. Clone 或下载**
```
git clone https://github.com/HumanKaylee/prompt-starter-pack.git
# 或:点击上方的 "Code → Download ZIP"
```
想先快速浏览一下?打开 [`index.html`](index.html) 获取该包的轻量级预览界面。
**2. 打开模板**
```
cat templates/code-review.md
```
**3. 填入你的变量**
每个模板都有一个 frontmatter 块,列出了你需要的变量:
```
variables:
- LANGUAGE: programming language
- CONTEXT: brief description of what the code does
- DIFF_OR_CODE: the code or diff to review
```
将 `{{VARIABLE_NAME}}` 替换为你的实际值。
**4. 粘贴到你的 AI 助手中并发送**
就这么简单。请阅读“调优笔记”部分,根据你的具体情况进行调整。
## 模板格式
每个模板都具有相同的结构:
```
frontmatter — name, use-case, variables to fill in
Prompt — the actual prompt with {{VARIABLE}} placeholders
Worked Example — a concrete example of the prompt in action
Tuning Notes — how to adjust for edge cases
```
**调优笔记**部分是大多数 prompt 合集都会忽略的地方。这才是真正的价值所在 —— 了解何时该修改 prompt、何时该将它与另一个 prompt 链式组合,以及它在什么情况下会不起作用。
## 兼容任何 LLM
这些模板是模型无关的。它们适用于:
- [Claude](https://claude.ai) (Sonnet/Opus)
- [ChatGPT](https://chatgpt.com) (GPT-4o, o1)
- [Gemini](https://gemini.google.com) (1.5 Pro, 2.0 Flash)
- 通过 Ollama 运行的本地模型(Llama 3、Mistral 等)
对于复杂任务(代码审查、调试、安全审查):请使用你最强大的模型。对于简单任务(commit message、简单的重构):更小/更快的模型就可以胜任。
## 与众不同之处
大多数 prompt 模板合集要么:
- **太通用**(“写一个请求代码帮助的 prompt”)
- **太死板**(“完全照搬这个 500 字的模板”)
这些模板是根据实际工程工作校准的。它们:
- 包含关于何时会失效的客观**调优笔记**
- 包含来自真实会话(而非捏造的演示)的**实践示例**
- 使用**变量**,让你无需重写核心 prompt 即可进行自定义
- 告诉你**不要**做什么(这通常比肯定的建议更有价值)
## 许可证
MIT — 随你怎么用,商业或非商业用途均可。注明出处不胜感激,但非必须。
*由 [HumanKaylee](https://github.com/HumanKaylee) 构建。*
标签:AI辅助开发, C2, SOC Prime, 代码审查, 后端开发, 开发工具, 提示词工程, 架构设计, 策略决策点, 网络安全研究, 调试, 防御加固