sembr
Skill1 starsChanged 5 months agoMITView on GitHub
Reformats prose using Semantic Line Breaks (https://sembr.org/) — strictly, no compromises. Never alters wording or rendered output.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- actionlintSkill
- actSkill
- dependency-auditSkill
- dockerfileSkill
- fdSkill
- git-flow-nextSkill
- joSkill
- miseSkill
- mktemp-dSkill
- npx-skillsSkill
- roastSkill
- shell-snippet-fmtSkill
- skill-newSkill
- ssh-auditSkill
- teeSkill
- vcs-commit-msgSkill
- vcs-identity-checkSkill
- whichSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
If it already follows sembr (multiple short lines, breaks after sentence terminators or clauses) — keep sembr in your edit.
- Distinctive: line 48
If it is one long line, hard-wrapped at a fixed column, or follows another visible convention — match that convention.
- Distinctive: line 51
If the paragraph is too short to tell — default to sembr.
- Distinctive: line 98
If the target is ambiguous, ask before editing.
- Very specific: line 145
When the structure is genuinely ambiguous, leave the clause unbroken and surface the case in the report (see Reporting).
- Distinctive: line 150
When a line exceeds 80, break at the latest semantic boundary that satisfies the limit.
- Distinctive: line 164
Read the input verbatim.
- Distinctive: line 181
Use MAY rules to fit the 80-character soft limit and improve readability.
- Distinctive: line 182
Never paraphrase, reword, add, or remove content.
- Distinctive: line 183
If the source wording is ambiguous and forces a structural choice, ask before editing.
- Distinctive: line 221
Do not quote the full reformatted text back to the user unless they ask.
- Distinctive: line 224
If any rule was relaxed or skipped during the pass — ambiguous independent clause left unbroken, non-standard rendering context, …
≈ “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
sembr
Reformat prose so its physical line structure mirrors its semantic structure, per the Semantic Line Breaks specification at https://sembr.org/. Rules below are mandatory — never skip them silently and never relax a MUST rule for convenience.
Modes
Explicit reformat
The user asked to reformat existing text. Apply MUST/SHOULD/MAY rules to the targeted prose (snippet, file, or section). Reformat fully within the target; do not touch surrounding paragraphs.
Default-on-edit
Triggered automatically when adding or modifying prose
in .md, .markdown, or .rst files —
without an explicit user request.
The guiding principle:
only the part being edited gets sembr-shaped;
everything else stays byte-identical.
- New prose (new file, new paragraph, freshly inserted block): write in sembr from the start.
- Edits inside an existing paragraph: match the paragraph's existing line-break style. If it already follows sembr (multiple short lines, breaks after sentence terminators or clauses) — keep sembr in your edit. If it is one long line, hard-wrapped at a fixed column, or follows another visible convention — match that convention. If the paragraph is too short to tell — default to sembr.
- Untouched paragraphs: never reformat. Editing one paragraph must not change line breaks, spacing, or wording in any neighbour. Diffs must stay localised to the edited region.
- Opt-out: if the user says «не применяй sembr здесь» / «don't apply sembr here» (or sets a project-level preference) — follow the file's existing convention instead.
When NOT to use
Skip both modes for plain .txt,
GFM with <br> line-break behavior,
email,
chat (Slack, Telegram, Discord),
or any context where single newlines render as visible breaks.
Sembr there would change the rendered output and violate rule 2.
Inputs
Identify the target before editing:
- A snippet pasted in the conversation → return the reformatted text.
- A file path or section in a file → edit the file in place.
- Markdown / HTML documents → preserve all rendering (headings, lists, code blocks, links, inline markup).
Sembr applies only to prose paragraphs and prose-bearing list items and blockquotes. No-touch regions — never modify whitespace, line breaks, or any content inside:
- fenced code blocks (
```) and indented code blocks; - inline code spans (
`); - HTML islands;
- Markdown tables;
- YAML / TOML frontmatter;
- reST line blocks (lines starting with
|); - reST directives (
.. name::and their indented content); - reST literal blocks (after a trailing
::, until dedent); - reST grid and simple tables;
- reST doctest blocks (lines starting with
>>>).
If the target is ambiguous, ask before editing.
Rules
MUST (mandatory, no exceptions)
- Break after every sentence terminator —
.,!,?. A.is a terminator only when it ends a sentence — not inside abbreviations (e.g.,Mr.,U.S.,etc.), version or dotted identifiers (1.22.4,node.js,co.uk), or ellipses (…,...). When in doubt, check the next character: if it starts a new sentence (capital letter after a space, or end of paragraph), break; otherwise do not. Never alter the rendered output. The visible result after rendering (Markdown, HTML, etc.) must be byte-identical to the input. The only allowed change is replacing an intra-paragraph space with a single newline (or vice versa). Forbidden:
- adding, removing, or changing any non-whitespace character;
- inserting or removing blank lines;
- touching anything inside a no-touch region (see
Inputs); - normalizing trailing whitespace, tabs, or blank-line counts.
Verification: diff input vs. output — only space ↔ newline swaps within prose paragraphs may appear.
- Never break inside a hyphenated word
(e.g.
state-of-the-artstays on one line).
SHOULD (apply unless they would violate a MUST rule or change meaning)
- Break after each independent clause
punctuated by
,,;,:, or—(em dash). Heuristic: an independent clause has a subject and a finite verb, and could stand alone as a sentence. «I went to the store, and I bought eggs» — both sides are independent; break after the comma. «I went to the store to buy eggs» — «to buy eggs» is dependent; no break. When the structure is genuinely ambiguous, leave the clause unbroken and surface the case in the report (seeReporting). - Break before an enumerated or itemized list.
- Keep lines under 80 characters. When a line exceeds 80, break at the latest semantic boundary that satisfies the limit.
MAY (use to improve readability or to satisfy MUST/SHOULD)
- Break after a dependent clause for clarity or length.
- Break between list items to group related entries.
- Break before or after a hyperlink or inline markup.
- Allow a line to exceed 80 characters when the overflow is an unbreakable unit (URL, code span, inline markup).
Procedure
- Read the input verbatim.
- Confirm the rendering context.
For
.md,.markdown,.rst,.html, or contexts known to follow CommonMark / reST / standard HTML semantics, proceed. For plain text, GFM with<br>line-break behavior, email, chat (Slack, Telegram, Discord), or any context where single newlines render as visible breaks — in explicit-reformat mode, ask the user before continuing; in default-on-edit mode, skip sembr entirely. Sembr there would visibly change the output and violate rule 2. - Apply MUST rules first.
- Apply SHOULD rules wherever they don't conflict with a MUST rule or distort meaning.
- Use MAY rules to fit the 80-character soft limit and improve readability.
- Never paraphrase, reword, add, or remove content. If the source wording is ambiguous and forces a structural choice, ask before editing.
- Confirm the rendered output matches the input.
Examples
Bad — multi-clause line, no semantic structure:
The build pipeline succeeded; however, the deploy step failed because the secret rotated overnight, and we did not refresh the cache — so production is now serving stale config.Good — sembr-formatted:
The build pipeline succeeded;
however, the deploy step failed because the secret rotated overnight,
and we did not refresh the cache —
so production is now serving stale config.Bad — break inside a hyphenated word (violates MUST rule 3):
This is a state-
of-the-art system.Good:
This is a state-of-the-art system.Reporting
After editing, state briefly which file or section was reformatted. Do not quote the full reformatted text back to the user unless they ask.
If any rule was relaxed or skipped during the pass — ambiguous independent clause left unbroken, non-standard rendering context, unbreakable line over 80 characters, or any other place where the strict rules could not be applied confidently — list each occurrence so the user knows where the result is best effort rather than strict.
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.

