agentsclimarketplace

Orphan words

Skill diodames/orphan-words

Prevents orphan words and awkward last-line wraps using CSS text-wrap (balance/pretty/stable), editorial  , and nowrap phrase binders. Use when editing prose or headings, reviewing typography/line breaks, or when the user mentions orphans, widows, last-line wrapping,  , non-breaking space, text-wrap, text-wrap-style, balance, pretty, or stable.From its SKILL.md

Install
npx -y skills add diodames/orphan-words

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.9 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

Orphan words

Prevent single short words (and short trailing phrases) from sitting alone on a line. Prefer CSS first; use hand-authored glue for what CSS cannot fix. Do not invent a JS rewriter or CSS orphans/widows unless the project already uses them.

Quick Reference

CategoryWhen to Use
CSS wrappingtext-wrap: balance / pretty, Tailwind classes, when to skip
Editorial glue , phrase binders, false positives

Workflow

  1. Check the measure — a too-narrow column causes orphans that no glue fixes cleanly; confirm the container has a sane measure before patching text
  2. CSS role split — headings/short titles → text-wrap: balance; body/ledes/meta → text-wrap: pretty; contenteditable/animated text → text-wrap-style: stable
  3. Preserve existing glue — keep   and nowrap binders when editing nearby copy; re-apply the same rules to new sentences
  4. Editorial   — glue short function words, multi-word titles/units, and end-of-phrase clusters (not a pure “last two words” rule); scope to non-translated copy only
  5. Phrase binder — wrap preposition + linked name in white-space: nowrap (e.g. .text-bind)
  6. Skip false positives — animation spaces, date/sr-only nowrap, print orphans/widows, CJK/non-space-delimited scripts
  7. Verify — check the result at a narrow and a wide viewport (e.g. ~360px and ~1440px); confirm no new orphan or overflow was introduced by a binder or  

Core principles

1. CSS before content hacks

Let the browser improve wrapping first. Hand   only for residual orphans CSS cannot fix (short words, titles, linked phrases).

2. Balance headings, pretty body

Text roleProperty
Headings / short titlestext-wrap: balance
Body / multi-line prosetext-wrap: pretty

3. Glue with intent

Not every space needs  . Target short function words (a, the, to, from, for, of, I, …), multi-word titles (Series B), and short trailing clusters that would orphan.

4. Bind linked phrases

Keep at Company (and similar) together with a nowrap wrapper so the preposition does not strand alone before a link.

5. Fix what's visibly bad, not everything

Chasing a perfectly even rag on every paragraph is its own defect (Butterick's rule). Apply this stack where an orphan actually reads as awkward, not as a blanket pass over all copy. Scope is English/Latin-script, non-translated copy by default — see editorial.md for i18n and CJK caveats.

Examples

<span class="text-bind">at <a href="...">Klarity</a></span> from&nbsp;first prototype until Series&nbsp;B.
I&rsquo;m a&nbsp;product design leader … from&nbsp;prototype to&nbsp;Series&nbsp;B … I&nbsp;work with founders …
as a&nbsp;product partner … before the&nbsp;first design hire … when it&rsquo;s&nbsp;time to scale.

Anti-patterns

MistakeFix
Join last two words of every paragraph via scriptPrefer pretty + selective &nbsp;
Over-nbsp mid-sentence on wide viewportsGlue only short words / titles / last-line clusters
Long nowrap bindersKeep binders short; avoid overflow on narrow screens
Stripping &nbsp; during cleanupPreserve glue when rewriting copy
CSS orphans/widows or a JS rewriterUse this stack unless the project already differs
&nbsp; hardcoded into i18n-sourced stringsScope glue to non-translated copy; see editorial.md
balance/pretty applied blanket to CJK copyCan break mid-word; see css.md
Chasing a perfect rag on every paragraphFix only visibly bad orphans

Review checklist

  • Column measure checked before reaching for glue
  • Headings/titles use text-wrap: balance
  • Body/ledes/meta use text-wrap: pretty
  • Short function words and titles glued with &nbsp; where needed
  • Preposition + linked name uses a nowrap binder
  • Existing &nbsp; / binders preserved
  • No animation/date nowrap mistaken for orphan prevention
  • &nbsp; not hardcoded into translated/i18n-sourced strings
  • balance/pretty not applied blanket to CJK or non-space-delimited scripts
  • Checked at a narrow and wide viewport after changes

Reference files

  • css.md — balance / pretty, Tailwind, browser notes
  • editorial.md — &nbsp;, phrase binders, false positives

What ships with it: 3 files

8.9 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.