Open source

The five checks that run before anything ships.

contentgate is the guard tooling we run on our own sites every day. Each check was written the day after the thing it checks for went live and cost something. It is now open source under MIT.

The one design rule

A guard that has never been shown to fail is decoration.

Every check ships negative tests: inputs it is required to reject. The suite runs before any verdict is reported, and a failing suite exits without saying anything about your content. A checker that cannot prove it still catches a known-bad input does not get to tell you your site is fine.

This is not theoretical. Guards written for this project have included: one that read its keyword out of the site-wide footer and therefore passed every page ever; one that ran after the step that regenerated the file it was checking; and one whose exit code was discarded by the shell pipeline it lived in, so it printed "deploy blocked" while the deploy proceeded. All three looked fine. All three were found by asking them to fail on purpose.

The five checks

Target keyword coverage

The page covers the topic and never contains the term people actually search for. Matching is literal: whitespace is never normalised, because the spaced and unspaced forms are different strings with different search volumes.

Translation drift

A translation that is no longer structurally the same document: a dropped table row, a price that changed digits, an internal link that lost its locale prefix and sends every reader back to the source-language site.

Commercial links in the body

A guide that ranks, gets read, and sends nobody anywhere, because its only commercial link lives in the call-to-action block that appears on every page. So this check reads the body only and ignores boilerplate.

Regulated performance claims

Finance, gambling and health copy gets rejected for stating outcomes as facts. The hard part is not finding the phrase, it is not firing on the sentence that exists to disclaim it.

Honest sitemap lastmod

Stamping today's date on every URL on every build is a lie told daily, and crawlers learn to ignore the field. The fix is a content hash state machine: the date moves only when the content genuinely changed.

How it is built

Two implementations. The Python CLI sits in front of a deploy, where the exit code is the contract. The MCP server lets an assistant check a page while it is being written, rather than after it is live.

Both run the same test file and are required to produce identical verdicts on every case in it. CI compares them case by case. A single disagreement means one of them has drifted, and the build stops.

Use it

MIT licensed. The Python side has no dependencies, standard library only.

git clone https://github.com/adsandcode/contentgate
cd contentgate
python -m contentgate init      # write a starting config
python -m contentgate check     # run the checks

Exit codes are the contract: 0 everything passed, 1 a guard failed on your content, 2 the guards' own negative tests failed so no verdict was given. Put it in front of your deploy and honour the exit code.

The same checks are also an MCP server, so an assistant can run them while a page is being written rather than after it is live:

npx mcp-server-contentgate

Six tools: keyword coverage, translation drift, commercial links, regulated claims, sitemap lastmod and content hashing. Every one is pure — content in, verdict out. No filesystem access, no network access, nothing written. The server runs its own negative tests at startup and refuses to start if they fail.

GitHubnpm

The write-ups behind these checks

Each of these checks came out of a problem we wrote up:

When Your Sitemap lastmod Lies Every Day Operating on Keyword Cannibalization New Site With Zero Pages Indexed Your Site May Be Burning Crawl Budget

If you would rather someone else did this

These checks are part of what we deliver. If your site needs the foundations done properly from the start, describe your situation and we will tell you straight.

Chat on Telegram
Chat on TG