Contentbit

Schema-validated Markdown content blocks — parse, validate with file:line:col diagnostics, render on any target. Built for human authors, CMSes, and coding agents that otherwise ship "almost-valid" MDX.

Open source by @agonist42 (Bastien). Site: https://contentbit.dev/ · Bookmark: Jun 2026. Source: X/@agonist42, 2026-06-11

Problem

LLM-written content looks done but breaks at edges: fake components, drifting props, almost-valid tables, invalid directive syntax. Traditional renderers fail at runtime with opaque errors. Source: X/@agonist42, 2026-06-11

Model

Markdown in, components out:

  1. Authors write directive blocks in ordinary Markdown (:::tabs, :::callout, custom blocks).
  2. Parser builds a source-mapped AST.
  3. Registry validates against schemas before render.
  4. Renderer target (React, static HTML, etc.) consumes validated tree.

Validation runs in editor, CI, or agent loop — diagnostics include code, position, and fix hints so the model can self-repair. Source: contentbit.dev, https://contentbit.dev/, 2026-06-12

Agent integration

pnpm dlx contentbit@latest init

init installs skills + AGENTS.md instructions so workflows like "write a blog post" fetch the live authoring guide, write, and validate until clean. Skills read schemas from the CLI (no duplicated schema in skill files) — custom blocks auto-discovered. Works with Claude Code, Cursor, Codex, Copilot. Source: contentbit.dev agents guide, https://contentbit.dev/docs/guides/agents/, 2026-06-12

Version snapshot

Checked 2026-06-30:

Package Latest Role
contentbit 0.5.0 CLI: validate, render, and generate LLM authoring instructions from a registry.
@contentbit/core 0.5.0 Parser, validator, source-mapped AST, and registry.
@contentbit/react 0.5.0 Headless React renderer for validated Contentbit documents.

The important routing detail is that the skill does not hard-code a block schema. The agent must ask the CLI for the live registry, author against that registry, then run validation until the diagnostics are clean. Source: npm registry via npm view, 2026-06-30

Comparison

Approach contentbit JSON Render -- Generative UI Framework
Authoring surface Markdown + directives JSON spec constrained to catalog
Validation Pre-render AST + line/col errors Schema at generation time
Best for Prose-heavy content with embedded components AI-generated UI/dashboards

Both attack LLM slop at the output layer — aligned with The Eval Loop (Slop Is an Output Problem) (measure output, gate before ship).

Quick start

See https://contentbit.dev/ — v0.2.0 announcement post is itself rendered through the library (dogfooding). Source: contentbit.dev, 2026-06-12


Timeline

  • 2026-06-11 | @agonist42 launch: open-source schema-validated Markdown blocks, validation with fix hints for agent self-repair. Demo video on bookmark. Source: X/@agonist42, 2026-06-11
  • 2026-06-12 | Wiki page from bookmark absorption (site + tweet). Source: User, 2026-06-12
  • 2026-06-30 | Deep bookmark review inspected the video demo and current packages. The video makes the key pattern explicit: "LLMs write beautiful Markdown" is insufficient; the durable unit is Markdown in, validated components out. Version snapshot: contentbit, @contentbit/core, and @contentbit/react are all 0.5.0. Source: X/@agonist42, 2026-06-11; npm registry via npm view, 2026-06-30