بنقرة واحدة
code-review
互動式程式碼審查:逐段檢視架構、程式品質、測試、效能。 可審查 git diff、指定檔案、或整個 PR。 觸發詞:/code-review、review code、審查程式碼、code review
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
互動式程式碼審查:逐段檢視架構、程式品質、測試、效能。 可審查 git diff、指定檔案、或整個 PR。 觸發詞:/code-review、review code、審查程式碼、code review
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Fable-based concept explorer — learn any field through parables. Picks a graduate-level concept from a user-specified domain, writes a literary fable that indirectly conveys it (the reveal comes only near the end), then follows with a clear explanation. Supports difficulty levels (-e easy, -h hard), batch mode (-3), interactive guess-first mode (-i), multiple-choice quiz (-g), cross-domain structural comparison (-x), and story styles (-s 莊子/sci-fi/aesop/detective). Use whenever the user wants to explore a field through stories, learn concepts via narrative, or says /fable-explore, /寓言, /探索, 寓言探索, 用故事學, fable explore, "tell me a fable about", "用寓言教我". Also trigger when user says "再一個" or "another" after a previous fable to continue exploring the same field.
Amanda Askell's original economics fable prompt (March 2025). Picks a niche economics principle that early undergrads wouldn't know but late grad students would, writes a strict 3-paragraph illustrative story without naming the principle, then reveals and explains it in a single closing paragraph. Faithful to the original structured format. Use when user says /fable-econ, /經濟寓言, "economics fable", "經濟學寓言", or wants to explore economics concepts through Amanda Askell's original 3+1 story format. For general-purpose fable exploration across any field, use fable-explore instead.
中文好寫作指南:提升中文寫作品質與改寫既有文章。基於 Paul Graham、余光中、王鼎鈞的寫作智慧。 使用時機: - 用戶說「潤稿」「改寫」「rewrite」「讓文字更順」 - 用戶要求「改善文筆」「寫好一點」「高品質中文」 - 用戶提供文章並要求修改或潤飾 - 需要產出高品質中文內容時 技術文件(README、API 文件、CLI 說明)請使用保守模式(見下方模式三),避免改動結構化列舉與術語連綴。 觸發詞:/good-writing、/潤稿、good writing、潤稿、改寫、rewrite、文筆、讓文字更順、技術文件潤飾、conservative 模式
去除中文文字中的 AI 生成痕跡。針對中文 AI 寫作的獨特問題設計: 時代開場白、連接詞濫用、互聯網黑話、翻譯腔、書面語過重、公式化結構、結尾套話、中國用語滲入。 使文字更自然、更有人味、更像台灣人寫的。 觸發詞:/humanizer、humanize、去除 AI 痕跡、人性化、去機器味
跨模型對抗式審查:用 Codex 審查 Claude 的計畫或程式碼產出。 異質模型產生真正的對抗張力,抓住同模型自審遺漏的問題。 自動 VERDICT 迴圈(最多 3 輪),產出結構化 issues 清單。 支援 --model 參數切換模型(預設 gpt-5.4)。 觸發詞:/codex-review、cross-review、對抗審查
電影感 AI 繪圖提示詞生成器。根據使用者的場景描述,自動選配攝影機模組、光影預設, 產出 Midjourney 與 Gemini 3 Pro 雙平台格式的 cinematic prompt。 觸發詞:/cine-shot、cinematic prompt、電影感提示詞、電影風格圖片
| name | code-review |
| description | 互動式程式碼審查:逐段檢視架構、程式品質、測試、效能。 可審查 git diff、指定檔案、或整個 PR。 觸發詞:/code-review、review code、審查程式碼、code review |
| user_invocable | true |
| argument_hint | [file path, PR number, or 'diff'] (optional, defaults to staged + unstaged changes) |
實作後的程式碼審查。四個維度逐段檢視,每個議題給選項和建議,確認後才進下一段。
定位:審查已寫好的程式碼(架構、品質、測試、效能),不是計畫審查。計畫層面的審查請用 /plan-review。
按 ARGUMENTS 判斷:
#123)→ gh pr diff 123 取得變更diff → git diff + git diff --staged 取得所有未提交變更diffgit diff main...<branch> 取得分支差異讀取變更後,摘要變更範圍(改了哪些檔案、大致做了什麼),確認審查對象正確。
變更檔案的 完整內容(不只 diff hunk)→ 全部讀取。同時讀取被 import 或依賴的關鍵檔案,理解上下文後才能給出有意義的建議。
用 AskUserQuestion 詢問:
依序執行。每段完成後用 AskUserQuestion 確認決策,再進下一段。
系統設計層面的問題。
程式碼本身的問題。
測試覆蓋與品質。
效能與資源使用。
每個議題必須包含:
file:line 或 file:SymbolName### 1. 品質:驗證邏輯重複
**問題**:`src/handlers/create.ts:23` 和 `src/handlers/update.ts:31`
有幾乎相同的 email 驗證邏輯(正則 + 長度檢查 + domain 白名單)。
**選項**:
- **A) 抽出 validateEmail() 共用函式**(建議)
成本:低 | 風險:低 | 影響:2 個檔案 | 維護:減少重複
- **B) 不處理**
成本:零 | 風險:中(改一處忘改另一處)| 影響:無 | 維護:兩份要同步
- **C) 用 zod schema 統一驗證**
成本:中 | 風險:低 | 影響:需加 zod 依賴 | 維護:宣告式更清晰
**建議 A**:最低成本消除重複,不引入新依賴。
每段結束時用 AskUserQuestion:
1A + 2B + 3A + 4A四段審查完成後,輸出:
## 程式碼審查摘要
| # | 維度 | 議題 | 決策 |
|---|------|------|------|
| 1 | 架構 | UserService 跨層耦合 | A: 透過 OrderService |
| 2 | 品質 | 驗證邏輯重複 | A: 抽出共用函式 |
| 3 | 測試 | 缺少錯誤路徑測試 | A: 補 3 個測試 |
| 4 | 效能 | N+1 查詢 | A: 改用 batch query |
### 待修項目
- [ ] `src/services/user.ts:45` — 改用 OrderService 間接存取
- [ ] `src/handlers/` — 抽出 validateEmail() 到 src/utils/validation.ts
- [ ] `src/handlers/create.test.ts` — 補充 3 個錯誤路徑測試
- [ ] `src/repositories/order.ts:67` — N+1 改為 batch query
如果所有議題都選擇「不處理」,直接輸出 LGTM 並說明原因。
使用者的審查請求見下方 ARGUMENTS:。從 Step 0 開始。