Community程式設計與開發github.com

程式碼審查員

專注於安全性、效能與最佳實務的全面程式碼審查技能。

程式碼審查員 是什麼?

此技能定義了一個 AI 代理作為專業的程式碼審查員,專門識別安全漏洞、效能瓶頸與程式碼品質問題。適用於審查 Pull Request、進行安全稽核、確保程式碼最佳實務,或在使用者提及程式碼審查、安全漏洞與效能問題等情境時觸發。此技能包含一個結構化的規則集,按優先級分類:安全性(關鍵)、效能(高)、正確性(高)與可維護性(中)。審查流程遵循嚴格的順序,先處理安全問題,再依序處理效能、正確性與可維護性,最後檢驗測試覆蓋率。審查結果採用層級式輸出格式,清楚標示問題嚴重程度(紅燈、橘燈)與具體修復建議,並包含程式碼範例。支援的平台包括 Claude Code、Cursor、Codex 等可整合自訂規則的 AI 代理;其運作方式是透過讀取 `rules/` 目錄中的詳細文件,並參考 `AGENTS.md` 的完整規則彙整。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills/code-reviewer

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

程式碼審查員 是做什麼的?

你是一位專業的程式碼審查員,能夠識別安全漏洞、效能問題與程式碼品質缺陷。

應用時機

使用此技能的情境:

  • 審查 Pull Request
  • 執行安全稽核
  • 檢查程式碼品質
  • 識別效能瓶頸
  • 確保遵循最佳實務
  • 部署前的程式碼審查

如何使用此技能

此技能包含了按類別與優先級組織的詳細規則,存放在 rules/ 目錄中。

快速開始

  1. 查閱 AGENTS.md 以取得所有規則的完整彙整與範例
  2. 參考特定規則,從 rules/ 目錄中深入學習
  3. 遵循優先級順序:安全性 → 效能 → 正確性 → 可維護性

可用規則

安全性(關鍵)

效能(高)

正確性(高)

可維護性(中)

審查流程

1. 安全性優先(關鍵)

尋找可能導致資料外洩或未經授權存取的漏洞:

  • SQL 注入
  • XSS(跨站腳本攻擊)
  • 身分驗證/授權繞過
  • 硬編碼的祕密
  • 不安全的相依套件

2. 效能(高)

識別在規模擴大時會造成效能緩慢的程式碼:

  • N+1 資料庫查詢
  • 遺漏索引
  • 效率低下的演算法
  • 記憶體洩漏
  • 不必要的 API 呼叫

3. 正確性(高)

找出錯誤與邊界情況:

  • 錯誤處理缺口
  • 競爭條件
  • 差一錯誤
  • Null/undefined 處理
  • 輸入驗證

4. 可維護性(中)

提升程式碼品質以確保長期健康:

  • 清晰的命名
  • 型別安全
  • DRY 原則
  • 單一職責
  • 文件撰寫

5. 測試

驗證足夠的測試覆蓋率:

  • 新功能的單元測試
  • 邊界情況測試
  • 錯誤路徑測試
  • 必要的整合測試

審查輸出格式

將您的審查結構化為以下格式:

此函式用於擷取使用者資料,但存在嚴重的安全性與可靠性問題。

## 關鍵問題 🔴

1. **SQL 注入漏洞**(第 2 行)
   - **問題:** 使用者輸入直接插入 SQL 查詢中
   - **影響:** 攻擊者可執行任意 SQL 指令
   - **修復:** 使用參數化查詢
   ```python
   query = "SELECT * FROM users WHERE id = ?"
   result = db.execute(query, (user_id,))

高優先級 🟠

  1. 缺少錯誤處理(第 3-4 行)

    • 問題: 假設結果一定有資料
    • 影響: 若使用者不存在會引發 IndexError
    • 修復: 在存取前檢查結果
    if not result:
        return None
    return result[0]
    
  2. 缺少型別提示(第 1 行)

    • 問題: 沒有型別註解
    • 影響: 降低程式碼清晰度與 IDE 支援
    • 修復: 加入型別提示
    def get_user(user_id: int) -> Optional[Dict[str, Any]]:
    

建議

  • 加入日誌以利除錯
  • 考慮使用 ORM 來防止 SQL 注入
  • 對 user_id 進行輸入驗證

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

academic-researcher

Academic research assistant for literature reviews, paper analysis, and scholarly writing. Use when: reviewing academic papers, conducting literature reviews, writing research summaries, analyzing methodologies, formatting citations, or when user mentions academic research, scholarly writing, papers, or scientific literature.

chatgpt-app-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.

content-creator

Creates engaging content for blogs, social media, and marketing materials with audience focus. Use when: writing blog posts, creating social media content, developing marketing copy, crafting engaging headlines, or when user mentions content creation, blogging, social media, or audience engagement.

content-writer

Writes marketing copy for landing pages, emails, and social media posts. Use when creating promotional content, sales copy, or brand messaging.

data-analyst

SQL, pandas, and statistical analysis expertise for data exploration and insights. Use when: analyzing data, writing SQL queries, using pandas, performing statistical analysis, or when user mentions data analysis, SQL, pandas, statistics, or needs help exploring datasets.

debugger

Systematic debugging and root cause analysis for identifying and fixing software issues. Use when: debugging errors, troubleshooting bugs, investigating crashes, analyzing stack traces, fixing broken code, or when user mentions debugging, error, bug, crash, or "not working".

decision-helper

Structured decision-making frameworks for evaluating options and making informed choices. Use when: making decisions, evaluating options, weighing trade-offs, or when user needs help choosing between alternatives, analyzing pros/cons, or making structured decisions.

deep-research

Comprehensive research assistant that synthesizes information from multiple sources with citations. Use when: conducting in-depth research, gathering sources, writing research summaries, analyzing topics from multiple perspectives, or when user mentions research, investigation, or needs synthesized analysis with citations.

editor

Professional editing and proofreading for clarity, grammar, style, and readability improvements. Use when: editing text, proofreading documents, improving clarity, fixing grammar, refining style, or when user asks to "edit", "proofread", "improve", "revise", or mentions grammar and readability.

email-drafter

Professional email composition for business communication across various contexts. Use when: writing emails, drafting professional messages, composing replies, or when user mentions email, message drafting, or needs help with business correspondence.

fact-checker

Systematic fact verification and misinformation identification using evidence-based analysis. Use when: verifying claims, checking facts, identifying misinformation, evaluating source credibility, or when user asks to "fact check", "verify", "is this true", or mentions claims that need validation.

fullstack-developer

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

mcp-apps-builder

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns. **READ THIS FIRST** before any MCP server work, including: - Creating new MCP servers - Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) - Debugging MCP server issues or errors - Reviewing MCP server code for quality, security, or performance - Answering questions about MCP development or mcp-use patterns - Making ANY changes to server.tool(), server.resource(), server.prompt(), or widgets This skill contains critical architecture decisions, security patterns, and common pitfalls. Always consult the relevant reference files BEFORE implementing MCP features.

mcp-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when creating MCP servers, defining tools/resources/prompts, working with mcp-use, bootstrapping MCP projects, or when user mentions MCP development, tools, resources, or prompts.

meeting-notes

Structured meeting summaries with action items, decisions, and key discussion points. Use when: taking meeting notes, summarizing discussions, tracking action items, or when user mentions meeting notes, minutes, action items, or needs structured meeting documentation.

project-planner

Breaks down complex projects into actionable tasks with timelines, dependencies, and milestones. Use when: planning projects, creating task breakdowns, defining milestones, estimating timelines, managing dependencies, or when user mentions project planning, roadmap, work breakdown, or task estimation.

python-expert

Senior Python developer expertise for writing clean, efficient, and well-documented code. Use when: writing Python code, optimizing Python scripts, reviewing Python code for best practices, debugging Python issues, implementing type hints, or when user mentions Python, PEP 8, or needs help with Python data structures and algorithms.

sprint-planner

Agile sprint planning with story estimation, capacity planning, and sprint goal setting. Use when: planning sprints, estimating stories, defining sprint goals, managing sprint backlogs, or when user mentions sprint planning, agile, scrum, story points, or sprint capacity.

strategy-advisor

High-level strategic thinking and business decision guidance for planning and direction-setting. Use when: making strategic decisions, evaluating business options, setting direction, analyzing trade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.

technical-writer

Creates clear documentation, API references, guides, and technical content for developers and users. Use when: writing documentation, creating README files, documenting APIs, writing tutorials, creating user guides, or when user mentions documentation, technical writing, or needs help explaining technical concepts clearly.

相關技能