Docs 1,349 installs

baoyu-format-markdown

by jimliu/baoyu-skills

Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown",…

Skill content

Transforms plain text or markdown into well-structured, reader-friendly markdown with improved formatting.

- Analyzes content structure, identifies key insights, and applies strategic formatting (headings, bold, lists, tables, blockquotes) without changing original words

- Generates or optimizes frontmatter with title, slug, summary, and description fields; supports auto-selection via EXTEND.md configuration

- Runs typography scripts for CJK/English spacing, emphasis fixes, and optional quote replacement via bun or npx

- Outputs formatted file as {filename}-formatted.md with backup of existing files; generates analysis report documenting all changes

Markdown Formatter

Transforms plain text or markdown into well-structured, reader-friendly markdown. The goal is to help readers quickly grasp key points, highlights, and structure - without changing any original content.

Core principle: Only adjust formatting and fix obvious typos. Never add, delete, or rewrite content.

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

- Prefer built-in user-input tools exposed by the current agent runtime - e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.

- Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.

- Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.

Concrete AskUserQuestion references below are examples - substitute the local equivalent in other runtimes.

Script Directory

Scripts in scripts/ subdirectory. {baseDir} = this SKILL.md's directory path. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.