Validate and browse content-md sites
A command-line tool for interacting with content-md sites. Fetch pages as an AI agent would, run compliance checks against the spec, and convert content into agent skills.
for Windows, Linux and MacOS
Fetch pages like an AI agent.
The default command sends Accept: text/markdown and prints the content-md response. Falls back to HTML on 406. Works with single URLs, lists, or entire sitemaps.
https://contentmd.org/specification/ \
https://contentmd.org/consumers/
https://contentmd.org
| Flag | Description |
|---|---|
--agent |
Raw markdown only, no size/token header |
--sitemap |
Fetch /sitemap.xml and iterate every URL in it |
--output <folder> |
Save each response as a .md file (required for multiple URLs) |
--frontmatter-only |
Send Range: x-frontmatter to fetch only the frontmatter |
--follow-redirect |
Follow HTTP redirects (reported as errors by default) |
| Flag | Description |
|---|---|
--agent | Raw markdown only, no size/token header |
--sitemap | Fetch /sitemap.xml and iterate every URL in it |
--output <folder> | Save each response as a .md file |
--frontmatter-only | Fetch only the frontmatter via Range header |
--follow-redirect | Follow HTTP redirects |
Check compliance against the spec.
The validate subcommand runs a full compliance report against a URL — content negotiation, caching headers, frontmatter fields, document structure, and more. Every check is rated pass, warn, or fail, with a score from 0 to 100.
| Check | What it verifies |
|---|---|
content-negotiation |
Server returns text/markdown for Accept: text/markdown |
vary-accept |
Response includes Vary: Accept |
frontmatter-title |
title field present and non-empty |
frontmatter-description |
description field present and non-empty |
heading-h1 |
Markdown body starts with an H1 |
frontmatter-tokens |
Frontmatter is within the ~100 token budget |
range-frontmatter |
Range: x-frontmatter returns only the frontmatter block |
title-html-match |
Frontmatter title matches the HTML <title> |
And 9 more checks — heading hierarchy, link headers, robots.txt, sitemap presence, description length, and more.
| Check | What it verifies |
|---|---|
content-negotiation | Server returns text/markdown for Accept: text/markdown |
vary-accept | Response includes Vary: Accept |
frontmatter-title | title field present and non-empty |
frontmatter-description | description field present and non-empty |
heading-h1 | Markdown body starts with an H1 |
frontmatter-tokens | Frontmatter within ~100 token budget |
range-frontmatter | Range: x-frontmatter returns only the frontmatter |
title-html-match | Frontmatter title matches HTML title element |
Validating https://contentmd.org/specification/ ...
✓ content-negotiation
✓ vary-accept
✓ frontmatter-title
✓ frontmatter-description
✓ heading-h1
✓ frontmatter-tokens
! link-header — Link header not found
! html-alternate-link — rel=alternate not set
Score: 87/100
Machine-readable output
--format json for structured output — useful in CI pipelines or when comparing reports over time.
Snapshot and diff
--save baseline.json and compare it later. Useful for tracking compliance regressions as a site evolves.
CI-friendly Markdown table
--format markdown to generate a compliance table suitable for posting in pull request comments.
Skills and agent mode.
Two more built-in features: convert any content-md page into an agent skill file, and a detection mechanism that lets AI coding agents use the CLI without extra flags.
contentmd skill
Convert to agent skill
Converts a content-md page into an Agent Skill (SKILL.md) — remapping frontmatter fields and adding a source: URL reference.
# Write to a file
contentmd skill --output SKILL.md https://contentmd.org/specification/
--agent
Agent mode
All three commands support --agent. When active, output is stripped of human-readable formatting: raw markdown for browse, JSON for validate, and a structured object for skill.
Auto-detected from the environment
CLAUDE_CODE, CURSOR_AGENT, GEMINI_CLI, CODEX_SANDBOX, and more. No flag needed when running inside an AI coding agent.