Agent skill for applying Semantic Line Breaks (SemBr) to plain text and compatible markup such as Markdown, LaTeX, and similar source formats.
The skill preserves text content exactly and only adds or removes line breaks. It is intended for reflowing prose source without changing rendered output.
For CLI and MCP use, I made an alternative tool sembr that uses local finetuned BERT models to perform semantic linebreaks.
SKILL.md: skill metadata and operating instructionsreferences/sembr-prompt.md: full SemBr specification and prompt referencescripts/check-consistency.py: checker that verifies only line breaks changed
- Reflows text using semantic line breaks
- Preserves words, markup, links, and formatting
- Defaults to a target line-length range of 40 to 60 characters
- Verifies output consistency after reformatting
- Supports LaTeX-aware comparison rules for
%comments
Install or copy this directory into your Codex skills folder, then invoke it for tasks that need semantic reflow.
Typical requests:
- "Apply semantic line breaks to this Markdown paragraph"
- "Reflow this LaTeX section with SemBr"
- "Wrap this prose to semantic lines around 50 characters"
The bundled checker compares the original input with the reformatted output while ignoring line-break-only differences.
python3 scripts/check-consistency.py input.txt output.txt
python3 scripts/check-consistency.py input.tex output.tex --type latex
python3 scripts/check-consistency.py input.md output.md --target target.mdIf the normalized content matches, the script exits successfully. If not, it reports the first differing regions with location hints.