What custom instructions are
When an agent reviews a pull request, its system prompt is assembled in this order:1
Built-in agent prompt
The default prompt for the agent (e.g., security, logic, style).
2
Custom instructions
Your free-text instructions are appended to the system prompt, giving the agent project-specific context.
3
Diff payload
The pull request diff is provided as the final input for the agent to analyze.
Two levels, one priority
Custom instructions can be set at two levels:
How it works in practice:
- Installation-level custom instructions are appended to every built-in agent’s system prompt as a shared prefix.
- Custom agents defined in
customAgentsuse their ownpromptfield and do not receive the installation-level instructions. - To add domain-specific review logic for a repo, define a
customAgentsentry with a targeted prompt.
Examples for common stacks
Character limits
Custom instructions have the following character limits:Installation-level instructions serve as a shared prefix appended to every built-in agent prompt. Keep them concise to leave room for the diff payload in the model’s context window.
What makes a good custom instruction
Be specific, not generic
Be specific, not generic
Good: “Flag any use of
eval() or Function() constructor in client-side code.”Bad: “Find security issues.” (The agent already does this by default.)Name your stack explicitly
Name your stack explicitly
Good: “This is a Next.js 14 app using App Router. Flag any use of
getServerSideProps — we use Server Components instead.”Bad: “Follow framework best practices.” (Which framework?)Use negative examples
Use negative examples
Good: “Do NOT flag missing semicolons — our Prettier config handles that. DO flag unused imports.”Bad: “Check code style.” (Too broad, overlaps with linters.)
Keep it short
Keep it short
Instructions under 200 characters tend to produce the most focused results. Longer instructions risk diluting the agent’s attention across too many concerns.
Next steps
.mergewatch.yml Reference
Full reference for all configuration properties, defaults, and examples.
Skip Rules
Control which PRs are skipped and configure path-based and label-based rules.