编程提示词包模板

用于代码审查、重构和测试的提示词。

  • 100% 免费
  • Instant PDF download
  • 无需注册或账号
Prompt Pack
💻 Coding Prompt Pack

Prompts for code review, refactoring, tests and debugging.

8 prompts · Debugging • Refactoring • Testing

Review

Senior code review
Act as a senior engineer reviewing the diff below. Focus on: correctness, edge cases, readability, performance, and security. For each issue: quote the line, explain, suggest a fix. Ignore style nits.
Explain unfamiliar code
Explain what the code below does, step by step. Then list assumptions it makes about its inputs, and any silent failure modes.

Refactor

Extract & simplify
Refactor the function below to reduce nesting and extract clearly-named helpers. Preserve behavior exactly. Return the new code and a short note of what changed.
Add types
Add strict TypeScript types to the code below. No `any`. Prefer discriminated unions where meaningful. Return the fully typed version and list any behavior you had to infer.

Tests

Table-driven tests
Write table-driven tests for the function below using {{framework}}. Cover happy path, boundary values, invalid input, and one realistic real-world case per branch.
Bug repro test
Given the bug report below, write the smallest failing test that reproduces it. Then propose the minimal fix.

Debugging

Root cause
Here is an error and the surrounding code. First, list the 3 most likely root causes ranked by likelihood. Then tell me exactly what to log or check to distinguish between them.
Performance triage
The code below is slow on inputs of size {{n}}. Identify the dominant cost, propose two optimizations, and show the expected Big-O before/after.

如何使用

  1. 1.选择模板. 发票、简历、信函、预算表等任您挑选。
  2. 2.在线编辑. 填写您的信息,添加徽标,实时预览效果。
  3. 3.免费下载. 保存为 PDF 或直接打印。您的数据只保存在浏览器中。

常见问题

模板真的免费吗?

是的。所有模板都免费,无需注册,无需信用卡,也没有水印。

我的数据会被保存吗?

不会。一切都在您的浏览器中完成,我们不会在服务器上存储您的文档。

相关模板