Generate production-ready Greptile AI code review configuration for any repository. Use this skill whenever the user mentions Greptile, AI code review setup, PR review configuration, automated code review rules, or wants to set up .greptile/ config files. Also trigger when someone says "set up code review", "configure PR reviews", "add review rules", or asks about Greptile configuration — even if they don't say "Greptile" explicitly but describe wanting AI-powered PR review automation. This skill analyzes the actual repository structure and produces tailored config, not generic boilerplate.
Generate optimal Greptile AI code review configuration by analyzing the actual repository — its structure, tech stack, patterns, documentation, and team conventions — then producing tailored
.greptile/
configuration files.
What Greptile Is
Greptile is an AI code review agent that hooks into GitHub/GitLab PRs. It indexes the full codebase, reads configuration files on each PR (from the source branch), reviews changed files using LLM-powered semantic understanding, and posts inline comments, summaries, confidence scores, and status checks.
The critical insight: Greptile is not a linter. It uses LLMs to understand intent, architecture, and cross-file implications. Write rules that leverage semantic understanding — not rules a regex or ESLint could handle. "Service methods must not call HTTP endpoints directly — use the gateway client" is a great Greptile rule. "Use semicolons" is not.
Workflow
Follow these five phases in order. Do not skip any phase.
Phase 1: Explore the Repository
Before writing a single line of config, map the territory. Use tools to answer:
Structure — Is this a monorepo or single-service? What are the top-level directories?
Run: ls -la at root, look for packages/, apps/, services/, src/
Tech stack — What languages, frameworks, ORMs, and testing tools are in use?
— Prose rules with code examples (only if rules need narrative context)
.greptile/files.json
— Context file mappings (only if documentation exists to reference)
Child
.greptile/config.json
files — For monorepo subdirectories that need different settings
Validation checklist — run before every output:
All JSON is syntactically valid (no trailing commas, no comments)
Every
scope
is an array of strings, never a comma-separated string
ignorePatterns
is a newline-separated string (
\n
), never an array
strictness
is integer 1, 2, or 3
commentTypes
only contains:
"logic"
,
"syntax"
,
"style"
,
"info"
severity
values only:
"high"
,
"medium"
,
"low"
patternRepositories
use
org/repo
format, never full URLs
Every disableable rule has a unique
id
Every rule is specific and measurable — no vague platitudes
Every high-noise rule has a
scope
fileChangeLimit
is >= 1 (0 skips all PRs)
files.json
paths point to files that actually exist in the repo
No
.greptile/
and
greptile.json
coexistence (if migrating, note to delete old)
Output format:
For every configuration you produce, include:
File tree showing exactly which files go where
Each config file as a complete, valid JSON (or markdown) code block
Reasoning annotations after each file explaining WHY each major decision was made, referencing specific repo context
Canary test — a simple verification step to confirm the config is working
Migration notes if moving from
greptile.json
to
.greptile/
Reference Files
Read these when you need detailed specifications:
references/config-spec.md
— Complete parameter reference for all config files, data types, cascading behavior, and monorepo inheritance rules. Read this when you need to check a specific parameter's format or understand how child configs interact with parent configs.
references/anti-patterns.md
— Common mistakes, the troubleshooting reasoning chain, and the testing/verification protocol. Read this before finalizing any output to catch errors. Also useful when debugging why a Greptile config isn't working.
references/scenarios.md
— Complete example configurations for TypeScript backend, React frontend, and monorepo setups. Read these for inspiration, but never copy them verbatim — every rule must be justified by the actual repository context.
Key Gotchas (Keep in Mind)
Config is read from the source branch of the PR, not the target branch
Changes take effect on the next PR, not retroactively
ignorePatterns
skips review only — files are still indexed
includeAuthors: []
means all authors (not none)
fileChangeLimit: 0
means skip all PRs (minimum is 1)
To suppress "X files reviewed, no comments" messages, use
statusCheck: true
(not
statusCommentsEnabled: false
)
After ~10 PRs, Greptile auto-suggests rules — duplicates of existing rules may appear (this is normal)