
Page Gate — Quote Three Weak Spots on a Sales Page
Paste a sales page and Claude's findings, and get back exact quotes of three kinds of weak spots, each with a one-line suggestion. #Writing
Paste a sales page and Claude's structured findings. Get source text grouped into three finding types, with a one line suggestion for each.
You send: sales page text and Claude's findings as UTF-8 JSON. You get: Markdown, JSON, or CSV findings after checks that each quote is a literal run in the page, each finding type is allowed, and each suggestion is concise and on one line.
The checker validates structure and source evidence. It cannot determine whether a page is weak, whether a claim is actually unsupported, or whether a suggestion is good. Claude supplies those judgments; this tool does not rewrite the page.
Python 3.9 or newer. Standard library only. No account, API key, network, or browser is used.
Quick start
python3 scripts/page_gate.py examples/sales_page.json
The output is the same as the sample output included in the package.
Options
--format: Select output structure —markdown(default),json,csv--category: Keep one finding type —offer_unclear,cta_buried,unsupported_claim--limit: Maximum findings to print — 1–500, written with at most six ASCII digits; default 100--line-numbers: Number Markdown findings — Markdown only--output: Save the result as UTF-8 — Any writable new file path
The JSON input has exactly two top level keys: source and findings. source is the complete sales page as a string. Each finding has exactly category, quote, and suggestion.
{
"source": "The full page sentence goes here.",
"findings": [
{
"category": "offer_unclear",
"quote": "The full page sentence goes here.",
"suggestion": "List what is included."
}
]
}
Finding types
offer_unclear: What the buyer receives is unclearcta_buried: The instruction to apply or buy is hard to findunsupported_claim: A claim appears without support stated on the page
Quotes must occur as one uninterrupted text run in the source; they may be a phrase or cross a sentence or line boundary. Quotes must contain at least one letter or digit and are limited to 1,000 characters. Suggestions must fit on one line and stay within 25 words and 240 characters. The checker does not infer whether a claim is unsupported or verify that Claude chose the right category.
Examples
python3 scripts/page_gate.py examples/sales_page.json --format json
python3 scripts/page_gate.py examples/sales_page.json --category cta_buried --line-numbers
python3 scripts/page_gate.py examples/sales_page.json --format csv --limit 2 --output findings.csv
Errors
Bad input returns exit code 2 with one error: line and no traceback. The input must be UTF-8 JSON and no larger than 2,000,000 bytes. Empty input, unknown categories, extra fields, absent or punctuation-only quotes, multiline suggestions, and unwritable output paths are rejected. Existing files are left untouched. CSV cells beginning with =, +, -, or @ are prefixed with an apostrophe.
Tests
python3 -m unittest discover -s tests -v
The tests use Python's unittest and the standard library.


