Skip to content
Skills Library
Programming · Review & audit

markdown-formatting

/markdown-formatting

Enforces markdown line-wrap and structure rules for clean git diffs. Use when writing or editing any committed markdown documentation or skill file.

Licence
MIT
Last repository change
01.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Enforces markdown line-wrap and structure rules for clean git diffs. Use when writing or editing any committed markdown documentation or skill file.

Original author description

Enforces markdown line-wrap and structure rules for clean git diffs. Use when writing or editing any committed markdown documentation or skill file.

How it works

  1. When To Use
  2. When NOT To Use
  3. Quick Reference
  4. What to Wrap
  5. What NOT to Wrap
  6. Wrapping Algorithm (Summary)
  7. Structural Rules
  8. Exit Criteria
Original SKILL.md headings · 164 lines, 647 words
SKILL.md preview
---
name: markdown-formatting
description: Enforces markdown line-wrap and structure rules for clean git diffs. Use when writing or editing any committed markdown documentation or skill file.
globs: "**/*.md"
alwaysApply: false
category: cross-plugin-patterns
tags:
  - markdown
  - formatting
  - documentation
  - line-wrapping
  - style
tools: []
complexity: low
model_hint: fast
estimated_tokens: 800
progressive_loading: true
modules:
  - modules/wrapping-rules.md
dependencies: []
---
# Markdown Formatting Conventions

## When To Use

- Writing or editing any markdown documentation
- Reviewing prose for line-wrapping compliance
- Generating markdown from plugins (scribe, sanctum, etc.)

## When NOT To Use

- Editing code blocks, tables, or frontmatter (these have
  their own formatting rules)
- Quick scratch notes that will not be committed

These conventions apply to all markdown documentation generated
or modified by any plugin. The goal: produce prose that creates
clean, reviewable git diffs and reads well on mobile devices.

## Quick Reference

When writing or editing markdown prose:

1. **Wrap prose at 80 chars** using hybrid wrapping (prefer
   sentence/clause boundaries over arbitrary word breaks)
2. **Blank line before and after every heading**
3. **ATX headings only** (`# Heading`, never setext underlines)
4. **Blank line before every list**
5. **Reference-style links** when inline links push lines
   beyond 80 chars

## What to Wrap

Wrap these content types at 80 characters:

- Paragraphs (flowing prose text)
- Blockquote text (the content after `>`)
- List item descriptions (text after `- ` or `1. `)
- Descriptions in definition lists

## What NOT to Wrap

Never wrap or reflow these content types:

- **Tables**: pipe-delimited rows stay on one line
- **Code blocks**: fenced (` ``` `) or indented content
- **Headings**: lines starting with `#`
- **Frontmatter**: YAML/TOML between `---` or `+++`
- **HTML blocks**: raw HTML elements
- **Link definitions**: `[id]: url` reference lines
- **Image references**: `![alt](url)` on their own line
- **Single-line list items**: short bullets that fit on one line

## Wrapping Algorithm (Summary)

For each prose paragraph:

1. If a sentence fits within 80 chars, keep it on one line
2. If a sentence exceeds 80 chars, break at the nearest
   **sentence boundary** (`. ` `! ` `? `) before column 80
3. If no sentence boundary, break at the nearest **clause
   boundary** (`, ` `; ` `: `) before column 80
4. If no clause boundary, break before a **conjunction**
   (`and ` `but ` `or `) before column 80
5. If none of the above, break at the last **word boundary**
   before column 80
6. Never break inside backtick spans, link text, or URLs

See `modules/wrapping-rules.md` for the full algorithm with
examples.

## Structural Rules

### Blank Lines Around Headings

```markdown
WRONG:
Some text.
## Heading
More text.

RIGHT:
Some text.

## Heading

More text.
```

Exception: the first line of a file may be a heading without
a preceding blank line.

### ATX Headings Only

```markdown
WRONG:
Heading
=======

WRONG:
Subheading
----------

RIGHT:
# Heading

RIGHT:
## Subheading
```

### Blank Line Before Lists

```markdown
WRONG:
Some introductory text:
- Item one
- Item two

RIGHT:
Some introductory text:

- Item one
- Item two
```

### Reference-Style Links for Long URLs

When an inline link pushes a line beyond 80 characters, use
reference-style syntax:

```markdown
WRONG (line too long):
See the [formatting guide](https://google.github.io/styleguide/docguide/style.html) for details.

RIGHT:
See the [formatting guide][fmt-guide] for details.

[fmt-guide]: https://google.github.io/styleguide/docguide/style.html
```

Place link definitions at the end of the current section or
at the end of the document. When the same URL appears multiple
times, use a single shared reference definition.

Short inline links that keep the line under 80 chars are fine:

```markdown
OK:
See [the guide](https://example.com) for details.
```

## Exit Criteria

- [ ] All prose lines in the edited file wrap at 80 characters or
  fewer; verified with `awk 'length>80' <file>` returning no
  matches on prose blocks (tables, code, headings, frontmatter
  excluded)
- [ ] Every heading has a blank line before and after it (except
  the first line of a file); no setext-style underline headings
  present
- [ ] Every list is preceded by a blank line
- [ ] Inline links that would push a line past 80 characters
  converted to reference-style syntax with the URL definition at
  the end of the section or document
Files in this package (2)
  • SKILL.md 4 KB
  • modules/wrapping-rules.md 5 KB

Versions

RepositoryScoreLicence
This page · athola/claude-night-market100MIT
britt/claude-code-skills100MIT

Database snapshot: 13.11.2026 · package version d5ce78df9b0d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 86markdown
    Documentation and content creation standards Triggers on: **/*.md
  • 100markdown-syntax-fundamentals
    Use when writing or editing markdown files. Covers headings, text formatting, lists, links, images, code blocks, and blockquotes.
  • 100readability
    Improves the readability, formatting, and structure of text, documentation, and markdown files. Use when the user asks to clean up text, improve clarity, or structure documentation.
  • 100repository-writing-style
    Apply the repository's writing style whenever creating or substantially editing Markdown documentation, GitHub issues, pull request descriptions, review notes, release notes, changelogs, or other contributor-facing prose.
  • 100documentation-standards
    Apply markdown documentation standards for both LLM consumption and Pandoc PDF export: section numbering, formatting and style. Use when writing or reviewing documentation.
  • 100code-formatter
    Execute automatically formats and validates code files using Prettier and other formatting tools. Use when users mention "format my code", "fix formatting", "apply code style", "check formatting", "make code consistent", or "clean up code formatting". Handles JavaScript,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.