remark
Markdown processor built on the unified ecosystem. remark parses Markdown to an AST (mdast), applies transform plugins, and serializes back to Markdown or to other formats via rehype (HTML). Part of the unified/remark/rehype pipeline that powers MDX, Astro content processing, and many documentation tools. Used when you need to programmatically process, transform, or analyze Markdown content.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Local library — no network access. XSS risk exists when rendering user-provided Markdown to HTML; use rehype-sanitize plugin.
⚡ Reliability
Best When
You need to programmatically transform, analyze, or lint Markdown as an AST — not just render it to HTML.
Avoid When
You just need fast Markdown to HTML conversion — use marked or markdown-it. remark's plugin architecture is overkill for simple rendering.
Use Cases
- • Process agent-generated Markdown output — extract links, headings, code blocks, and metadata programmatically
- • Transform Markdown content in agent pipelines — add frontmatter, fix links, inject content, validate syntax
- • Convert Markdown to HTML via the remark → rehype pipeline for agent-generated documentation output
- • Lint and validate Markdown documents in agent content workflows with remark-lint plugins
- • Build custom Markdown processors for agent content pipelines using the plugin-based unified architecture
Not For
- • Simple Markdown to HTML conversion — marked or markdown-it are faster and simpler for basic rendering
- • Runtime browser Markdown rendering — use marked or micromark for lightweight browser use
- • Non-JavaScript environments — remark is JavaScript/Node.js only
Interface
Authentication
Local npm library — no authentication.
Pricing
Completely free and open source under the unified collective.
Agent Metadata
Known Gotchas
- ⚠ remark v13+ is ESM-only — CJS require() is not supported; requires import() syntax or type: module in package.json
- ⚠ The remark → rehype pipeline requires both remark-rehype (bridge) and rehype-stringify — missing either causes the pipeline to not produce HTML
- ⚠ Plugin order matters critically — plugins transform the AST sequentially; wrong order produces unexpected output
- ⚠ remark parses CommonMark by default — GitHub Flavored Markdown (GFM) requires remark-gfm plugin for tables, strikethrough, and task lists
- ⚠ VFile (virtual file) is the input format for batch processing — string input works for simple cases but VFile is needed for source maps and position tracking
- ⚠ Async plugins require await or .process() (not .processSync()) — mixing sync and async processing methods causes silent data loss
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for remark.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-07.