Astrai Code Review for Openclaw

An intelligent AI code review agent that optimizes costs by routing diffs to the most efficient model based on complexity.

beee003
v1.0.0
Feb 16, 2026
0
1.7k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install astrai-code-review

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install astrai-code-review using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Astrai Code Review?

Astrai Code Review is a powerful utility within the Openclaw Skills ecosystem designed to provide high-quality, automated code audits. Unlike standard tools that use a single expensive model for every task, Astrai analyzes the complexity of your code changes and routes them to the most appropriate LLM. This means a complex concurrency bug might be sent to Claude Opus, while a simple naming convention check is handled by a faster, cheaper model like Haiku.

This skill provides developer-centric feedback through structured outputs, including file paths, line numbers, and actionable suggestions. By integrating this into your development cycle, you benefit from one of the most cost-effective Openclaw Skills available, reducing your AI spend by 40% or more without compromising the depth or accuracy of your code reviews.

Astrai Code Review Use Cases

  • Automating the initial pass of pull request reviews to catch logic and concurrency errors.
  • Enforcing style guides and best practices across a repository using the strict review mode.
  • Performing dedicated security audits to identify vulnerabilities like SQL injection or hardcoded secrets.
  • Optimizing team budgets for Openclaw Skills by leveraging intelligent model routing for routine diff analysis.

How Astrai Code Review Works

  1. The skill extracts the code diff from your staged changes or a specified file.
  2. Astrai analyzes the complexity and intent of the changes (e.g., logic shift vs. style update).
  3. The system selects the optimal model from providers like Anthropic, OpenAI, or Google based on the required intelligence level.
  4. The code is processed via the Astrai routing API, utilizing either hosted models or your own provider keys in BYOK mode.
  5. A structured JSON-like response is returned to the user, detailing issues by severity and providing concrete code suggestions.

Astrai Code Review Setup

To get started with this entry for Openclaw Skills, follow these steps:

  1. Register for an API key at as-trai.com.
  2. Configure your environment variable:
export ASTRAI_API_KEY="your_key_here"
  1. (Optional) For Bring Your Own Key (BYOK) routing, add your provider keys:
export ANTHROPIC_API_KEY="your_key"
export OPENAI_API_KEY="your_key"
  1. Trigger your first review:
/review

Astrai Code Review Data Schema & Taxonomy

The skill organizes review data into a structured format for easy parsing and integration:

Attribute Description
Severity Categorized as Critical, Warning, or Info
Line Range Precise line numbers affected by the issue
Message Clear explanation of the detected problem
Suggestion Markdown-formatted code block for the proposed fix
Cost Metrics Metadata detailing the cost of the specific model routing

Astrai Code Review Advanced Features

  • Intelligent routing classification that automatically distinguishes between architectural changes and minor formatting.
  • Multiple strictness modes including standard, strict (style-heavy), and security (vulnerability-focused).
  • BYOK (Bring Your Own Key) support ensures your provider keys are encrypted and never stored on Astrai servers.
  • Comprehensive cost tracking to visualize savings compared to using a single high-tier model for all Openclaw Skills tasks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*