Github Code Review Template
- What it does: Fetches repository or directory content from GitHub and produces a structured, step-by-step code review (reasoning, positives, required changes, suggestions, test coverage analysis, conclusion).
- Best for: dev teams, engineering leads, solo developers who want consistent review feedback without running tests or accessing PR metadata
- Apps used: GitHub (get-repository-content)
- Setup time: 5 to 10 minutes
Github Code Review is a no-code, single-agent workflow that analyzes code you specify from a GitHub repository. You provide repo or directory info via the text trigger; the Code Reviewer agent uses the GitHub tool to fetch content, then produces a detailed review in a fixed format: Reasoning, Positives, Required Changes, Suggestions, Test Coverage Analysis, and Conclusion. It does not execute tests or access pull requests. This template acts as a starting point: any app, instructions, and agents can be updated as required for your own use case—simply ask Max (Agent Builder) to update the workflow as needed. Last verified from workflow config on March 2026. Includes common failure modes and fixes.
Problem this solves
- Code reviews are inconsistent or delayed; you want structured, repeatable feedback on specific files or directories.
- You need a first-pass review (structure, conventions, security, tests) without running the test suite or opening PR metadata in the tool.
- Manual review of large changes is time-consuming; an AI reviewer can surface positives, required changes, and suggestions in a consistent format.
- You want reasoning and test-coverage analysis in the same output for audit or improvement tracking.
What this agent does
This template can:
- Access and review user-specified codebase or subdirectory using the GitHub get-repository-content tool.
- Identify main features, functions, or bug fixes in the specified scope.
- Check code structure, standard conventions, and maintainability.
- Suggest additional or improved tests when it infers gaps from existing test files and instructions.
- Look for common issues: security risks, logic bugs, performance bottlenecks, documentation gaps, code smells.
- Produce a structured, sectioned plaintext review in this order: Reasoning (step-by-step analysis), Positives, Required Changes, Suggestions, Test Coverage Analysis, Conclusion.
- Reason step-by-step before any conclusions; it does not skip reasoning steps or stop after a partial review.
- Restrict analysis to repository content the user provides; it cannot execute tests or access pull request metadata.
How it works
- You provide repository and scope via the text trigger (e.g. repo URL or identifier and directory path, e.g.
[REPO_URL], reviewing changes in directory [src/]). - Code Reviewer agent receives the input and calls the GitHub tool (get-repository-content) to fetch the relevant files and directory contents.
- The agent analyzes the code step-by-step: structure, features, bugs, tests, security, performance, documentation.
- It composes the review in the required order: Reasoning (analysis steps), Positives, Required Changes, Suggestions, Test Coverage Analysis, Conclusion.
- The workflow returns the structured plaintext review; you can use it in chat, export it, or feed it into your process.
Requirements
- GitHub account and access to the repository (and, if applicable, the specific branch or path) you want reviewed.
- GitHub tool connected in SketricGen with permission to get repository content (the template uses
github-get-repository-content). - Clear trigger input: repo identifier and, optionally, directory or file scope so the agent knows what to fetch and review.
Setup guide
- Clone the template and open it in AgentSpace.
- Connect the GitHub tool node: click the node, connect your GitHub account, and ensure the allowed tool includes get-repository-content (or equivalent) for the repos you will review.
- Run Test Workflow with a sample input (e.g. your repo URL and a directory path like
src/). Confirm the agent fetches content and returns a review with all six sections in order. - If you use private repos, ensure the connected GitHub account has read access to those repositories.
- Deploy or run on demand from the Playground or API when you want a review.
Common issues and fixes
- No or partial repo content: check GitHub connection and that the account has access to the repo and path. Ensure the trigger input clearly specifies repo and directory/file scope.
- Review skips sections or reasoning: the agent is instructed to output all sections and to reason step-by-step first. If output is truncated, check model limits or simplify the scope (smaller directory).
- Agent tries to run tests or use PRs: the template does not include test execution or PR metadata; the agent is instructed to analyze only provided repository content. If your instructions were changed, restore the constraint.
- Wrong repo or branch: provide the correct repo identifier and branch/path in the trigger input so the GitHub tool fetches the right content.
Customization knobs
- Adjust the Code Reviewer agent instructions (e.g. stricter security checks, different conventions, or extra sections). Keep the output format if you rely on parsing it.
- Add more tools (e.g. linters or static analysis) if you later integrate them; the template ships with GitHub only.
- Change the model (e.g. stronger model for larger codebases) in the agent node.
Apps used
| App | What it is used for | Typical permission scope |
|---|---|---|
| GitHub | fetch repository and directory contents for analysis | get-repository-content (read repo contents) |
(Scopes vary by how you connect GitHub.)
Use cases
- Pre-PR review: Get a structured review of a directory or feature branch before opening a PR. Best for developers and tech leads.
- Onboarding review: New joiners or contractors submit a repo path and get consistent feedback on structure and conventions. Best for engineering teams.
- Security and quality pass: Surface security risks, logic bugs, and doc gaps in a fixed format for tracking. Best for maintainers and security-conscious teams.
- Test coverage check: Review includes test coverage analysis and suggestions; no test execution. Best for teams that want coverage feedback without running tests in this workflow.
- Audit trail: Reasoning and conclusion in one output for documentation or compliance. Best for regulated or quality-critical codebases.
Example prompts and outputs
Example 1: Directory review
Prompt (input): Repository at https://github.com/org/myapp, reviewing changes in directory src/auth/
Output: Code Reviewer fetches src/auth/ content via GitHub, then returns a structured review: Reasoning (steps taken), Positives, Required Changes, Suggestions, Test Coverage Analysis, Conclusion.
Example 2: Full repo scope
Prompt (input): Repo: myorg/backend, path: . (whole repo)
Output: Agent fetches repository content (subject to tool limits), analyzes structure and key areas, and returns the same six-section review. For large repos, narrowing to a directory often gives better results.
Example 3: Focus on a subdirectory
Prompt (input): Review the API layer in this repo: [repo link], directory: src/api/
Output: Review focused on src/api/: reasoning, positives, required changes, suggestions, test coverage for that area, and conclusion.
Why you need this template
- Consistent, structured reviews (same sections every time) for easier comparison and follow-up.
- No test execution or PR dependency; review is based only on repository content you specify.
- Step-by-step reasoning and test coverage analysis in one place for learning and audit.
- Editable in AgentSpace: tighten instructions, add conventions, or change model without code.
FAQs
1) Does this template run tests?
No. The agent analyzes code and infers test coverage from existing test files and instructions; it does not execute tests.
2) Can it review pull requests directly?
No. It only reviews repository contents fetched via the GitHub get-repository-content tool (files and directories). You can point it at a branch or path that corresponds to your PR changes.
3) What GitHub permission is needed?
The GitHub tool must be able to get repository content (read). Connect the tool with an account that has access to the repos you want to review.
4) Why is the output format fixed (Reasoning, Positives, etc.)?
So reviews are comparable and parseable. You can change the section names or order in the Code Reviewer agent instructions if you need a different structure.
5) Can I use it for private repositories?
Yes, if the connected GitHub account has read access to those private repos. The tool will fetch content according to that account’s permissions.
6) What if the repo or directory is very large?
The agent and tool may hit context or token limits. Prefer narrowing the scope (e.g. a single directory or feature path) for more reliable and detailed reviews.
7) Does it support other Git hosts (e.g. GitLab, Bitbucket)?
The template uses the GitHub tool only. To use another host, you would need a similar “get repository content” tool in the SketricGen marketplace and to update the agent to use it.
8) What are the main failure modes?
GitHub not connected or insufficient permissions, unclear trigger input (wrong repo/path), or very large scope (truncation). Fix by checking connection, clarifying repo and path, and narrowing scope.
9) Can I add more agents (e.g. security specialist)?
Yes. You can add another agent that consumes the review output or that runs in parallel on the same content; extend the workflow in AgentSpace and add handoffs or tools as needed.
Related templates
- Structured Output – fetch structured data (e.g. company info) for use in other workflows.
- Internal Team Support – internal Q&A from knowledge bases with a router.
- Project Manager – project planning and tracking with Linear and web search.
- Personal Ops AI Assistant – calendar, comms, and retrieval in one workflow.
- AI Receptionist – route inbound messages to Q&A, booking, or escalation.
Github Code Review
Effortlessly analyse and improve your GitHub codebases with AI-powered, step-by-step reviews.