排除事項:未明確指定路徑一律詢問,並新增 --exclusions 參數

- 收緊措辭:預設檔名 .codereview.md 僅為詢問時的建議選項,
  未取得使用者明確指定前不可自行假設或直接採用
- 新增 slash 參數 --exclusions <路徑> 明確指定排除事項檔案,
  帶此旗標即視為明確指定、不再詢問
- SKILL.md / paladin.md / README 範例同步更新

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jeffery
2026-06-15 16:52:18 +08:00
co-authored by Claude Opus 4.8
parent 5a224932e2
commit 8e4f984925
3 changed files with 21 additions and 15 deletions
+7 -7
View File
@@ -144,9 +144,9 @@ rm -rf ~/.config/opencode/skills/code-review
| 助理 | headless 指令 | 執行 `code-review` skill |
| --- | --- | --- |
| Claude Code | `claude -p "<prompt>"` | `claude -p "/jsc:code-review main feature/login all"` |
| Codex | `codex exec "<prompt>"` | `codex exec '$code-review main feature/login all'` |
| Antigravity | `agy -p "<prompt>"` | `agy -p "/jsc:code-review main feature/login all"` |
| Claude Code | `claude -p "<prompt>"` | `claude -p "/jsc:code-review main feature/login all --exclusions .codereview.md"` |
| Codex | `codex exec "<prompt>"` | `codex exec '$code-review main feature/login all --exclusions .codereview.md'` |
| Antigravity | `agy -p "<prompt>"` | `agy -p "/jsc:code-review main feature/login all --exclusions .codereview.md"` |
| OpenCode | `opencode run "<message>"` | `opencode run "用攻防角色 review main 與 feature/login 的差異"` |
- Claude / Antigravity 支援 `/jsc:` 前綴,直接 `-p "/jsc:<name>"` 即可。
@@ -167,11 +167,11 @@ rm -rf ~/.config/opencode/skills/code-review
以 RPG 攻防對決方式審查 `git diff` 的程式碼審查 skill。審查範圍是兩個分支的差異,**來源分支與目標分支缺一不可**(缺漏會反問補齊)。角色分**攻擊方**(吟遊詩人=風格 🎼/法師=邏輯 🔮/盜賊=效率 ⚡/刺客=安全性 🗡️)與**防守方**(聖騎士=裁決 🛡️),每個角色定義在 `skills/code-review/roles/<role>.md`(含英文名稱/專案/個性/徽章/代表色)。攻擊方分析 diff 找出問題(問題/等級/描述/建議/檔案位置/所在行數);防守方依專案根目錄排除事項設定檔與原始碼脈絡裁決每條問題(🚫 略過/❌ 誤判/✅ 成立)。使用者可選擇單一角色、整個攻擊方、整個防守方或全部;複選時以 sub agent 並行執行。
參數格式:`<target> <source> [角色...]`(目標在前、來源在後;角色可省略,會詢問)。
參數格式:`<target> <source> [角色...] [--exclusions <排除事項檔案路徑>]`(目標在前、來源在後;角色可省略,會詢問;`--exclusions` 指定排除事項檔案路徑,省略時若選到防守方會反問)。
- **Claude Code / Antigravity**`/jsc:code-review`(反問分支與角色),或帶參數 `/jsc:code-review main feature/login``/jsc:code-review main feature/login mage``/jsc:code-review main feature/login all`
- **Codex**`$code-review main feature/login attack`(可接參數),或用 `/skills` 選單
- **OpenCode**:描述需求(如「用攻防角色 review main 與 feature/login 的差異」)自動觸發
- **Claude Code / Antigravity**`/jsc:code-review`(反問分支與角色),或帶參數 `/jsc:code-review main feature/login``/jsc:code-review main feature/login mage``/jsc:code-review main feature/login all --exclusions .codereview.md`
- **Codex**`$code-review main feature/login attack`,或指定排除事項 `$code-review main feature/login all --exclusions docs/review-rules.md`,或用 `/skills` 選單
- **OpenCode**:描述需求(如「用攻防角色 review main 與 feature/login 的差異,排除事項看 docs/review-rules.md」)自動觸發
<!-- JSC-SKILLS:END -->