agentleFS
MrCipherSmithMrCipherSmith/goodai-base/skills/review-greptile/SKILL.md

review-greptile

Skill0 starsChanged 5 months agoMITView on GitHub

Use when: a PR needs codebase-aware review using Greptile — an AI reviewer with full repository indexing. Unlike diff-only reviewers, Greptile understands cross-file impact across the entire codebase. Triggered by: "greptile review", "review with greptile", "review --greptile", or dispatched by review-orchestrator on PRs. Requires: PR number + GitHub/GitLab repo name. NOT for: path-mode reviews or diff without a PR number — use other review-* skills instead.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If repo is not provided, resolve from the current git remote:

    line 77
  2. Very specific:

    If pr_number is not provided and user said "review PR" without a number:

    line 86
  3. Distinctive:

    Call the Greptile MCP tool:

    line 97
  4. Very specific:

    If still pending after retries, tell the user: "Greptile review is running — check back with get_code_review(<id>)."

    line 126
  5. Very specific:

    Use prefix G- for finding IDs to distinguish Greptile findings from domain reviewer findings (F-).

    line 154
  6. Distinctive:

    After getting findings, check if Greptile has stored custom context for this repo:

    line 160
  7. Very specific:

    If custom context exists that explains or excuses a finding — mark the finding as info and note the exception.

    line 168
  8. Very specific:

    When dispatched by review-orchestrator, the prompt MAY include:

    line 209
  9. Distinctive:

    Read the context doc before reviewing.

    line 216
  10. Very specific:

    When dispatched by review-orchestrator, follow the provided reviewer-input.schema.json payload.

    line 232

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review: Greptile (Codebase-Aware)

Greptile reviews PRs with full codebase understanding — it indexes the entire repository, not just the diff. This makes it uniquely capable of detecting cross-file impact: a change in one module that breaks an assumption in another module not present in the diff.

Complementary to the domain's diff-only specialized reviewers: use both together for the most complete picture.


What Greptile Adds Over Diff-Only Reviewers

CapabilityDiff-only reviewersGreptile
Logic bugs in changed code✓✓
Cross-file impact analysis✗✓
Codebase-wide pattern violations✗✓
Detecting broken callers (downstream breakage)✗✓
Understanding project conventions from history✗✓
Custom context (team-documented exceptions)✗✓

Workflow

Greptile Review Progress:
- [ ] Step 1: Resolve repo name and PR number
- [ ] Step 2: Trigger Greptile code review via MCP
- [ ] Step 3: Poll until review is ready
- [ ] Step 4: Parse findings into unified format
- [ ] Step 5: Check custom context for known exceptions
- [ ] Step 6: Emit findings with STATUS

Input Contract

FieldRequiredDescription
pr_numberYESPull request or merge request number
repoYESFull repo name: owner/repo (e.g., MrCipherSmith/goodai-base)
remoteNogithub (default) or gitlab
branchNoPR branch name. Auto-detected if not provided.
base_branchNoBase/default branch. Auto-detected if not provided.
context_docNoPath to job context doc — read before reviewing

Step 1: Resolve Repo and PR

If repo is not provided, resolve from the current git remote:

git remote get-url origin
# Extract owner/repo from URL:
# https://github.com/owner/repo.git  →  owner/repo
# git@github.com:owner/repo.git      →  owner/repo

If pr_number is not provided and user said "review PR" without a number:

# Get current branch PR
gh pr view --json number,headRefName,baseRefName

Step 2: Trigger Greptile Review

Call the Greptile MCP tool:

mcp__greptile__trigger_code_review({
  name: "<owner/repo>",
  remote: "github",       // or "gitlab"
  prNumber: <number>,
  branch: "<PR branch>",           // optional
  defaultBranch: "<base branch>"   // optional
})

This returns a codeReviewId used to retrieve results.


Step 3: Poll for Results

Greptile reviews are async. After triggering:

mcp__greptile__get_code_review({ codeReviewId: "<id>" })

The response includes a status field:

  • pending / in_progress — wait and retry (suggest ~10s intervals, up to 5 retries)
  • completed — parse findings
  • failed — emit STATUS: BLOCKED with error message

If still pending after retries, tell the user: "Greptile review is running — check back with get_code_review(<id>)."


Step 4: Parse Findings

Normalize each Greptile finding to the domain's unified format:

### [G-NNN] <title from Greptile>

- **Severity**: <map Greptile severity to blocker | major | minor | info>
- **File**: <path>:<line>
- **Source**: Greptile (codebase-aware)
- **Problem**: <Greptile's description>
- **Cross-file context**: <if Greptile identified impact in other files — describe them>
- **Fix**: <Greptile's suggestion>

Severity mapping from Greptile:

Greptile levelDomain severity
critical / errorblocker
warningmajor
suggestion / infominor
comment / noteinfo

Use prefix G- for finding IDs to distinguish Greptile findings from domain reviewer findings (F-).


Step 5: Check Custom Context

After getting findings, check if Greptile has stored custom context for this repo:

mcp__greptile__get_custom_context({ ... })
// or search for relevant context:
mcp__greptile__search_custom_context({ query: "<topic of finding>" })

If custom context exists that explains or excuses a finding — mark the finding as info and note the exception.


Output Contract

STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
## Greptile Review — PR #<N>

### Review Scope
- Repo: `<owner/repo>`
- PR: #<N>
- Remote: github | gitlab
- Review ID: `<codeReviewId>`

### Summary
<2-3 sentences: what Greptile found, cross-file impact summary if any.>

### Stats
- blocker (G-): N  |  major (G-): N  |  minor (G-): N  |  info (G-): N

### Findings

#### Cross-File Impact (Greptile-specific)
<G-NNN findings where Greptile identified impact beyond the diff, or "None detected.">

#### Other Findings
<G-NNN findings within the diff scope.>

### Greptile Review ID
`<codeReviewId>` — use this to re-fetch results or link in PR comments.

Job Context Awareness

When dispatched by review-orchestrator, the prompt MAY include:

JOB_NAME:     <job-name>
CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md

Read the context doc before reviewing. It may contain known exceptions or intentional patterns that Greptile would flag but are acceptable.


Red Flags

RationalizationWhy it is wrong
"Greptile found nothing, so the PR is safe"Greptile complements diff-only reviewers; use both
"I'll skip polling and just return pending"Always poll at least 3 times before giving up — async reviews take time
"The custom context says this is fine, so I'll suppress the finding entirely"Document the exception as info, don't silently drop the finding
"Greptile's severity maps directly to domain severity"Always re-evaluate — Greptile's "warning" may be a blocker given the codebase context

Orchestrated Review Contract

When dispatched by review-orchestrator, follow the provided reviewer-input.schema.json payload. Return a REVIEW_RESULT object compatible with skills/review-orchestrator/reviewer-finding.schema.json, then a concise markdown summary. Keep findings evidence-based, include concrete suggested_fix for every blocker/major, and return NEEDS_CONTEXT instead of guessing when required context is missing.


Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.