skills/22-christopherkenny-skills/skills/markdown-unwrap/SKILL.md
Unwraps hard-wrapped markdown files so that each sentence ends with a newline instead of mid-sentence line breaks. Joins continuation lines within a paragraph into single lines, then re-breaks at sentence boundaries (period, question mark, exclamation point). Preserves blank lines, headings, fenced code blocks, block quotes, and list items. Use when asked to unwrap text, fix line breaks, reflow sentences, or clean up hard-wrapped markdown or .qmd files.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research markdown-unwrapInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reflow a markdown (or .qmd) file so that each sentence occupies its own line. This is the inverse of hard-wrapping: mid-sentence newlines are removed and the text is re-broken only at sentence endings.
| Position | Required | Description |
|----------|----------|-------------|
| 1 | Yes | Path to the input .md or .qmd file |
| 2 | No | Output path. Defaults to overwriting the input file in-place |
Example invocations:
/markdown-unwrap paper/paper.qmd
/markdown-unwrap README.md README-unwrapped.md
Process the file line-by-line, maintaining a current paragraph buffer:
Pass-through lines — output immediately, do not buffer:
#, ##, …)``` or ~~~); toggle a in-code-block flag and pass all lines through until the closing fence>-, *, +, or a digit followed by ./)--- / ... (pass the entire front-matter block through unchanged)Buffering — for all other lines, append the line's text to the current buffer (joining with a single space, trimming leading/trailing whitespace from each line).
Flushing — when a pass-through line (or end-of-file) is encountered, flush the buffer:
(?<=[.!?])\s+ — i.e., after a sentence-ending punctuation mark followed by whitespace.Write the result to the output path (or overwrite the input if no output path was given).
Implement the algorithm directly in your response — read the file, process it line-by-line following the rules above, and write the result. No external script is needed.
The sentence-split heuristic: a period followed by whitespace and an uppercase letter is a sentence boundary unless the word immediately before the period is a known abbreviation. Maintain a blocklist of common abbreviations that should never trigger a split:
Mr, Mrs, Ms, Dr, Prof, Sr, Jr, Rev, Gove.g, i.e, et al, vs, etcFig, Eq, Sec, Ch, Vol, No, ppWhen the token before the period matches one of these (case-insensitively), do not split. For ? and ! there is no abbreviation concern — always split.
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.