freestylefly avatar

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-code

Installs 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.

ScriptPurpose
scripts/main.tsMain entry point with CLI options (uses remark-cjk-friendly for CJK emphasis)
scripts/quotes.tsReplace ASCII quotes with fullwidth quotes
scripts/autocorrect.tsAdd 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
1jezweb avataraccessibilityjezweb/claude-skillsBuild WCAG 2.1 AA compliant websites with semantic HTML, proper ARIA, focus management, and screen reader support. Includes color contrast (4.5:1 text), keyboar505skills.sh installs
2freestylefly avatarremotion-best-practicesfreestylefly/canghe-skillsBest practices for Remotion - Video creation in React503skills.sh installs
3jezweb avatartanstack-tablejezweb/claude-skillsBuild headless data tables with TanStack Table v8. Server-side pagination, filtering, sorting, and virtualization for Cloudflare Workers + D1. Prevents 12 docum502skills.sh installs
4andreadellacorte avatargroove-admin-claude-statuslineandreadellacorte/grooveInstall a rich Claude Code statusline into ~/.claude/hooks/ and ~/.claude/settings.json. Displays model, git context, token usage, effort level, 5h/7d usage lim501skills.sh installs
5mhattingpete avatararchitecture-diagram-creatormhattingpete/claude-skills-marketplaceCreate comprehensive HTML architecture diagrams showing data flows, business objectives, features, technical architecture, and deployment. Use when users reques500skills.sh installs
6openzeppelin avatarupgrade-solidity-contractsopenzeppelin/openzeppelin-skillsUpgrade Solidity smart contracts using OpenZeppelin proxy patterns. Use when users need to: (1) make contracts upgradeable with UUPS, Transparent, or Beacon pro500skills.sh installs