|
| 1 | +--- |
| 2 | +name: asyncreview |
| 3 | +description: AI-powered GitHub PR/Issue reviews with agentic codebase access. Use when the user needs to review pull requests, analyze code changes, ask questions about PRs, or get AI feedback on GitHub issues. |
| 4 | +allowed-tools: Bash(npx asyncreview:*) |
| 5 | +--- |
| 6 | + |
| 7 | +# AsyncReview CLI |
| 8 | + |
| 9 | +## When to use this skill |
| 10 | + |
| 11 | +Use this skill when the user: |
| 12 | +- Asks to review a GitHub pull request |
| 13 | +- Wants AI feedback on code changes in a PR |
| 14 | +- Needs to check if a PR breaks existing functionality |
| 15 | +- Asks questions about a GitHub issue or PR |
| 16 | +- Wants to verify if something was missed in a code change |
| 17 | + |
| 18 | + |
| 19 | +## How to use this skill |
| 20 | + |
| 21 | +1. **Check prerequisites** — Verify `GEMINI_API_KEY` is set |
| 22 | +2. **Get the PR/Issue URL** — Ask user if not provided |
| 23 | +3. **Formulate a question** — Convert user's request into a specific question |
| 24 | +4. **Run the review command** — Execute `npx asyncreview review --url <URL> -q "<question>"` |
| 25 | +5. **Present the results** — Share the AI's findings with sources |
| 26 | + |
| 27 | +## Prerequisites |
| 28 | + |
| 29 | +**Before running any command, check for `GEMINI_API_KEY`:** |
| 30 | + |
| 31 | +```bash |
| 32 | +echo $GEMINI_API_KEY |
| 33 | +``` |
| 34 | + |
| 35 | +If empty or not set, ask the user to provide their Gemini API key: |
| 36 | +> "AsyncReview requires a Gemini API key. Please set `GEMINI_API_KEY` in your environment or provide it now." |
| 37 | +
|
| 38 | +Then set it: |
| 39 | +```bash |
| 40 | +export GEMINI_API_KEY="user-provided-key" |
| 41 | +``` |
| 42 | + |
| 43 | +## Quick start |
| 44 | + |
| 45 | +```bash |
| 46 | +npx asyncreview review --url <PR_URL> -q "question" # Review a PR |
| 47 | +npx asyncreview review --url <PR_URL> --output md # Markdown output |
| 48 | +``` |
| 49 | + |
| 50 | +## Core workflow |
| 51 | + |
| 52 | +1. Get PR URL from user |
| 53 | +2. Run review with specific question |
| 54 | +3. Read the step-by-step reasoning output |
| 55 | +4. Model can fetch files outside the diff autonomously |
| 56 | + |
| 57 | +## Commands |
| 58 | + |
| 59 | +### Review |
| 60 | + |
| 61 | +```bash |
| 62 | +npx asyncreview review --url <url> -q "question" # Review with question |
| 63 | +npx asyncreview review --url <url> -q "q" --output md # Markdown output |
| 64 | +npx asyncreview review --url <url> -q "q" -o json # JSON output |
| 65 | +``` |
| 66 | + |
| 67 | +**URL formats supported:** |
| 68 | +- `https://github.com/owner/repo/pull/123` |
| 69 | +- `https://github.com/owner/repo/issues/456` |
| 70 | + |
| 71 | + |
| 72 | +## Environment variables |
| 73 | + |
| 74 | +```bash |
| 75 | +GEMINI_API_KEY="your-key" # Required: Google Gemini API key |
| 76 | +GITHUB_TOKEN="ghp_xxx" # Optional: For private repos / higher rate limits |
| 77 | +``` |
| 78 | + |
| 79 | +## Example: Review a PR |
| 80 | + |
| 81 | +```bash |
| 82 | +npx asyncreview review \ |
| 83 | + --url https://github.com/stanfordnlp/dspy/pull/9223 \ |
| 84 | + -q "Does this change break any existing callers?" |
| 85 | +``` |
| 86 | + |
| 87 | +**Output shows:** |
| 88 | +- Step number |
| 89 | +- 💭 Reasoning (what the AI is thinking) |
| 90 | +- 📝 Code (Python being executed) |
| 91 | +- 📤 Output (REPL result) |
| 92 | +- Final answer with sources |
| 93 | + |
| 94 | +## Example: Check if feature exists elsewhere |
| 95 | + |
| 96 | +```bash |
| 97 | +npx asyncreview review \ |
| 98 | + --url https://github.com/owner/repo/pull/123 \ |
| 99 | + -q "Fetch src/utils.py and check if deprecated_func is still used" |
| 100 | +``` |
| 101 | + |
| 102 | +The AI will: |
| 103 | +1. Search for the file path |
| 104 | +2. Fetch the file via GitHub API |
| 105 | +3. Analyze content in the Python sandbox |
| 106 | +4. Report findings with evidence |
| 107 | + |
| 108 | +## Output formats |
| 109 | + |
| 110 | +| Format | Flag | Description | |
| 111 | +|--------|------|-------------| |
| 112 | +| Pretty | (default) | Rich terminal output with boxes | |
| 113 | +| Markdown | `--output md` or `-o md` | Markdown formatted | |
| 114 | +| JSON | `--output json` or `-o json` | Machine-readable | |
0 commit comments