Install
openclaw skills install @j3ffyang/unwrap-markdownUnwrap hard-wrapped Markdown prose into one line per paragraph, while keeping code fences, tables, headings, setext headings, lists, blockquotes, hard line breaks, and YAML frontmatter intact. Use when a Markdown file was written with hard line breaks at a fixed width and needs to become one paragraph per line, when checking a folder of Markdown files for hard-wrapped prose (for CI), or when the user asks to unwrap, reflow, or un-hard-wrap Markdown. Handles CJK text without adding spaces between Chinese or Japanese characters.
openclaw skills install @j3ffyang/unwrap-markdownThis skill joins hard-wrapped prose lines into single-line paragraphs. It keeps structure as written. Fenced code, indented code at the start of a paragraph, tables, headings, setext headings, horizontal rules, blockquotes, HTML comments, images, hard line breaks, and YAML frontmatter stay unchanged.
Run the script from this skill's folder, or pass its full path. Writing requires explicit paths. The script does not scan a folder on its own when it writes.
Preview which files would change. Nothing is written:
python3 scripts/unwrap_md.py --dry-run path/to/folder
Unwrap one file:
python3 scripts/unwrap_md.py path/to/file.md
Unwrap every Markdown file in a folder. Hidden folders are skipped:
python3 scripts/unwrap_md.py path/to/folder
Check only. The exit code is 1 if any file still needs unwrapping:
python3 scripts/unwrap_md.py --check path/to/folder
--check and --dry-run with no path scan the current directory.
Exit codes: 0 means done, 1 means a file needs unwrapping (--check only), and 2 means a path was missing, a file was not UTF-8, or a write failed. Any file that could not be read is reported and skipped, and the other files still run.
--dry-run first to list the files that would change. Do not write yet.--check on the same files. It must exit 0.===, is kept as written.| character is treated as a table line. It stays on its own line and breaks the paragraph around it, so a prose line with a pipe is not unwrapped. Check these by hand.