/code-reviewer
Analyze project source code and generate optimization suggestions. Use when user wants code review, performance optimization advice, security hardening recommendations, or architecture improvement suggestions.
$ npx -y skills add agenvoy/Agenvoy --skill code-reviewer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/code-reviewer
Context preview
The summary Claude sees to decide when to auto-load this skill.
Analyze project source code and generate optimization suggestions. Use when user wants code review, performance optimization advice, security hardening recommendations, or architecture improvement suggestions.
SKILL.md
code-reviewer.SKILL.mdname: code-reviewer
description: Analyze project source code and generate optimization suggestions. Use when user wants code review, performance optimization advice, security hardening recommendations, or architecture improvement suggestions.
Code Reviewer
AST 驅動的專案原始碼分析,產生優化建議報告(Go / Python / JavaScript / TypeScript)。
Command Syntax
/code-reviewer [PROJECT_PATH] [OUTPUT_FILE]
Parameters (All Optional)
| Parameter | Default | Description | |-----------|---------|-------------| | `PROJECT_PATH` | Current directory | 專案根目錄路徑 | | `OUTPUT_FILE` | `.doc/code-reviewer/{yyyy-MM-dd_HH-mm}.md` | 輸出檔案路徑(相對於 `PROJECT_PATH`) |
Output Path Rules
- **預設路徑**:`{PROJECT_PATH}/.doc/code-reviewer/{yyyy-MM-dd_HH-mm}.md`
- 時間戳使用 24 小時制本地時間(例:`2026-04-25_14-30.md`)
- 不存在時自動建立 `.doc/code-reviewer/` 目錄
- **顯式覆寫**:傳入 `OUTPUT_FILE` 時直接使用該路徑;路徑若含目錄請先自行建立
- **永遠不在專案根目錄落檔** — 所有產出集中於 `.doc/code-reviewer/`
- **零問題 + 零有效建議時不落檔** — 見下節「No-Op 條件」
Examples
/code-reviewer # → .doc/code-reviewer/2026-04-25_14-30.md
/code-reviewer ./my-project # → my-project/.doc/code-reviewer/2026-04-25_14-30.md
/code-reviewer . custom.md # → ./custom.md(顯式覆寫)
---
Supported Languages
| Language | Analyzer | Dependencies | |----------|----------|--------------| | Go | `go/ast`(via `go run` helper)+ 字串掃描 | `go` ≥ 1.21 | | Python | 內建 `ast` 模組 | Python ≥ 3.10 | | JavaScript / TypeScript | 內建輕量結構掃描(brace-based 函式邊界/巢狀深度)+ 專案本地 `eslint`(可選)+ 字串掃描 | `node_modules/.bin/eslint`(可選) |
> 對應工具鏈不可用時,自動降級為字串掃描並在報告中標示。
---
Workflow
1. Detect → 偵測專案主要語言(依 go.mod / tsconfig.json / package.json / pyproject.toml)
2. Analyze → 呼叫對應分析器(AST + 字串掃描)
3. Evaluate → 計算指標並依嚴重度排序問題
4. Gate → 檢查 No-Op 條件;若命中則跳過 Generate / Save,僅輸出無需處理訊息
5. Generate → 產生優化建議報告(繁體中文),套用 Recommendation Principles 過濾
6. Save → `mkdir -p {PROJECT_PATH}/.doc/code-reviewer/` 後寫入 `{yyyy-MM-dd_HH-mm}.md`No-Op 條件(同時滿足時不產檔)
1. `issue_counts` 的 critical / high / medium / low 皆為 0 2. 套用 Recommendation Principles 後,架構 / 效能 / 安全三段**皆無有效建議**(即都會寫「未觀察到需處理事項」) 3. 未觀察到超標 metric(見 `scripts/recommendation_principles.md` 例外欄位定義)
命中時的行為:
- **不**建立 `.doc/code-reviewer/` 目錄
- **不**寫入報告檔
- 對使用者輸出一行訊息:`無需處理:{language} 專案 {name}({file_count} 檔 / {function_count} 函式)未觀察到可執行建議`
- 若使用者顯式指定 `OUTPUT_FILE`,視為強制產檔請求,仍寫入(內容可為「未觀察到需處理事項」的最小報告)
Go-Specific Preprocessing
對每個非測試 `.go` 檔案自動執行 `gofmt -s -w`(失敗時靜默略過)。
---
Step 1: Analyze Project
python3 ~/.claude/skills/code-reviewer/scripts/analyze_code.py /path/to/project
Output: JSON 包含:
- `language`: 主要語言
- `files`: 檔案列表
- `functions`: 函式資訊(名稱、簽章、行數、文件註解狀態)
- `issues`: 偵測到的問題
- `issue_counts`: 各嚴重度計數
- `metrics`: 程式碼指標(總行數、平均函式長度、最大巢狀深度)
- `dependencies`: 依賴套件
---
Reference Documents
執行各階段時讀取對應參考檔:
| 階段 | 參考檔 | 用途 | |---|---|---| | Analyze / Evaluate | [`scripts/analysis_categories.md`](scripts/analysis_categories.md) | 偵測類別、嚴重度對照 | | Generate | [`scripts/recommendation_principles.md`](scripts/recommendation_principles.md) | 建議產出的硬性規則與自我檢查 | | Save | [`scripts/output_format.md`](scripts/output_format.md) | 報告結構範本與撰寫規則 |
---
Validation Checklist
- [ ] 專案成功偵測語言並分析
- [ ] AST 工具鏈可用時使用 AST;否則降級為字串掃描並標註
- [ ] 每個問題包含檔案位置與建議
- [ ] 報告依嚴重度排序
- [ ] **已套用 `scripts/recommendation_principles.md` 自我檢查,無違反項目**
- [ ] **已檢查 No-Op 條件**;命中時跳過建立目錄與寫檔,僅輸出無需處理訊息
- [ ] 若產檔:`.doc/code-reviewer/` 目錄已建立(若不存在)
- [ ] 若產檔:報告寫入 `.doc/code-reviewer/{yyyy-MM-dd_HH-mm}.md`(或使用者指定的 `OUTPUT_FILE`)
Read more
name: code-reviewer description: Analyze project source code and generate optimization suggestions. Use when user wants code review, performance optimization advice, security hardening recommendations, or architecture improvement suggestions.
Code Reviewer
AST 驅動的專案原始碼分析,產生優化建議報告(Go / Python / JavaScript / TypeScript)。
Command Syntax
/code-reviewer [PROJECT_PATH] [OUTPUT_FILE]
Parameters (All Optional)
| Parameter | Default | Description | |-----------|---------|-------------| | `PROJECT_PATH` | Current directory | 專案根目錄路徑 | | `OUTPUT_FILE` | `.doc/code-reviewer/{yyyy-MM-dd_HH-mm}.md` | 輸出檔案路徑(相對於 `PROJECT_PATH`) |
Output Path Rules
- **預設路徑**:`{PROJECT_PATH}/.doc/code-reviewer/{yyyy-MM-dd_HH-mm}.md`
- 時間戳使用 24 小時制本地時間(例:`2026-04-25_14-30.md`)
- 不存在時自動建立 `.doc/code-reviewer/` 目錄
- **顯式覆寫**:傳入 `OUTPUT_FILE` 時直接使用該路徑;路徑若含目錄請先自行建立
- **永遠不在專案根目錄落檔** — 所有產出集中於 `.doc/code-reviewer/`
- **零問題 + 零有效建議時不落檔** — 見下節「No-Op 條件」
Examples
/code-reviewer # → .doc/code-reviewer/2026-04-25_14-30.md /code-reviewer ./my-project # → my-project/.doc/code-reviewer/2026-04-25_14-30.md /code-reviewer . custom.md # → ./custom.md(顯式覆寫)
---
Supported Languages
| Language | Analyzer | Dependencies | |----------|----------|--------------| | Go | `go/ast`(via `go run` helper)+ 字串掃描 | `go` ≥ 1.21 | | Python | 內建 `ast` 模組 | Python ≥ 3.10 | | JavaScript / TypeScript | 內建輕量結構掃描(brace-based 函式邊界/巢狀深度)+ 專案本地 `eslint`(可選)+ 字串掃描 | `node_modules/.bin/eslint`(可選) |
> 對應工具鏈不可用時,自動降級為字串掃描並在報告中標示。
---
Workflow
1. Detect → 偵測專案主要語言(依 go.mod / tsconfig.json / package.json / pyproject.toml)
2. Analyze → 呼叫對應分析器(AST + 字串掃描)
3. Evaluate → 計算指標並依嚴重度排序問題
4. Gate → 檢查 No-Op 條件;若命中則跳過 Generate / Save,僅輸出無需處理訊息
5. Generate → 產生優化建議報告(繁體中文),套用 Recommendation Principles 過濾
6. Save → `mkdir -p {PROJECT_PATH}/.doc/code-reviewer/` 後寫入 `{yyyy-MM-dd_HH-mm}.md`No-Op 條件(同時滿足時不產檔)
1. `issue_counts` 的 critical / high / medium / low 皆為 0 2. 套用 Recommendation Principles 後,架構 / 效能 / 安全三段**皆無有效建議**(即都會寫「未觀察到需處理事項」) 3. 未觀察到超標 metric(見 `scripts/recommendation_principles.md` 例外欄位定義)
命中時的行為:
- **不**建立 `.doc/code-reviewer/` 目錄
- **不**寫入報告檔
- 對使用者輸出一行訊息:`無需處理:{language} 專案 {name}({file_count} 檔 / {function_count} 函式)未觀察到可執行建議`
- 若使用者顯式指定 `OUTPUT_FILE`,視為強制產檔請求,仍寫入(內容可為「未觀察到需處理事項」的最小報告)
Go-Specific Preprocessing
對每個非測試 `.go` 檔案自動執行 `gofmt -s -w`(失敗時靜默略過)。
---
Step 1: Analyze Project
python3 ~/.claude/skills/code-reviewer/scripts/analyze_code.py /path/to/project
Output: JSON 包含:
- `language`: 主要語言
- `files`: 檔案列表
- `functions`: 函式資訊(名稱、簽章、行數、文件註解狀態)
- `issues`: 偵測到的問題
- `issue_counts`: 各嚴重度計數
- `metrics`: 程式碼指標(總行數、平均函式長度、最大巢狀深度)
- `dependencies`: 依賴套件
---
Reference Documents
執行各階段時讀取對應參考檔:
| 階段 | 參考檔 | 用途 | |---|---|---| | Analyze / Evaluate | [`scripts/analysis_categories.md`](scripts/analysis_categories.md) | 偵測類別、嚴重度對照 | | Generate | [`scripts/recommendation_principles.md`](scripts/recommendation_principles.md) | 建議產出的硬性規則與自我檢查 | | Save | [`scripts/output_format.md`](scripts/output_format.md) | 報告結構範本與撰寫規則 |
---
Validation Checklist
- [ ] 專案成功偵測語言並分析
- [ ] AST 工具鏈可用時使用 AST;否則降級為字串掃描並標註
- [ ] 每個問題包含檔案位置與建議
- [ ] 報告依嚴重度排序
- [ ] **已套用 `scripts/recommendation_principles.md` 自我檢查,無違反項目**
- [ ] **已檢查 No-Op 條件**;命中時跳過建立目錄與寫檔,僅輸出無需處理訊息
- [ ] 若產檔:`.doc/code-reviewer/` 目錄已建立(若不存在)
- [ ] 若產檔:報告寫入 `.doc/code-reviewer/{yyyy-MM-dd_HH-mm}.md`(或使用者指定的 `OUTPUT_FILE`)
Make AI actually work for you — a personal AI harness that writes and repairs its own tools, and lets Claude Code and Codex build and share them via MCP.
Other skills on agenvoy.
- /commit-generate
Generate bilingual (English + Traditional Chinese) commit message from git changes.
Open skill - /extension-install
Install an Agenvoy extension from pkg.agenvoy.com registry (browse/pick) or local tarball into ~/.config/agenvoy/tools/.extension/<type>/<name>@<version>/. Extracts tar.gz, validates manifest (email field, type api/script only), installs deps, stores keychain keys, atomically
Open skill - /extension-upload
Package a script tool under ~/.config/agenvoy/tools/script/ into a tar.gz and publish to pkg.agenvoy.com registry. Keyword picker, dep/key detection, config-stored email (ask + lowercase + persist), ask version, email verification gate, multipart upload with downgrade/unique
Open skill - /readme-generate
從原始碼分析自動生成雙語 README。當使用者請求為專案建立 README、需要從程式碼庫生成 README.md(英文)和 README.zh.md(中文)、或希望為其函式庫/套件建立一致的多語言文件時使用。
Open skill - /scheduler-skill-creator
建立並排程定時觸發的 skill。**所有新增定時/週期任務、提醒、排程通知的請求必須走此 skill**,禁止直接呼叫 add_schedule(那是 skill 已存在時的時間綁定工具,不該作為新建排程的入口)。 必定觸發的訊息特徵(任一即活化): - 相對延遲:「X 分鐘後」「X 小時後」「稍後」「待會」「等一下」 - 明確時間:「X 點」「下午 X 點」「明天 X 點」「後天」「YYYY-MM-DD HH:MM」 - 週期性:「每 X 分鐘」「每小時」「每天」「每週」「每月」「定時」「固定」 - 提醒 /
Open skill - /search-suitable-public-api
Search the curated Agenvoy public API list for an API that fits the current user need or skill context, then chain into the `api-tool-add` skill to register it under `~/.config/agenvoy/tools/api/`. Triggers when the agent lacks a tool for a data lookup (weather, currency,
Open skill

