Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Routes code review requests to different AI models based on diff complexity. Complex bugs and security issues go to capable models; formatting and style issues go to fast, cheap ones. Supports bring-your-own-keys so provider costs go directly to your own accounts.
Unlike sending every review to a single model, it classifies diff complexity first and routes accordingly, cutting costs 40%+ without degrading review quality on hard problems.
When to use it
- Reviewing staged changes before committing
- Running a security audit on authentication code
- Enforcing style and naming conventions before opening a PR
- Checking a specific file for logic errors or edge cases
- Tracking AI inference costs and savings across reviews
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: /review --focus security on staged changes in src/auth.py
- 1Reads the current staged diff and extracts changed files
- 2Classifies the diff as high complexity due to authentication logic
- 3Routes the review to a capable model via the Astrai API
- 4Returns structured issues with file path, line number, severity, and suggested fix
A list of typed issues labeled critical, warning, or info, each with a line reference and concrete remediation suggestion
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.