baoyu-format-markdown

Format Markdown and plain text with frontmatter, headings, and code blocks.

Updated May 5, 2025
One-click install
npx skills add https://github.com/yopitek/Obsidian --skill baoyu-format-markdown-yopitek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-format-markdown
Source: https://github.com/yopitek/Obsidian/tree/main/HQ/10_resources/01_AI_Skills/baoyu-skills/skills/baoyu-format-markdown
Command: npx skills add https://github.com/yopitek/Obsidian --skill baoyu-format-markdown-yopitek

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires remark-cjk-friendly, remark-frontmatter, remark-gfm, remark-parse, remark-stringify, unified, unist-util-visit, yaml, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Formats plain text or markdown into well-structured, reader-friendly documents by applying frontmatter, titles, summaries, headings, bold, lists, and code blocks, without altering the original content.

Core Features & Use Cases

  • Frontmatter management: ensures a YAML header with name and description for new or updated documents.
  • Structural formatting: adds or refines headings, bold emphasis, lists, and code blocks to improve readability.
  • Output handling: generates a new file named {filename}-formatted.md as the end result.

Quick Start

Feed a Markdown file to the skill and it will produce the {filename}-formatted.md

Frequently Asked Questions about baoyu-format-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format Markdown with frontmatter and headings without altering the original text?

To format Markdown without altering original content, use an automated formatting tool that applies YAML frontmatter, headings, bold emphasis, and code blocks. This process parses plain text and outputs a consistently structured document suitable for publishing.

What is the best way to add YAML frontmatter to plain text or Markdown files?

Adding YAML frontmatter to Markdown files involves parsing the document and injecting a consistent YAML header with name and description. This ensures your plain text or Markdown output has standardized metadata required for publishing platforms.

Can I use remark plugins to format Markdown and manage frontmatter automatically?

Yes, remark plugins like remark-frontmatter and remark-gfm can parse, transform, and serialize Markdown automatically. They manage YAML headers and apply structural formatting rules to generate a new, consistently formatted Markdown file.

Does Markdown formatting with remark-cjk-friendly support CJK text properly?

Markdown formatting using remark-cjk-friendly ensures that Chinese, Japanese, and Korean text is parsed and serialized correctly. It prevents spacing issues during structural formatting, keeping the original content intact while applying headings and bold emphasis.

Why does my Markdown formatting tool change my original content?

Markdown formatting tools that change original content often apply destructive transformations instead of structural wrapping. A reliable formatting process parses the text and applies headings, lists, and code blocks without altering the underlying sentences or meaning.

What is the output format when formatting Markdown files with remark and YAML?

The output format when formatting Markdown with remark and YAML is a new file named {filename}-formatted.md. This file contains the original content enhanced with consistent frontmatter, headings, and structural elements suitable for publishing.