How Markdown is written in every repository — README, AGENTS, CONTRIBUTING, CHANGELOG, SECURITY, a skill's SKILL.md, any .md. Use when writing, editing or reviewing a Markdown file, or when a doc's lines are wrapped by hand, its code blocks carry no language, its links point at a file of the same repository by URL, or bold is everywhere. It encodes how a doc must read, whatever the stack and its tools: one paragraph per line (never wrapped by hand, no forced breaks), no trailing whitespace, c...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Markdown?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jorgecostamacia-markdown)
---
name: markdown
description: >-
How Markdown is written in every repository — README, AGENTS, CONTRIBUTING,
CHANGELOG, SECURITY, a skill's SKILL.md, any .md. Use when writing, editing or
reviewing a Markdown file, or when a doc's lines are wrapped by hand, its code
blocks carry no language, its links point at a file of the same repository by
URL, or bold is everywhere. It encodes how a doc must read, whatever the stack
and its tools: one paragraph per line (never wrapped by hand, no forced
breaks), no trailing whitespace, code spans for everything literal and bold
kept rare, fenced code blocks with their language and commands without a
prompt, relative links inside the repository, tables small and for comparisons
only, headings, alerts, images and diagrams, HTML only where Markdown cannot,
and reflowing an existing repository once.
---
# Markdown style
Markdown is what every repository is read through: on the forge, in an editor, and quoted into Releases, issues and pull requests. One way to write it, the same in every repository, so nobody has to reflow a doc to read it and a diff shows what changed. What a repository's docs hold — which files, and what goes in each — is not part of this skill. This skill says how to write any `.md`. It says how a doc must read, not which tool gets it there. Where the stack runs a formatter, its baseline configures it to keep these rules. Where no formatter runs, follow them by hand.
## One paragraph per line
- **A paragraph, a list item or a table cell is one line**, however long: never wrapped by hand at a column. The editor wraps it on screen.
- Why: a Markdown file renders the same either way, because a single line break inside a paragraph is a space. But each edit reflows a hand-wrapped paragraph, so a change of one word shows as a whole changed paragraph in the diff. And the same text copied where a line break is kept — a GitHub Release's notes, an issue, a pull request body — breaks mid-sentence. The `changelog` skill's sections are exactly that.
- No forced line breaks: no two trailing spaces, no backslash, no `<br>`. A paragraph ends with a blank line; what needs a line of its own is a list item.
- A column limit (120 columns in many style guides) is for code, not for prose.
## Whitespace
- No trailing whitespace in `.md` either: with no forced breaks, there is nothing to keep. So the repository's `.editorconfig` trims it in Markdown as everywhere, with no `trim_trailing_whitespace = false` section for `*.md`.
- LF line endings and a final newline, as the rest of the repository.
## Inline
- **Code spans for everything literal**: a file or folder name, a command, a variable, a setting, a value, a type or method, a package (`DOCKER_PORTS`, `git status`, `config.yaml`, `--no-ff`). Whatever the reader would type or search for goes in backticks.
- **Bold is rare**: the one idea of a paragraph or a list item that the reader must not miss, at most once per item. Bold on every line marks nothing. No italics for emphasis, no capitals.
- Links inside the repository are relative (`[CONTRIBUTING.md](CONTRIBUTING.md)`, `[the workflow](.github/workflows/x.yml)`): they work on the forge, in a fork, in a clone and in any branch. An absolute URL is for what lives elsewhere — another repository, a badge, an image a package page must show. The link text says where it goes, never "here".
## Blocks
- **Fenced code blocks always carry their language** (`bash`, `powershell`, `yaml`, `json`, `ts`, `text`), so the renderer highlights them and the reader knows where to run them. Write a command so that the reader can copy it: no `$` or `>` prompt, and its output, if you show it, in a block of its own.
- Lists: steps in order are a numbered list, a set of points a bulleted one (`-`). One idea per item.
- Tables are small and for comparisons (options against criteria, items against the same fields). A formatter aligns their columns, so one changed cell can re-pad the whole table in the diff: a table that keeps growing becomes a list.
- Alerts for what the reader must not skip: `> [!NOTE]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!WARNING]`, `> [!CAUTION]`, which GitHub renders as callouts, instead of bold or capitals.
- Diagrams in a ` ```mermaid ` block rather than an image: the forge renders it, and a change to it is a readable diff. An image always has alt text that says what it shows.
- HTML only where Markdown cannot (a centered banner, an image's width). Never `<br>`, `<b>`, `<i>` or a `<table>` that Markdown could write.
## Headings
- One `#` heading per file, its title; sections with `##` and below, never skipping a level.
- Sentence case (`## What it does`, `## The design, and why`), no final period, and unique in the file. A heading is also its anchor, and a link to `#versioning` must have one target.
## Bringing a repository in line
If a repository has hand-wrapped docs, reflow them only when the person asks for it. Otherwise, tell the person about them. Reflow them once, with whatever tool the stack has. Do it in a feature branch of its own, in a commit that does nothing else. The same commit removes any `trim_trailing_whitespace = false` section for Markdown from its `.editorconfig`. Review the diff: only the source's layout may change, never what the doc renders. Fix by hand what no tool judges — bold, code spans, links, headings — when you change a file.