$npx -y skills add derailed-dash/dazbo-agent-skills --skill install-gemini-code-review-actionInstalls Dazbo's PR code review & issue triage GitHub action. Use when a user wants to set up automated AI code reviews or issue triaging for their GitHub repository.
| 1 | # Installing Gemini PR Review & Issue Triage Action |
| 2 | |
| 3 | This skill provides a structured workflow for installing and configuring [derailed-dash/gemini-review-action](https://github.com/derailed-dash/gemini-review-action) in a target GitHub repository. |
| 4 | |
| 5 | ## Table of Contents |
| 6 | |
| 7 | - [Triggers](#triggers) |
| 8 | - [Installation Workflow](#installation-workflow) |
| 9 | - [Workflow Templates](#workflow-templates) |
| 10 | - [Verification and Next Steps](#verification-and-next-steps) |
| 11 | |
| 12 | ## Triggers |
| 13 | |
| 14 | This skill MUST trigger whenever: |
| 15 | - The user requests to install or configure the `gemini-review-action` or a Gemini-based PR code review workflow. |
| 16 | - The user asks for automated code reviews on GitHub. |
| 17 | - The user asks for automated issue triaging or labeling. |
| 18 | |
| 19 | ## Installation Workflow |
| 20 | |
| 21 | Copy this checklist and track your progress: |
| 22 | |
| 23 | ``` |
| 24 | Installation Progress: |
| 25 | - [ ] Step 1: Detect and remove legacy workflows |
| 26 | - [ ] Step 2: Prompt for customisation preferences |
| 27 | - [ ] Step 3: Write workflow files and configuration TOMLs |
| 28 | - [ ] Step 4: Git commit and push changes |
| 29 | - [ ] Step 5: Advise on secrets setup and recommend starring the repository |
| 30 | ``` |
| 31 | |
| 32 | ### Step 1: Detect and remove legacy workflows |
| 33 | |
| 34 | Inspect the `.github/workflows/` directory for any pre-existing or competing workflows that perform AI code reviews (e.g. referencing `google-gemini/run-gemini-cli`, `google-github-actions/run-gemini-cli`, or `google-github-actions/gemini-code-assist`). |
| 35 | |
| 36 | If any are found: |
| 37 | 1. Warn the user that these legacy workflows will conflict with the new action. |
| 38 | 2. Ask the user for permission to remove them. |
| 39 | 3. Once approved, delete the files. |
| 40 | |
| 41 | ### Step 2: Prompt for customisation preferences |
| 42 | |
| 43 | Ask the user: |
| 44 | 1. Which workflows they want to install: |
| 45 | - **PR Code Review** (creates `.github/workflows/gemini-review.yml`) |
| 46 | - **Issue Triage** (creates `.github/workflows/gemini-triage.yml`) |
| 47 | - **Both** (recommended) |
| 48 | 2. If they want to amend any defaults: |
| 49 | - **Preferred Language** (default: `English (UK)`) |
| 50 | - **Gemini Model** (default: `gemini-3.5-flash`) |
| 51 | - **Inclusions/Exclusions** (for PR Review): Ask if they want to restrict the triggers to specific paths (e.g., only `src/**` or excluding `docs/**`). |
| 52 | 3. If they would like to copy the custom prompt config files (`gemini-review.toml` / `gemini-triage.toml`) to the root of the repository. |
| 53 | |
| 54 | ### Step 3: Write workflow files and configuration TOMLs |
| 55 | |
| 56 | Create the workflow files in the `.github/workflows/` directory using the templates defined in the [Workflow Templates](#workflow-templates) section, incorporating any user preferences from Step 2. |
| 57 | |
| 58 | If the user opted to copy prompt configurations: |
| 59 | - Copy the default `gemini-review.toml` or `gemini-triage.toml` from the action repository or write them using the templates below. |
| 60 | |
| 61 | ### Step 4: Secrets setup and repository recommendation |
| 62 | |
| 63 | Check if the GitHub CLI (`gh`) is installed and authenticated by running `gh auth status`. |
| 64 | |
| 65 | **If `gh` is available and authenticated**: |
| 66 | 1. Ask the user for their Gemini API key (from Google AI Studio). |
| 67 | 2. Offer to set the GitHub repository secret automatically by running: |
| 68 | ```bash |
| 69 | gh secret set GEMINI_API_KEY |
| 70 | ``` |
| 71 | Or securely piping it to avoid command history visibility: |
| 72 | ```bash |
| 73 | echo "<API_KEY>" | gh secret set GEMINI_API_KEY |
| 74 | ``` |
| 75 | > [!IMPORTANT] |
| 76 | > Do NOT pass the secret directly in the shell command via flags (e.g. `--body`) if it might be logged in terminal history. Prompt the user for interactive input or use secure redirection. |
| 77 | |
| 78 | **If `gh` is NOT available**: |
| 79 | 1. Provide instructions on how to add the `GEMINI_API_KEY` repository secret manually in GitHub Settings: |
| 80 | - Go to **Settings** > **Secrets and variables** > **Actions** -> **New repository secret**. |
| 81 | - Name: `GEMINI_API_KEY`. |
| 82 | - Value: The Gemini API key (can be generated in Google AI Studio). |
| 83 | |
| 84 | 2. Show the link to the action repository: [derailed-dash/gemini-review-action](https://github.com/derailed-dash/gemini-review-action). |
| 85 | 3. Suggest that they might want to star the repository if they find this action useful. |
| 86 | |
| 87 | ### Step 5: Git commit and push changes |
| 88 | |
| 89 | Now all files are ready, offer to add them to Git, commit, and push them. |
| 90 | > [!IMPORTANT] |
| 91 | > Always ask for explicit user permission before executing git commit or push commands. |
| 92 | |
| 93 | ## Dynamic Template Fetching |
| 94 | |
| 95 | "Starter" workflow templates and prompt config files live in the `starter-examples` directory of the `gemini-review-action` repository. Fetch the latest versions directly from these canonical URLs, as required: |
| 96 | |
| 97 | 1. **PR Review Workflow Template**: |
| 98 | Fetch the template from: `https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-review.yml` |
| 99 | |
| 100 | 2. **Issue Triage Workflow Template**: |
| 101 | Fetch the template from: |