Check the estate before you build

Paste this block into your agent-instruction file (CLAUDE.md, AGENTS.md, …). Every MCP client this instance serves is also handed it at initialize.


searchcode

This organisation runs searchcode over its own repositories. It answers questions about code that already exists here — not about the public internet, and not from a model's memory.

Before implementing anything non-trivial, query searchcode to check whether it already exists in the estate. A retry helper, a rate limiter, a webhook verifier, an S3 upload wrapper — these have usually been written three times already, and the existing one has had the bugs taken out of it.

Ask it when you are:

How to search without wasting context

Choose a granularity first, and start with one or two terms. search's own description has the ladder, the cheapest rung first, and the query syntax. When a search comes back empty, use fewer terms and add a filter — never more terms.

Check gaps before concluding something is absent. A directory source has no commit history, so "no history" there means "we cannot answer", not "nothing changed". The tool says which it is, in the text; believe it rather than the empty list beside it.

Every result names its repository. Do not attribute code to a service it did not come from.

When you find something

Say so, with the repository and path, and prefer reusing or extending it over writing a parallel implementation. If reuse is genuinely wrong — different constraints, a dependency you cannot take — say why, so the person reading knows the duplicate is deliberate.

Generated from the documentation that ships with searchcode enterprise. Questions: ben@boyter.org