Scripts2026年7月24日·1 分钟阅读

Open Code Review — AI-Powered Line-Level Code Review by Alibaba

Hybrid code review tool combining deterministic pipelines with LLM agents for precise line-level comments, built-in rulesets for NPE, thread-safety, XSS, and SQL injection, battle-tested at Alibaba scale.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Open Code Review
直接安装命令
npx -y tokrepo@latest install fa6f137b-875b-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Open Code Review is an open-source code review tool that combines deterministic static-analysis pipelines with LLM-based agents. Developed and battle-tested at Alibaba's scale, it delivers precise line-level comments on pull requests. It ships with a fine-tuned ruleset covering common defects like null pointer exceptions, thread-safety issues, XSS, and SQL injection.

What Open Code Review Does

  • Analyzes pull requests and delivers inline, line-level comments automatically
  • Combines rule-based pipelines with LLM agents for hybrid review accuracy
  • Ships with built-in fine-tuned rulesets for NPE, thread-safety, XSS, SQL injection
  • Integrates with GitHub, GitLab, and other Git hosting platforms via webhooks
  • Supports OpenAI-compatible and Anthropic LLM backends for flexible deployment

Architecture Overview

Open Code Review uses a two-stage architecture: a deterministic pipeline first runs static-analysis rules against the diff to catch well-known defect patterns, then an LLM agent reviews the remaining changes for logic errors, style issues, and architectural concerns. Results are merged, deduplicated, and posted as inline PR comments. The Go-based backend handles webhook ingestion, diff parsing, rule evaluation, and LLM orchestration in a single deployable service.

Self-Hosting & Configuration

  • Deploy with Docker Compose or build from source with Go 1.22+
  • Configure LLM provider endpoint and API key via environment variables
  • Set up webhook integration with your Git hosting platform
  • Customize rulesets by editing YAML configuration files
  • Scale horizontally behind a load balancer for high-volume repositories

Key Features

  • Hybrid review combining static rules with LLM contextual analysis
  • Line-level precision with inline comments on the exact code location
  • Built-in security rulesets tuned on real-world Alibaba codebases
  • Compatible with multiple LLM providers (OpenAI, Anthropic, local models)
  • Repository-level context awareness for more accurate reviews

Comparison with Similar Tools

  • PR-Agent — focuses on LLM-only review; Open Code Review adds deterministic pipelines for higher precision
  • SonarQube — traditional static analysis without LLM augmentation
  • CodeRabbit — closed-source SaaS; Open Code Review is fully self-hostable
  • Semgrep — pattern-based scanning without contextual LLM review
  • GitHub Copilot Code Review — vendor-locked; Open Code Review supports any LLM backend

FAQ

Q: Does it support private/self-hosted LLM backends? A: Yes, any OpenAI-compatible API endpoint works, including locally hosted models.

Q: What programming languages does it review? A: The LLM agent reviews any language; the built-in rulesets currently focus on Java, Go, Python, and TypeScript.

Q: Can I add custom review rules? A: Yes, custom rules are defined in YAML and can combine regex patterns with AST-level checks.

Q: How does it handle large diffs? A: Diffs are chunked intelligently by file and function boundaries to stay within LLM context limits.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产