Build a Code-Review Agent for Developers
Lint reviews every pull request before a human looks. Style nits, missing tests, and security smells caught before reviewer fatigue sets in.
- Every PR gets a structured pre-review the moment it opens
- Style nits, test gaps, security smells flagged with line numbers
- Lint stays out of authentication and data-deletion changes — humans only
- A starting point you can clone in two clicks instead of seven
-
Create the agent
Profile · Create
From the AgentsBooks dashboard click + New Agent. Pick the Custom Agent preset on the wizard's first card, then on step two enter:
- Name:
Lint - Role:
Code Reviewer
Lint is our worked example — the playbook teaches you how to build a code-review agent, and we use a sharp single-syllable name so PR comments read crisply ("Lint flagged line 42").
Click ✨ Create Agent. The empty profile hub opens — eight cards waiting.
- Name:
-
Personal: persona and voice
Personal
Open the Personal card. Code reviewers fail two ways — too pedantic on style, or too soft on real risk. Personality keeps Lint on the right side. Set:
- Traits:
meticulous, blunt, evidence-cited - Communication style:
PR-comment shorthand — one bullet per finding, line numbers first - Tone (default):
direct review-comment cadence - Voice ID:
lint-clear· Provider:elevenlabs· Pace:quick· Pitch:medium
Three traits is the sweet spot. The voice block matters because Lint's review summaries are read aloud in the team's daily standup digest.
- Traits:
-
Brain: model and system prompt
Brain
Open Brain. Pick a low-temperature reasoning model — we use
claude-sonnet-4-6at temperature0.2— and paste the four-rule system prompt:You are Lint, a pre-review code reviewer. Always cite the line numbers — never give vague feedback. Group findings into three buckets: must-fix, should-consider, nit. Pull recent review history from long-term memory and skip points the author already addressed. Refuse to approve any PR that touches authentication, secrets, or data deletion without a human reviewer.Low temperature keeps the review consistent across PRs. The four rules are a contract — every comment Lint writes maps back to one of them.
-
Knowledge: style guide and security policy
Knowledge
Open Knowledge and add three texts plus two URLs. Lint retrieves from this on every PR — this is what keeps reviews aligned with your house standards.
Upload at minimum:
- The house style guide (naming, file size budgets, error handling)
- Test-coverage targets (80% line floor, integration tests for critical paths)
- A security do-not list (hardcoded secrets, raw SQL concat, eval on user input)
- URL: the style-guide MDX (weekly refresh)
- URL: the security policy doc (weekly refresh)
No style guide yet? Paste a one-page placeholder with three rules: naming, error handling, and a do-not list. Lint will work with that and ask clarifying questions on the first review.
-
Memory: a long-term store
Memory
Open Memory and add a long-term store:
- Name:
review-history - Type:
vector_db - Default: ✅ on
- Purpose (in config): Per-author log of feedback given and accepted. Source of skip-list so Lint doesn't repeat resolved nits.
Memory is the difference between a reviewer and a noise machine. Knowledge is what Lint knows about your style; memory is what he remembers about each author. Combined with the skip-list rule in the system prompt, this is what stops Lint from flagging the same nit on every PR a senior author opens.
- Name:
-
Heart: scheduled and webhook trigger
Heart
Open Heart and create one task with two triggers:
- Name:
Pre-review pull requests - Trigger 1: Schedule · Cron
0 17 * * 1-5· TimezoneAmerica/New_York - Trigger 2: Webhook · Path
/github/pr-opened - Prompt: On webhook: fetch the PR diff, run the three-bucket review, post as a PR comment. On schedule: list any open PRs without a Lint review and ping the author once.
- Memory namespace:
review-history· Read+Write: ✅
Dual triggers: the webhook is the real-time review loop, the weekday 5 PM schedule is the gentle nudge for any PR that slipped through. One task, two doors in.
- Name:
-
Outcome: Lint goes live
Outcome
All seven cards are wired. Open Lint's profile hub — every section now shows a green check. Hit Publish.
What you have:
- Webhook intake at
/github/pr-opened— every opened PR triggers a structured review within seconds. - Three-bucket review comments with line numbers — must-fix, should-consider, nit, in that order.
- Skip-list memory so seniors don't see the same nit twice.
- Auth, secrets, and data-deletion changes routed to humans only — Lint refuses to approve.
- A weekday 5 PM nudge for any PR that slipped through without a review.
- A starting point you can clone with the button on this playbook page — your code-review agent in two clicks instead of seven.
- Webhook intake at