agentleFS
petr-korobeinikovpetr-korobeinikov/skills/skills/sembr/SKILL.md

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.

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
  1. Distinctive:

    If it already follows sembr (multiple short lines, breaks after sentence terminators or clauses) — keep sembr in your edit.

    line 45
  2. Distinctive:

    If it is one long line, hard-wrapped at a fixed column, or follows another visible convention — match that convention.

    line 48
  3. Distinctive:

    If the paragraph is too short to tell — default to sembr.

    line 51
  4. Distinctive:

    If the target is ambiguous, ask before editing.

    line 98
  5. Very specific:

    When the structure is genuinely ambiguous, leave the clause unbroken and surface the case in the report (see Reporting).

    line 145
  6. Distinctive:

    When a line exceeds 80, break at the latest semantic boundary that satisfies the limit.

    line 150
  7. Distinctive:

    Read the input verbatim.

    line 164
  8. Distinctive:

    Use MAY rules to fit the 80-character soft limit and improve readability.

    line 181
  9. Distinctive:

    Never paraphrase, reword, add, or remove content.

    line 182
  10. Distinctive:

    If the source wording is ambiguous and forces a structural choice, ask before editing.

    line 183
  11. Distinctive:

    Do not quote the full reformatted text back to the user unless they ask.

    line 221
  12. Distinctive:

    If any rule was relaxed or skipped during the pass — ambiguous independent clause left unbroken, non-standard rendering context, …

    line 224

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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)

  1. 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.
  2. 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.

  3. Never break inside a hyphenated word (e.g. state-of-the-art stays on one line).

SHOULD (apply unless they would violate a MUST rule or change meaning)

  1. 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 (see Reporting).
  2. Break before an enumerated or itemized list.
  3. 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)

  1. Break after a dependent clause for clarity or length.
  2. Break between list items to group related entries.
  3. Break before or after a hyperlink or inline markup.
  4. Allow a line to exceed 80 characters when the overflow is an unbreakable unit (URL, code span, inline markup).

Procedure

  1. Read the input verbatim.
  2. 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.
  3. Apply MUST rules first.
  4. Apply SHOULD rules wherever they don't conflict with a MUST rule or distort meaning.
  5. Use MAY rules to fit the 80-character soft limit and improve readability.
  6. Never paraphrase, reword, add, or remove content. If the source wording is ambiguous and forces a structural choice, ask before editing.
  7. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.