
Canghe Format Markdown
Formats markdown files by adding proper frontmatter, fixing heading hierarchies, and running typography cleanup scripts. The workflow detects whether you're working with plain text or existing markdown, then either applies full formatting (titles, bold, lists, code blocks) or just runs the typography fixes. The script itself handles CJK-specific issues like emphasis punctuation and English/Chinese spacing using remark-cjk-friendly and autocorrect. You get project-level and user-level config via EXTEND.md files. Outputs to a separate formatted file with timestamp backups, so your original stays untouched. Built for content that mixes languages or just needs consistent structure without manual cleanup.
- skills.sh installs
- 505
- GitHub stars
- 474
- last updated
- Aug 21, 2026
Install
$ npx -y skills add freestylefly/canghe-skills --skill canghe-format-markdown --agent claude-codeInstalls into .claude/skills of the current project.
Files
Markdown Formatter
Transforms plain text or markdown files into well-structured markdown with proper frontmatter, formatting, and typography.
Script Directory
Scripts in scripts/ subdirectory. Replace ${SKILL_DIR} with this SKILL.md's directory path.
| 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 |
scripts/autocorrect.ts | Add CJK/English spacing via autocorrect |
Preferences (EXTEND.md)
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first
test -f .canghe-skills/canghe-format-markdown/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.canghe-skills/canghe-format-markdown/EXTEND.md" && echo "user"
Sponsors
Details
- Repository
- github.com/freestylefly/canghe-skills
- Categories
- Frontend Development, Code Review & Quality
- First seen
- Jun 3, 2026
More from freestylefly/canghe-skills
All 29- Remotion Best Practices503
- Canghe Post To Wechat498
- Canghe Danger Gemini Web497
- Find Skills497
- Canghe Compress Image494
- Canghe Danger X To Markdown489
- Canghe Post To X488
- Obsidian Markdown488
- Douyin Downloader485
- Json Canvas484
- Skill Creator483
- Obsidian Bases477
- Release Skills476
- Flyworks Avatar Video378
- Paddleocr Doc Parsing373
- Manga Drama863
- Manga Style Video667
- Seedance Video609
- Canghe Image Gen598
- Canghe Comic584
- Volcengine Video Understanding579
- Canghe Xhs Images573
- Canghe Cover Image545
- Canghe Markdown To Html536