baoyu-format-markdown
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.
Security Assessment
About baoyu-format-markdown
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.
FAQ
How do I use the baoyu-format-markdown skill?
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.
What are the system requirements for using baoyu-format-markdown?
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.
Can I customize the formatting preferences?
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.
Is there any limitation on file types for this skill?
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.
How do I handle content in CJK languages?
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.
Install baoyu-format-markdown
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
jimliu/baoyu-skills