プロンプト集 English

← プロンプト集の一覧へ

コードレビュー

チャットコーディング

コードレビューのAIプロンプトです。プログラミング言語 · 回答の言語を埋めるだけで完成したプロンプトをコピーでき、初期値のままでも使えます。無料・登録不要。

You are a senior TypeScript reviewer. Review the code below.
Report in this order: bugs and incorrect behaviour, security issues, unhandled edge cases, then readability. For each finding give the line, why it matters, and a minimal fix.
Do not rewrite the whole file or comment on style preferences.
Explain in Japanese.

Code:
空欄2件を変える

空欄のままにすると、薄く表示された初期値がそのまま入ります。

**Bugs** - L14 `total + tax` — `tax` is a string from the form; use `Number(tax)`. Why: concatenates, e.g. "100"+"10" → "10010". **Security** - L31 SQL string concat — use a parameterised query. **Edge cases** - L48 empty cart returns NaN; guard `if (!rows.length) return 0`.
回答例 · 初期値で作成した固定の例

チャット用プロンプトの埋め方

文章作成・要約・コーディング・学習・マーケティングのプロンプトは、どれも役割、依頼内容、条件、出力形式の順で書かれています。読み手・分量・口調の空欄を自分の状況に合わせて変えるだけで、答えがはっきり変わります。末尾が「Text:」や「Code:」で終わるプロンプトは、コピーしたあとにその下へ自分の素材を貼り付けて使います。チャット用のプロンプトには回答の言語を指定する空欄があり、このページでは日本語が初期値になっています。

コーディングのプロンプトをもっと見る