AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Markdown Unwrap

skill-christopherkenny-skills-markdown-unwrap · by christopherkenny

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 s…

No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add skill-christopherkenny-skills-markdown-unwrap

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-christopherkenny-skills-markdown-unwrap)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Markdown Unwrap? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Markdown Unwrap

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.

Input Arguments

| 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

Algorithm

Process the file line-by-line, maintaining a current paragraph buffer:

  1. Pass-through lines — output immediately, do not buffer:
  • Blank lines (flush the buffer first, then emit the blank line)
  • ATX headings (#, ##, …)
  • Fenced code block delimiters ( ` or ~~~); toggle a in-code-block flag and pass all lines through until the closing fence
  • Block-quote lines starting with >
  • List item lines starting with -, *, +, or a digit followed by ./)
  • YAML front-matter delimiters --- / ... (pass the entire front-matter block through unchanged)
  1. 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).
  1. Flushing — when a pass-through line (or end-of-file) is encountered, flush the buffer:
  • Split the accumulated text into sentences at (?<=[.!?])\s+ — i.e., after a sentence-ending punctuation mark followed by whitespace.
  • Emit each sentence on its own line.
  • Clear the buffer.
  1. Write the result to the output path (or overwrite the input if no output path was given).

What Is Preserved

  • Blank lines (paragraph separators)
  • Fenced code blocks (contents unchanged)
  • YAML front matter
  • Headings, list items, and block quotes (each kept on its own line)
  • All text content — only whitespace between words is affected

What Changes

  • Mid-sentence hard-wrap newlines are removed
  • Each sentence ends with exactly one newline
  • Trailing spaces within paragraphs are removed

Implementation Notes

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:

  • Titles: Mr, Mrs, Ms, Dr, Prof, Sr, Jr, Rev, Gov
  • Latin: e.g, i.e, et al, vs, etc
  • Academic: Fig, Eq, Sec, Ch, Vol, No, pp

When the token before the period matches one of these (case-insensitively), do not split. For ? and ! there is no abbreviation concern — always split.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.