mdsmith
Esc
    v0.52.0 GitHub

    Guides

    User guides for mdsmith directives, structure enforcement, and migration.

    GuideDescription
    InstallationEvery channel that ships the mdsmith binary, the VS Code extension, or the Claude Code plugin — npm, PyPI, Homebrew, asdf, mise, a Flatpak bundle, the GitHub release, the Visual Studio Marketplace plus Open VSX, and the in-repository Claude Code marketplace — and which channel to pick for which workflow.
    File KindsHow to declare file kinds, assign files to them, and read the merged rule config that results.
    SchemasDeclare a document-structure schema inline on a kind or in a proto.md file, validate headings and front matter, and tighten rule config per section.
    Use a Markdown conventionSelect a built-in convention, declare your own inline, layer rules over its preset, keep the flavor in agreement, and split a convention into its own file.
    Extract Markdown as dataWhen a Markdown file’s payload is prose, put it in the body under H2 sections — not in YAML frontmatter. mdsmith extract projects body structure into a JSON tree the same way it projects frontmatter, so the file stays editable as Markdown.
    Choosing Readability, Conciseness, and Token Budget MetricsTrade-offs and threshold guidance for readability, structure, length, and token budgets.
    Coexist with PrettierRun mdsmith alongside Prettier by ordering mdsmith fix before prettier --write in the same pre-commit hook.
    Coexist with Vale and remarkVale owns brand voice and prose style; remark owns Markdown AST transformations; mdsmith owns formatting, cross-file integrity, and generated sections. They sit side by side in CI without overlap.
    Migrate from markdownlintConvert a markdownlint config to .mdsmith.yml with mdsmith init --from-markdownlint, review the conversion notes, move inline disables into overrides, and run both linters in parallel until cutover.
    Progressive Disclosure for AI AgentsUse <?catalog?> with a per-file summary front matter field to emit a one-line index of a directory, so AI coding agents read a few thousand tokens of metadata up front and only Read the files a task actually touches.

    # Directives

    GuideDescription
    Build directiveHow to use the build directive to declare artifact outputs and source inputs, keep generated bodies in sync, and configure user-declared recipes.
    Coming from HugoKey differences between Hugo templates and mdsmith directives for users familiar with Hugo.
    DirectivesGuides to mdsmith’s content directives — generating content with <?catalog?> and <?include?>, enforcing structure with schemas, declaring build artifacts, and moving from Hugo templates.
    Enforcing Document Structure with SchemasHow to use schemas, require, and allow-empty-section to validate headings, front matter, and filenames.
    Generating Content with DirectivesHow to use catalog and include directives to generate and embed content in Markdown files.

    # Editors

    GuideDescription
    EditorsEditor integration guides for mdsmith — VS Code, Neovim, and Obsidian — all driven by the same bundled mdsmith lsp server.
    mdsmith for ObsidianInstall the mdsmith Obsidian plugin and use its inline diagnostics, hover fixes, fix-on-save, and diagnostics panel — one WebAssembly runtime on desktop and mobile.
    mdsmith for VS CodeInstall the mdsmith VS Code extension and use its inline diagnostics, quick fixes, fix-on-save, and cross-file navigation — one bundled binary, no extra setup.
    Neovim IntegrationWire mdsmith lsp into Neovim’s built-in LSP client so diagnostics, code actions, and navigation work inline with no extra plugin.