core-conversion-architecture

core-conversion-architecture is a skill for Claude Code from xberg-io/html-to-markdown. It costs 49 tokens per session (575 once invoked), scanned A, original, MIT.

A technical guide to the Rust code that converts HTML into Markdown. It explains the two conversion paths, element-specific converters, output options, input checks, and visitor hooks.

In plain words
What is it for?
Use it when modifying HTML-to-Markdown output, parser behavior, traversal hooks, conversion settings, input validation, or depth limits in the core crate.
Why use it?
It helps developers change conversion, parsing, or input-safety behavior without using the wrong part of the codebase or assuming that converted Markdown is safe to render. It also records important implementation boundaries and file locations.

Skill for Claude Code

Written for Claude Code: paths in frontmatter.

Good fit Use it when modifying HTML-to-Markdown output, parser behavior, traversal hooks, conversion settings, input validation, or depth limits in the core crate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xberg-io/html-to-markdown/core-conversion-architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xberg-io/html-to-markdown --skill core-conversion-architecture
Clone the repo
git clone --depth 1 https://github.com/xberg-io/html-to-markdown

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for core-conversion-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/xberg-io/html-to-markdown/core-conversion-architecture/github.svg)](https://agentmods.dev/skills/xberg-io/html-to-markdown/core-conversion-architecture)
Your own site
<a href="https://agentmods.dev/skills/xberg-io/html-to-markdown/core-conversion-architecture"><img src="https://agentmods.dev/badge/skills/xberg-io/html-to-markdown/core-conversion-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for core-conversion-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/xberg-io/html-to-markdown/core-conversion-architecture"><img src="https://agentmods.dev/badge/skills/xberg-io/html-to-markdown/core-conversion-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.00575
Opus 5.5 $0.00020 $0.00230
Sonnet 5.5 $0.00010 $0.00115
Haiku 4.5 $0.00005 $0.00057

Measured 2d ago against content hash 98339aeac74c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

core-conversion-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.ai-rulez/skills/core-conversion-architecture/SKILL.md · 37 lines

What it actually says

Core Conversion Architecture

All paths are under crates/html-to-markdown/src/.

Pipeline

  • convert() in convert_api.rs checks max_input_size, normalizes the input, tries Tier-1, then falls back to Tier-2.
  • Tier-1: byte scanner in converter/tier1/.
  • Tier-2: astral-tl DOM walk, walk_node in converter/main.rs; html5ever is used for tree repair.
  • ConversionOptions::tier_strategy (Auto default, Tier2, Tier1 testkit only) picks the path.
  • Per-element converters live under converter/ (block/, inline/, list/, form/, media/, semantic/, text/).
  • Output is shaped by ConversionOptions in options/conversion.rs (heading style, list indent, code block style, newline style, whitespace mode).
  • Caller traversal hooks: HtmlVisitor trait in visitor/traits.rs (feature visitor). There is no DomWalker trait.

Input safety (not output sanitization)

  • Converted Markdown is not safe to render as trusted content; callers sanitize downstream. See SECURITY.md.
  • validate_input() in validation.rs rejects binary input: gzip/zstd/zip/PDF magic bytes, excess NUL bytes, high control-character ratio, undeclared UTF-16. It does not inspect HTML elements, attributes or URLs.
  • max_input_size (Option<u64>) returns ConversionError::InputTooLarge; default is None natively and 2 MiB on wasm32.
  • max_depth bounds the Tier-2 walk to avoid stack overflow; effective_max_depth in converter/main_helpers.rs defaults it and clamps caller values to a ceiling.
  • ConversionError::SanitizationError exists in error.rs and in binding error mappings, but the core never constructs it.
  • Script and style are stripped (markup fidelity, not security); javascript:/data: URLs and event-handler attributes pass through.
  • There is no SafetyConfig, URL scheme allow-list or attribute allow-list.
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 37 lines · 49 tokens per session scan A 98339aeac74c

Subscribe to this mod's changes

core-conversion-architecture is a skill published in the GitHub repository xberg-io/html-to-markdown (885 stars, last pushed today), licensed MIT. It adds 49 tokens to every session and 575 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-27.

Related

Other skills, from other repositories

mcp-apps-builder

MANDATORY for ALL MCP server work - mcp-use framework best practices and patterns. READ THIS FIRST before any MCP server work, including: Creating new MCP servers Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) Debugging MCP server issues or errors Reviewing MCP server code for…

Shubhamsaboo/awesome-llm-apps · 139 tokens

mem0-status

Diagnoses mem0 connectivity, API key validity, and memory read/write functionality. Use when memory operations fail, searches return empty, addmemory errors occur, or to verify the plugin is working correctly.

mem0ai/mem0 · 44 tokens

plugin-architecture-patterns

Xberg plugin traits, typed registries, priority collisions, lifecycle and Alef Python plugin bridges. Use for plugin-system work, not parsing.

xberg-io/xberg · 29 tokens

xberg-chunking

Use when splitting extracted text into chunks for LLM context windows or RAG ingestion. Covers chunk size, overlap, markdown/yaml/semantic chunkers, tokenizer-based sizing, and the standalone chunk command.

xberg-io/xberg · 43 tokens

xberg-extracting-keywords

Use when extracting keywords (YAKE/RAKE) from documents — and, secondarily, when detecting document language or generating embeddings for RAG and search. Covers the keyword config (and its feature gating), --detect-language, and the standalone embed command with real flags.

xberg-io/xberg · 58 tokens

test-corpus

The testdocuments corpus (submodule, bucket-fetched): readtestfixture, missing fixtures, A/B controls. Use on a fresh clone or a missing fixture.

xberg-io/xberg · 33 tokens