astrai-code-review
由 beee003 提供
Coding Agents & IDEs简介
AI-powered code review with intelligent model routing — saves 40%+ vs always using the most expensive model.
描述
该技能的功能
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.
何时使用
- 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
示例工作流
User asks: /review --focus security on staged changes in src/auth.py
- 1
Reads the current staged diff and extracts changed files
- 2
Classifies the diff as high complexity due to authentication logic
- 3
Routes the review to a capable model via the Astrai API
- 4
Returns 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
前置要求
- ASTRAI_API_KEY from as-trai.com (free tier available)
- Provider API keys such as ANTHROPIC_API_KEY or OPENAI_API_KEY if using BYOK mode
安装
clawhub install beee003/astrai-code-review运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。