baoyu format markdown

Documentation Community v1.57.0

Skill notes

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.

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. Script · Purpose scripts/main.ts · Main entry point with CLI options (uses remark-cjk-friendly for CJK emphasis) scripts/quotes.ts · Replace ASCII quotes with fullwidth quotes

Preferences (EXTEND.md)

Check EXTEND.md in priority order — the first one found wins: Priority · Path · Scope 1 · .baoyu-skills/baoyu-format-markdown/EXTEND.md · Project 2 · ${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-format-markdown/EXTEND.md · XDG 3 · $HOME/.baoyu-skills/baoyu-format-markdown/EXTEND.md · User home

Usage

The 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).

Step 1: Read & Detect Content Type

Read the user-specified file, then detect content type: Indicator · Classification Has --- YAML frontmatter · Markdown Has #, ##, ### headings · Markdown Has bold, *italic*, lists, code blocks, blockquotes · Markdown

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Documentation
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
92 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@JimLiu · v1.57.0 · no license declared
Token usage
Lean
Setup complexity
Manual integration
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
Bun · Python
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Read & Detect Content Type

Read the user-specified file, then detect content type: Indicator · Classification Has `---` YAML frontmatter · Markdown Has `#`, `##`, `###` headings · Markdown Has `bold`, `*italic*`, lists, code blocks, blockquotes · Markdown

02
Step 2: Analyze Content (Reader's Perspective)

Read the entire content carefully. Think from a reader's perspective: what would help them quickly understand and remember the key information? Produce an analysis covering these dimensions: 2.1 Highlights & Key Insights Core arguments or conclusions the author makes Surprising facts, data points, or counterintuitive claims

03
Step 3: Check/Create Frontmatter, Title & Summary

Check for YAML frontmatter (`---` block). Create if missing. Field · Processing `title` · See Title Generation below `slug` · Infer from file path or generate from title `summary` · One-sentence concise summary (see Summary Generation below)

04
Step 4: Format Content

Apply formatting guided by the Step 2 analysis. The goal is making the content scannable and the key points impossible to miss. Formatting toolkit: Element · When to use · Format Headings · Natural topic boundaries, section breaks · `##`, `###` hierarchy Bold · Key conclusions, important terms, core takeaways · `bold`

05
Step 5: Save Formatted File

Save as `{original-filename}-formatted.md` Backup existing file:

06
Step 6: Execute Typography Script

Run the formatting script on the output file: Script Options: Option · Short · Description · Default `--quotes` · `-q` · Replace ASCII quotes with fullwidth quotes `"..."` · false `--no-quotes` · Do not replace quotes

07
Step 7: Completion Report

Display a report summarizing all changes made: Adjust the report to reflect actual changes — omit categories where no changes were made.

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.