Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown", "beautify article", "add formatting", or improve article layout. Outputs to {filename}-formatted.md.
The 'baoyu-format-markdown' skill is designed to enhance the readability and structure of markdown files by applying appropriate formatting without altering the original content. This tool is ideal for anyone looking to automate the process of making markdown documents cleaner and more organized. Whether you're dealing with plain text or existing markdown files, the skill adds necessary elements such as frontmatter, headings, summaries, bold text, lists, and code blocks to ensure a better presentation. The core principle behind this skill is to preserve the original message while improving its formatting to make it more user-friendly and visually appealing.
Main features include formatting titles, summaries, adding headings, and ensuring correct typography, particularly for content involving CJK (Chinese, Japanese, Korean) text. The skill provides scripts that automate the entire process, from content analysis to applying advanced typography fixes. Users can adjust preferences via an 'EXTEND.md' file, which allows fine-tuning of formatting settings based on specific needs. This flexibility makes it suitable for diverse use cases, ranging from casual document beautification to structured article formatting in technical or editorial workflows. It's most beneficial for users who require consistent formatting and prefer automating this task rather than performing manual adjustments for every document.
You can use this skill by running the provided scripts such as 'main.ts', 'quotes.ts', or 'autocorrect.ts' to format markdown files. It works by analyzing the content and applying proper formatting, such as adding frontmatter, titles, summaries, and fixing typography issues.
To use this skill, you need either 'bun' or 'npx' installed on your system. If neither is available, you will need to install 'bun' to ensure the skill works properly.
Yes, the skill supports an 'EXTEND.md' file where you can configure settings such as auto-selecting titles or summaries, and adjusting other formatting preferences. The settings in this file will override default behavior if present.
The skill is specifically designed for markdown files. It works by analyzing and formatting plain text or existing markdown files, and outputs the formatted version as a new file with '-formatted.md' appended to the original filename.
The skill includes specific support for CJK languages through the 'remark-cjk-friendly' feature, ensuring proper emphasis and formatting for these languages. The main script applies necessary fixes for spacing and other typography-related issues.
Quick Setup:
.claude/skills/Repository
jimliu/baoyu-skills