sherwinvishesh/OpenGSO
Make any website readable by AI agents. Score a site 0-100, generate a Markdown twin of every page plus robots.txt, llms.txt and sitemap.xml, and serve the twin at the same URL. Framework-agnostic, on npm.
What it solves
AI agents like ChatGPT, Claude, and Perplexity fetch webpages the way curl does: they never execute JavaScript, and every byte of HTML markup costs tokens. A typical modern site can deliver 13,000+ bytes to an agent where most of it is script tags and the real article appears twice. That makes pages look bloated, slow, or nearly empty to AI systems.
OpenGSO fixes this by giving every page a markdown twin. Agents get the clean twin; humans get the normal page — served from the same URL, with no redirect.
How it works
Three commands do the whole job.
- test — crawls your site the way an AI agent would and scores it from 0 to 100, explaining the reason for every point missed. Seven checks make up the score (crawler access, sitemap, server-rendered content, speed, no opt-out tag, HTTPS, and a working HTML page). Fifteen additional suggestions are tracked as "adopted" but never change the number, so a well-built site can score 100 before installing anything.
- generate — writes a markdown twin of every page plus robots.txt, llms.txt, and sitemap.xml. It extracts content server-side using jsdom purely as a parser; page scripts are never executed. The structural parts run fully offline. An optional AI polish tier is the only feature that calls a model.
- prod — a zero-dependency middleware that looks at each incoming request. If it's an AI agent (for example, Accept: text/markdown), it answers with the markdown twin. If it's a browser or a search crawler, it answers with the normal HTML. The same URL serves both without a redirect, using Vary: Accept so a CDN can cache the two formats separately.
Headers are the contract: X-Markdown-Tokens tells an agent the token cost before reading, an ETag supports conditional requests, Link on the HTML points agents to the twin, and X-Robots-Tag: noindex keeps search engines away from the markdown. Search crawlers like Googlebot and Bingbot always get the HTML, and unknown bots are never blocked.
Who it's for
Web developers and site owners who want their content to be readable by AI agents without rebuilding their stack. It works with Next.js, Express, Fastify, SvelteKit, Astro, Vite, GitHub Pages, and many others — any framework that fits one of five server shapes (Next middleware, Node middleware, fetch-based handlers, Vite plugin, or edge runtime). A static folder of HTML files needs no server at all.
Highlights
- In the bundled demo, a site scores 65, then
opengso generatewrites six files in 126 ms, and the same URL scores 100 with 14 of 15 suggestions adopted. - Ships as five small npm packages (opengso, opengso-cli, opengso-testing, opengso-generate, opengso-prod) so you install only what you need; the server-side middleware has zero dependencies.
- No account, no telemetry, no headless browser; the free tier and all structural checks run entirely offline.
- 25 AI provider options for the optional content-polish tier, including local ones like Ollama and LM Studio that need no key.
- Every failing check has a copy button for a Claude Code fix prompt, and
--promptprints one directly.
Related
- Project
- Project
- Project
- Project