baoyu-format-markdown

Formats plain text and markdown files with frontmatter, headings, lists, and CJK typography fixes.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-format-markdown-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-format-markdown
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/baoyu-format-markdown
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-format-markdown-virahitvin8

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? Raw drafts and loosely structured markdown files lack consistent headings, emphasis, frontmatter metadata, and CJK typography, making articles hard to scan and publish. ## Core Features & Use Cases - Content Analysis and Formatting: Analyzes an article for highlights, structure, and formatting issues, then applies headings, bold, lists, tables, and blockquotes without altering the original wording. - Frontmatter and Title Generation: Creates or updates YAML frontmatter with title candidates, slug, summary, and description, with optional user selection. - Typography Script: Runs a remark-based script that fixes CJK emphasis punctuation, adds CJK/English spacing via autocorrect, optionally replaces ASCII quotes, and formats frontmatter YAML. - Use Case: Given a rough blog draft in Chinese mixed with English terms, produce a well-structured {filename}-formatted.md with a chosen title, summary, and corrected spacing ready for publication. ## Quick Start Ask the agent to format the markdown file draft.md and generate a polished version with an optimized title and CJK typography fixes.

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 a markdown article automatically?

Provide the file path and the skill analyzes the content, adds headings, bold, lists, and tables without changing the wording, then saves the result as {filename}-formatted.md. A typography script then fixes CJK emphasis and spacing.

How to add CJK and English spacing in markdown files?

The scripts/main.ts tool runs autocorrect-node via npx to insert proper spacing between CJK and English text. Spacing is enabled by default and can be disabled with the --no-spacing flag.

Does the markdown formatter change my original content?

No, the core principle is to only adjust formatting and fix obvious typos. It never adds, deletes, or rewrites content, and the output is written to a separate {filename}-formatted.md file.

What runtime is required to run the formatting scripts?

The scripts require bun, or npx as a fallback which invokes bun via npx -y bun. The main script uses remark, remark-cjk-friendly, remark-gfm, and yaml packages declared in scripts/package.json.

Can I skip the interactive title and summary selection?

Yes, set auto_select, auto_select_title, or auto_select_summary to true in an EXTEND.md preferences file. The skill then picks the best candidate automatically without prompting.