fix-unnatural-line-breaks
Skill2 starsChanged 49 days agoMITView on GitHub
Detects and fixes "unnatural line breaks" in prose (Markdown/README-style documentation, and code comments or docstrings) — newlines inserted mid-sentence just to keep lines under some fixed column width. Works on both English and Japanese text. Use for requests like "fix the line breaks," "this is hard-wrapped," "the text is cut off mid-sentence," "unnatural line wrapping," "改行がおかしい," "文の途中で改行が入っている," "一定の文字数で折り返されている," as well as when writing, reviewing, or rewriting documentation and comments. Does not cover restructuring bullet lists, rewording headings, or removing AI-sounding phrasing/redundancy (those belong to other skills).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- otnc/skills_fix-unnatural-line-breaksword for word, first seen Sep 27, 2026
Other versions1 project uses a version of this.
Word for word · 1
- otnc/skills_fix-unnatural-line-breaks★ 4100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- fix-unnatural-line-breaksSkill
- kiritanSkill
- token-saver-claude-codeSkill
- token-saver-codexSkill
- token-saver-copilotSkill
- token-saver-cursorSkill
- token-saver-opencodeSkill
- token-saverSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
When writing new prose (documentation or comments) from scratch, write one paragraph per line (or one sentence per line) from the start, …
- Very specific: line 26
When reviewing or fixing existing prose, use the criteria in references/detection.md to find breaks that cut a sentence in the middle, then …
- Very specific: line 33
Don't restructure content: splitting into bullet lists, rewording headings, removing redundant phrasing, or scrubbing AI-sounding style are …
- Very specific: line 34
Don't touch Markdown tables, code block contents, URLs, inline code spans, or intentional Markdown line breaks (two trailing spaces, a …
- Distinctive: line 35
Don't touch commit messages or code formatting itself (that's Prettier/ESLint's job).
- Very specific: line 41
Read references/detection.md and keep the relevant criteria in mind for the language(s) involved (English, Japanese, or both mixed in the …
- Distinctive: line 49
Before calling it done, confirm:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
fix-unnatural-line-breaks
A skill for eliminating a specific bad habit: inserting a newline mid-sentence just to keep the line under some fixed column width. Line breaks should only appear at meaningful boundaries — paragraph breaks, list item boundaries, and around headings.
Core principle
Don't break a sentence or paragraph until it actually ends. Even when a line "feels" long, keep writing on the same line until the next meaningful boundary (end of paragraph, end of a list item, before/after a heading, before/after a code block). Let the editor, browser, or terminal handle visual wrapping (soft wrap) — the source itself should not contain a hard-coded newline chosen purely for line length.
This applies equally to English and Japanese, but the damage is arguably worse in Japanese. Japanese has no spaces between words, so an arbitrary line break doesn't look grammatically broken the way it might in English — yet breaking right after a comma, particle, or in the middle of a phrase still disrupts the reading rhythm and makes it easy to misread where a clause actually ends.
The target is both prose documentation (Markdown, README files) and code comments, docstrings, and JSDoc. For documentation, most Markdown renderers collapse a single newline inside a paragraph into a single space, so the rendered output often looks fine either way — but the raw source still suffers: it's harder to read as source, diffs get needlessly large when a whole paragraph reflows, and there are places where the raw newline is shown as-is (commit messages, terminals, an editor's hover tooltip for a code comment). For code comments there is no renderer to save you — the line break is shown exactly as written, so the harm is direct and immediate.
Do
- When writing new prose (documentation or comments) from scratch, write one paragraph per line (or one sentence per line) from the start, and never wrap at an arbitrary column width.
- When reviewing or fixing existing prose, use the criteria in
references/detection.mdto find breaks that cut a sentence in the middle, then fix them followingreferences/rules.md. - To fix one, simply remove the line break and join the two lines: insert a single space for English, and nothing (no space) for Japanese. See
references/examples.mdfor concrete cases where the right join is ambiguous. - It's fine — expected, even — for the fixed line to become very long. The only thing that should trigger a new line break is a structural boundary (paragraph, list item, heading, code block), never a character count.
- In a comment block, if two paragraphs need a visible separator, use an unmarked blank line (no
///#/*) or no separator at all — never a bare comment marker with nothing after it. Nobody writes a lone//by hand; seereferences/rules.md.
Don't
- Don't restructure content: splitting into bullet lists, rewording headings, removing redundant phrasing, or scrubbing AI-sounding style are out of scope (hand those off to a skill built for that, such as
natural-japaneseorstop-ai-slop-jpfor Japanese text). - Don't touch Markdown tables, code block contents, URLs, inline code spans, or intentional Markdown line breaks (two trailing spaces, a trailing backslash, or an explicit
<br>). - Don't touch commit messages or code formatting itself (that's Prettier/ESLint's job). The target here is prose meant for humans to read.
- Don't run this against structured config formats such as CI workflow YAML, JSON, or embedded shell scripts.
scripts/lint.mjsrecognizes YAML frontmatter and simplekey: valuelines well enough to avoid the worst false positives, but it has no real YAML parser and cannot tell a wrapped prose sentence inside a block scalar (key: |) from wrapped shell script. Structured config is out of scope; only apply this skill to Markdown prose and code comments/docstrings.
Workflow
- Identify what kind of file you're looking at — Markdown documentation, or code comments.
- Read
references/detection.mdand keep the relevant criteria in mind for the language(s) involved (English, Japanese, or both mixed in the same file). - If Node.js is available (most coding agents run on it or alongside it), run
node <this skill's directory>/scripts/lint.mjs <file>from the project root to mechanically surface suspicious breaks (add--jsonfor structured output). No install or dependency is needed — it's plain Node.js with no third-party packages. Without Node.js, do the same review by eye usingreferences/detection.md. lint.mjsoutput is not the full list of what to fix. It's a small set of regex heuristics, so it both flags things that are fine (false positives) and misses real unnatural breaks it has no rule for (false negatives) — a break that doesn't end in a tracked particle/word but is still mid-sentence, for instance. Treat it as a starting hint, not a checklist to clear. Filter out its false positives (code blocks, tables, intentional breaks), then still read every paragraph and comment block in the file yourself againstreferences/detection.md, including the parts the tool didn't flag at all.- Apply the fixes following
references/rules.md: merge broken sentences back into one line, and leave paragraph/list/heading/code-block boundaries untouched. - Re-read the fixed paragraph to confirm the meaning and tone haven't shifted.
Quick self-check
Before calling it done, confirm:
- No line break remains in the middle of a paragraph without a meaningful boundary justifying it
- No single list item is still wrapped across multiple lines (unless the item is genuinely long and that's intentional)
- No single sentence in a code comment or docstring still spans multiple comment lines
- The fix didn't touch code blocks, tables, URLs, or intentional line breaks
- No comment block uses a bare
///#/*marker as a paragraph separator - Every paragraph and comment block was actually read end to end — not just the lines
lint.mjshappened to flag
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

