.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/baoyu-skills/baoyu-format-markdown
home/skills/jimliu/baoyu-skills/baoyu-format-markdown
jimliu avatar

baoyu-format-markdown

byjimliu· 68 skills

Installs

26k

Stars

24k

Forks

2.7k

Category

Content & Copywriting

View on GitHub

TL;DR

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.

How to install baoyu-format-markdown?

jimliu/baoyu-skills/baoyu-format-markdown
$npx -y skills add jimliu/baoyu-skills --skill baoyu-format-markdown

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/jimliu/baoyu-skills" --skill "jimliu/baoyu-skills/baoyu-format-markdown"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/jimliu/baoyu-skills" that are relevant to the current task. Run `npx skills add "https://github.com/jimliu/baoyu-skills"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# Markdown Formatter
2 
3Transforms 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.
4 
5**Core principle**: Only adjust formatting and fix obvious typos. Never add, delete, or rewrite content.
6 
7## User Input Tools
8 
9When this skill prompts the user, follow this tool-selection rule (priority order):
10 
111. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.
122. **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.
133. **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.
14 
15Concrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.
16 
17## Script Directory
18 
19Scripts 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.
20 
21| Script | Purpose |
22|--------|---------|
23| `scripts/main.ts` | Main entry point with CLI options (uses remark-cjk-friendly for CJK emphasis) |
24| `scripts/quotes.ts` | Replace ASCII quotes with fullwidth quotes |
25| `scripts/autocorrect.ts` | Add CJK/English spacing via autocorrect |
26 
27## Preferences (EXTEND.md)
28 
29Check EXTEND.md in priority order — the first one found wins:
30 
31| Priority | Path | Scope |
32|----------|------|-------|
33| 1 | `.baoyu-skills/baoyu-format-markdown/EXTEND.md` | Project |
34| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-format-markdown/EXTEND.md` | XDG |
35| 3 | `$HOME/.baoyu-skills/baoyu-format-markdown/EXTEND.md` | User home |
36 
37If none found, use defaults — no first-time setup required for this skill.
38 
39**EXTEND.md supports**:
40 
41| Setting | Values | Default | Description |
42|---------|--------|---------|-------------|
43| `auto_select` | `true`/`false` | `false` | Skip both title and summary selection, auto-pick best |
44| `auto_select_title` | `true`/`false` | `false` | Skip title selection only |
45| `auto_select_summary` | `true`/`false` | `false` | Skip summary selection only |
46| Other | — | — | Default formatting options, typography preferences |
47 
48## Usage
49 
50The workflow has two phases: **Analyze** (understand the content) then **Format** (apply formatting). Claude performs content analysis and formatting (Steps 1-5), then runs the script for typography fixes (Step 6).
51 
52## Workflow
53 
54### Step 1: Read & Detect Content Type
55 
56Read the user-specified file, then detect content type:
57 
58| Indicator | Classification |
59|-----------|----------------|
60| Has `---` YAML frontmatter | Markdown |
61| Has `#`, `##`, `###` headings | Markdown |
62| Has `**bold**`, `*italic*`, lists, code blocks, blockquotes | Markdown |
63| None of above | Plain text |
64 
65**If Markdown detected, use `AskUserQuestion` to ask:**
66 
67```
68Detected existing markdown formatting. What would you like to do?
69 
701. Optimize formatting (Recommended)
71 - Analyze content, improve headings, bold, lists for readability
72 - Run typography script (spacing, emphasis fixes)
73 - Output: {filename}-formatted.md
74 
752. Keep original formatting
76 - Preserve existing markdown structure
77 - Run typography script only
78 - Output: {filename}-formatted.md
79 
803. Typography fixes only
81 - Run typography script on original file in-place
82 - No copy created, modifies original file directly
83```
84 
85**Based on user choice:**
86- **Optimize**: Continue to Step 2 (full workflow)
87- **Keep original**: Skip to Step 5, copy file then run Step 6
88- **Typography only**: Skip to Step 6, run on original file directly
89 
90### Step 2: Analyze Content (Reader's Perspective)
91 
92Read the entire content carefully. Think from a reader's perspective: what would help them quickly understand and remember the key information?
93 
94Produce an analysis covering these dimensions:
95 
96**2.1 Highlights & Key Insights**
97- Core arguments or conclusions the author makes
98- Surprising facts, data points, or counterintuitive claims
99- Memorable quotes or well-phrased sentences (golden quotes)
100 
101**2.2 Structure Assessment**
102- Does the content have a clear logical flow? What is it?
103- Are there natural section boundaries that lack headings?
104- Are there long walls of text that could benefit from visual breaks?
105 
106**2.3 Reader-Important Information**
107- Actionable advice or takeaways
108- Definitions, explanations of key concepts
109- Lists or enumerations buried in prose
110- Comparisons or contrasts that would be clearer as tables
111 
112**2.4 Formatting Issues**
113- Missing or inconsistent heading hierarchy
114- Paragraphs that mix multiple topics
115- Parallel items written as prose instead of lists
116- Code, commands, or technical terms not marked as code
117- Obvious typos or formatting errors
118 
119**Save analysis to file**: `{original-filename}-analysis.md`
120 
121The analysis file serves as the blueprint for Step 3. Use this format:
122 
123```markdown
124# Content Analysis: {filename}
125 
126## Highlights & Key Insights
127- [list findings]
128 
129## Structure Assessment
130- Current flow: [describe]
131- Suggested sections: [list heading candidates with brief rationale]
132 
133## Reader-Important Information
134- [list actionable items, key concepts, buried lists, potential tables]
135 
136## Formatting Issues
137- [list specific issues with location references]
138 
139## Typos Found
140- [list any obvious typos with corrections, or "None found"]
141```
142 
143### Step 3: Check/Create Frontmatter, Title & Summary
144 
145Check for YAML frontmatter (`---` block). Create if missing.
146 
147| Field | Processing |
148|-------|------------|
149| `title` | See **Title Generation** below |
150| `slug` | Infer from file path or generate from title |
151| `summary` | One-sentence concise summary (see **Summary Generation** below) |
152| `description` | Longer descriptive summary (see **Summary Generation** below) |
153| `coverImage` | Check if `imgs/cover.png` exists in same directory; if so, use relative path |
154 
155#### Title Generation
156 
157Whether or not a title already exists, run the title optimization flow unless `auto_select_title` is set.
158 
159**Preparation** — read the full text and extract:
160- Core argument (one sentence: "what is this article about?")
161- Most impactful opinion or conclusion
162- Reader pain point or curiosity trigger
163- Most memorable metaphor or golden quote
164 
165**Generate candidates** using formulas from `references/title-formulas.md`:
166 
1671. Select the **2-3 best-matching hook formulas** based on the article's content, tone, and structure (see "When to pick each formula" in the reference)
1682. Generate **1-2 straightforward titles** (descriptive or declarative, no formula — clear and accurate)
1693. If the user specifies a direction (e.g., "make it suspenseful"), prioritize that direction
1704. Total: **4-5 candidates**
171 
172Present via `AskUserQuestion`:
173 
174```
175Pick a title:
176 
1771. [Hook title A] — (recommended) [formula name]
1782. [Hook title B] — [formula name]
1793. [Hook title C] — [formula name]
1804. [Straightforward title D] — straightforward
1815. [Straightforward title E] — straightforward
182 
183Enter number, or type a custom title:
184```
185 
186Put the strongest hook first and mark it `(recommended)`. See `references/title-formulas.md` for principles and prohibited patterns.
187 
188If the first line is an H1, extract it to frontmatter and remove it from the body. If frontmatter already has a `title`, include it as context but still generate fresh candidates — the existing title may be weak.
189 
190**Skip behavior**: If `auto_select: true` or `auto_select_title: true`, skip the user prompt and use the top candidate directly.
191 
192#### Summary Generation
193 
194Generate two versions directly (no user selection), both stored in frontmatter:
195 
196| Field | Length | Purpose |
197|-------|--------|---------|
198| `summary` | 1 sentence, ~50-80 chars | Concise hook — for feeds, social sharing, SEO meta |
199| `description` | 2-3 sentences, ~100-200 chars | Richer context — for article previews, newsletter blurbs |
200 
201**Principles**:
202 
203- Convey **core value** to the reader, not just the topic
204- Use concrete details (numbers, outcomes, specific methods) over vague descriptions
205- `summary` should be punchy and self-contained; `description` can expand with supporting details
206- If frontmatter already has `summary` or `description`, keep the existing one and only generate the missing field
207 
208**Prohibited patterns**:
209 
210- "This article introduces...", "This article explores..."
211- Pure topic description without value proposition
212- Repeating the title in different words
213 
214Once the title is in frontmatter, the body should NOT contain an H1 (avoid duplication).
215 
216### Step 4: Format Content
217 
218Apply formatting guided by the Step 2 analysis. The goal is making the content scannable and the key points impossible to miss.
219 
220**Formatting toolkit:**
221 
222| Element | When to use | Format |
223|---------|-------------|--------|
224| Headings | Natural topic boundaries, section breaks | `##`, `###` hierarchy |
225| Bold | Key conclusions, important terms, core takeaways | `**bold**` |
226| Unordered lists | Parallel items, feature lists, examples | `- item` |
227| Ordered lists | Sequential steps, ranked items, procedures | `1. item` |
228| Tables | Comparisons, structured data, option matrices | Markdown table |
229| Code | Commands, file paths, technical terms, variable names | `` `inline` `` or fenced blocks |
230| Blockquotes | Notable quotes, important warnings, cited text | `> quote` |
231| Separators | Major topic transitions | `---` |
232 
233**Formatting principles — what NOT to do:**
234- Do NOT add sentences, explanations, or commentary
235- Do NOT delete or shorten any content
236- Do NOT rephrase or rewrite the author's words
237- Do NOT add headings that editorialize (e.g., "Amazing Discovery" — use neutral descriptive headings)
238- Do NOT over-format: not every sentence needs bold, not every paragraph needs a heading
239 
240**Formatting principles — what TO do:**
241- Preserve the author's voice, tone, and every word
242- **Bold key conclusions and core takeaways** — the sentences a reader would highlight
243- Extract parallel items from prose into lists only when the structure is clearly there
244- Add headings where the topic genuinely shifts — prefer vivid, specific headings over generic ones (e.g., "3 天搞定 vs 传统方案" over "方案对比")
245- Use tables for comparisons or structured data buried in prose
246- Use blockquotes for golden quotes, memorable statements, or important warnings
247- Fix obvious typos (based on Step 2 findings)
248 
249### Step 5: Save Formatted File
250 
251Save as `{original-filename}-formatted.md`
252 
253**Backup existing file:**
254 
255```bash
256if [ -f "{filename}-formatted.md" ]; then
257 mv "{filename}-formatted.md" "{filename}-formatted.backup-$(date +%Y%m%d-%H%M%S).md"
258fi
259```
260 
261### Step 6: Execute Typography Script
262 
263Run the formatting script on the output file:
264 
265```bash
266${BUN_X} {baseDir}/scripts/main.ts {output-file-path} [options]
267```
268 
269**Script Options:**
270 
271| Option | Short | Description | Default |
272|--------|-------|-------------|---------|
273| `--quotes` | `-q` | Replace ASCII quotes with fullwidth quotes `"..."` | false |
274| `--no-quotes` | | Do not replace quotes | |
275| `--spacing` | `-s` | Add CJK/English spacing via autocorrect | true |
276| `--no-spacing` | | Do not add CJK/English spacing | |
277| `--emphasis` | `-e` | Fix CJK emphasis punctuation issues | true |
278| `--no-emphasis` | | Do not fix CJK emphasis issues | |
279 
280**Examples:**
281 
282```bash
283# Default: spacing + emphasis enabled, quotes disabled
284${BUN_X} {baseDir}/scripts/main.ts article.md
285 
286# Enable all features including quote replacement
287${BUN_X} {baseDir}/scripts/main.ts article.md --quotes
288 
289# Only fix emphasis issues, skip spacing
290${BUN_X} {baseDir}/scripts/main.ts article.md --no-spacing
291```
292 
293**Script performs (based on options):**
2941. Fix CJK emphasis/bold punctuation issues (default: enabled)
2952. Add CJK/English mixed text spacing via autocorrect (default: enabled)
2963. Replace ASCII quotes with fullwidth quotes (default: disabled)
2974. Format frontmatter YAML (always enabled)
298 
299### Step 7: Completion Report
300 
301Display a report summarizing all changes made:
302 
303```
304**Formatting Complete**
305 
306**Files:**
307- Analysis: {filename}-analysis.md
308- Formatted: {filename}-formatted.md
309 
310**Content Analysis Summary:**
311- Highlights found: X key insights
312- Golden quotes: X memorable sentences
313- Formatting issues fixed: X items
314 
315**Changes Applied:**
316- Frontmatter: [added/updated] (title, slug, summary)
317- Headings added: X (##: N, ###: N)
318- Bold markers added: X
319- Lists created: X (from prose → list conversion)
320- Tables created: X
321- Code markers added: X
322- Blockquotes added: X
323- Typos fixed: X [list each: "original" → "corrected"]
324 
325**Typography Script:**
326- CJK spacing: [applied/skipped]
327- Emphasis fixes: [applied/skipped]
328- Quote replacement: [applied/skipped]
329```
330 
331Adjust the report to reflect actual changes — omit categories where no changes were made.
332 
333## Notes
334 
335- Preserve original writing style and tone
336- Specify correct language for code blocks (e.g., `python`, `javascript`)
337- Maintain CJK/English spacing standards
338- The analysis file is a working document — it helps maintain consistency between what was identified and what was formatted
339 
340## Extension Support
341 
342Custom configurations via EXTEND.md. See **Preferences** section for paths and supported options.

Security

Review

  • Gen Agent Trust Hubpass
  • Socketpass
  • Snykwarn
  • Runlayerpass
  • ZeroLeakspass

Preview

jimliu/baoyu-skillsjimliu/baoyu-skills

$ npx -y skills add jimliu/baoyu-skills --skill baoyu-format-markdown

▸ installing to .claude/skills…

✓ baoyu-format-markdown ready

Repojimliu/baoyu-skills
TypeSkills
CategoryContent & Copywriting
ForContent Creator
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. mattpocock avataredit-articleEdit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.SkillsJul 2026172k189k
  2. mattpocock avatarwriting-shapeWriting, exploit — shape raw material into an article, paragraph by paragraph.SkillsJul 2026165k189k
  3. mattpocock avatarwriting-fragmentsWriting, explore — mine raw fragments, no structure yet.SkillsJul 2026165k189k
  4. mattpocock avatarwriting-beatsWriting, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.SkillsJul 2026164k189k
  5. coreyhaines31 avatarcopywritingWhen the user wants to write, rewrite, or improve marketing copy for any page — including homepage, landing pages, pricing pages, feature pages, about pages,…SkillsJul 2026164k42k
  6. heygen-com avatarslideshowAuthor a HyperFrames slideshow — a presentation, pitch deck, or interactive deck with discrete slides, fragment reveals, branching, hotspot navigation, and…SkillsJul 2026115k38k