Compétences code-review-ai-ai-review
📝

code-review-ai-ai-review

Sûr

使用 AI 自動化程式碼審查

將手動程式碼審查轉變為 AI 輔助的自動化品質保證。此技能結合靜態分析工具與 Claude 和 GPT 模型,以儘早發現安全漏洞、效能問題和架構問題。

Prend en charge: Claude Codex Code(CC)
🥉 73 Bronze
1

Télécharger le ZIP du skill

2

Importer dans Claude

Allez dans Paramètres → Capacités → Skills → Importer un skill

3

Activez et commencez à utiliser

Tester

Utilisation de "code-review-ai-ai-review". 審查此安全敏感的驗證模組

Résultat attendu:

  • ## 安全審查發現 **嚴重 - SQL 注入** - 檔案:`src/auth/login.ts:42` - 使用字串串接使用者輸入導致 SQL 注入 - 修復:使用參數化查詢 **高 - 弱密碼儲存** - 檔案:`src/auth/user.ts:15` - 使用 MD5 進行密碼雜湊 - 修復:使用 bcrypt 或 Argon2

Utilisation de "code-review-ai-ai-review". 分析此資料庫查詢的效能問題

Résultat attendu:

  • ## 效能分析 **高 - 偵測到 N+1 查詢** - 檔案:`src/api/users.js:28` - 迴圈包含 5 次資料庫呼叫 - 影響:100 個使用者 = 500 次查詢 - 修復:使用 JOIN 或批次載入

Utilisation de "code-review-ai-ai-review". 審查微服務架構變更

Résultat attendu:

  • ## 架構審查 **警告 - 共享資料庫** - 服務邊界被違反 - 修復:實作每個服務一個資料庫模式 **資訊 - 缺少熔斷器** - 外部 API 呼叫缺乏彈性 - 建議:新增熔斷器模式

Audit de sécurité

Sûr
v1 • 2/25/2026

All 53 static findings are false positives. The skill is a legitimate code review assistant that integrates security scanning tools (SonarQube, CodeQL, Semgrep, TruffleHog) with AI models. External commands, environment access, and network calls are all required for its core function of automated code analysis and GitHub integration.

1
Fichiers analysés
453
Lignes analysées
6
résultats
1
Total des audits
Problèmes à risque faible (6)
External Command Execution
The skill contains examples of running static analysis tools (sonar-scanner, semgrep, codeql) via subprocess. These are hardcoded tool invocations required for code review functionality - not user input injection vectors.
Environment Variable Access
Accesses GITHUB_TOKEN and ANTHROPIC_API_KEY environment variables. These are required for authenticating with GitHub API to post review comments and Claude API for AI analysis.
Network Request to External URL
Contains a reference URL to cwe.mitre.org for vulnerability documentation. This is a documentation link, not a data exfiltration endpoint.
File System Operations
Reads review-comments.json file to post comments via GitHub API. Standard file I/O for workflow automation.
Secret Detection Tools
Shows integration with TruffleHog for secret scanning. This is a defensive security tool to DETECT leaked secrets, not to exfiltrate them.
Weak Cryptographic Algorithm References
Mentions MD5 and SHA-1 in OWASP Top 10 context as vulnerabilities to DETECT (e.g., weak password hashing), not as algorithms the skill uses.

Motifs détectés

Code Execution + Network + Credentials Pattern
Audité par: claude

Score de qualité

38
Architecture
100
Maintenabilité
87
Contenu
50
Communauté
93
Sécurité
91
Conformité aux spécifications

Ce que vous pouvez construire

自動化 Pull Request 審查

與 CI/CD 管道整合以自動審查每個 pull request,發布包含安全、效能和架構回饋的結構化評論。

安全性優先稽核

使用 CodeQL 和 Semgrep 執行全面的安全分析,以識別 SQL 注入、XSS、身份驗證繞過和其他關鍵漏洞。

效能優化

在常見效能反模式進入生產環境之前偵測它們,如 N+1 查詢、缺失的資料庫索引和無界限的集合。

Essayez ces prompts

基本程式碼審查
審查此 pull request 的安全漏洞和程式碼品質問題:

PR 描述:{pr_description}

程式碼差異:
{diff}

重點關注:安全錯誤、效能問題和可維護性問題。
全面安全掃描
對此程式碼變更進行深入的安全分析。檢查以下項目:
1. SQL 注入和命令注入漏洞
2. 身份驗證和授權缺陷
3. 不安全的加密做法
4. 資料暴露風險

程式碼:
{code_snippet}

靜態分析結果:
{static_results}
架構審查
分析此程式碼變更的架構問題:
- 是否遵循 SOLID 原則?
- 依賴關係是否正確管理?
- 是否有適當的職責分離?
- 是否有任何潛在的可擴展性問題?

程式碼:
{code}

系統上下文:{architecture_summary}
整合 CI 的完整堆疊審查
結合靜態分析結果和 AI 分析執行全面的程式碼審查:

差異:
{diff}

SonarQube 問題:{sonarqube}
CodeQL 警報:{codeql}
Semgrep 發現:{semgrep}

提供具有可操作修復範例的優先發現。

Bonnes pratiques

  • 在 AI 分析之前執行靜態分析工具(CodeQL、Semgrep)以提供上下文資料
  • 使用 temperature=0.1-0.2 進行一致且確定性的安全審查
  • 設定品質閘道以阻止具有嚴重發現的 PR

Éviter

  • 僅依賴 AI 而沒有靜態分析上下文 - AI 可能會錯過已知漏洞模式
  • 設定過高的 temperature(>0.5)導致不一致或虛構的發現
  • 忽略誤報率 - 務必手動驗證關鍵發現

Foire aux questions

此技能使用哪些靜態分析工具?
此技能與 SonarQube、CodeQL、Semgrep、TruffleHog 和 GitGuardian 整合,以進行全面的安全掃描。
哪些 AI 模型最適合程式碼審查?
建議使用 Claude 4.5 Sonnet 和 GPT-4o 進行詳細分析。對於 200 行以內的快速審查,Haiku 或 mini 模型就足夠了。
使用此技能是否需要 API 金鑰?
是的,您需要 GITHUB_TOKEN 來發布評論,並且需要 ANTHROPIC_API_KEY 或 OPENAI_API_KEY 來進行 AI 分析。
此技能能否偵測程式碼中的機密資訊?
是的,它包含 TruffleHog 整合,可偵測外洩的 API 金鑰、密碼和其他敏感憑證。
CI/CD 整合如何運作?
此技能提供 GitHub Actions 工作流程範例,可執行靜態分析、呼叫 AI API 並發布結構化審查評論。
支援哪些語言?
此技能透過 CodeQL 和 Semgrep 的語言特定規則支援 30 多種語言。

Détails du développeur

Structure de fichiers

📄 SKILL.md