Create a reusable bug review for your Git branchBefore merging code, you may want separate checks for logic errors and missing tests. Grok Build can save that process as a workflow, with another agent checking the findings before you read the report.
You need a local Git repository, a branch with committed changes, and Grok Build installed and signed in. Tests require the project’s dependencies.
1. Follow the
Grok Build setup guide. In your terminal, open the project folder and run
grok. First launch opens a browser for authentication.
2. Paste this into Grok Build:
/create-workflow Create a project workflow named review-changes. Accept a target argument containing a Git diff range. Review only changes in that range, reading surrounding code when needed. Use two parallel reviewers: one for logic bugs, one for missing tests and edge cases. Then use a separate verifier to check each finding against the code and available tests. Do not edit project files or install dependencies during a review. Return one report with confirmed findings, file and line references, likely impact, and reproduction steps. Put unverified concerns in a separate section and say which tests could not run.
Answer its questions about scope. Ask it to save the workflow in the project. Grok creates and smoke-checks the workflow; that check does not prove its reviews will be correct.
3. Launch it with the comparison you need:
/workflow review-changes {"target":"origin/main...HEAD"}
This example reviews committed branch changes since the shared ancestor with
origin/main. Replace that reference if your base branch has another name, and fetch the remote first if your local reference is stale.
Use
/workflows to view progress. For a later branch, run the saved workflow again with the appropriate diff range. The
workflow documentation covers these commands.
Before acting on a finding, open the cited lines and try its reproduction steps or relevant test. A useful finding should demonstrate an actual failure; a report with no findings is not proof that the branch is bug-free.