This skill should be used when working with Markdown, writing documentation, formatting markdown files, or reviewing markdown content.
This skill defines conventions for writing Markdown files, formatting documentation, and maintaining consistent style across all projects. Following these conventions ensures readable, maintainable, and correctly rendered markdown content.
When working in established repositories, always respect existing markdown conventions and patterns.
If the project uses setext headings, a non-standard line length, or different list indentation,
follow it. If the project has a .markdownlint.json or .markdownlint-cli2.jsonc config, those
rules take precedence. These preferences apply to new markdown and scaffold output only.
Use ATX-style headings (#) with proper hierarchy. Never skip heading levels.
# CORRECT: Proper heading hierarchy
# Title
## Section
### Subsection
### Another Subsection
## Next Section
# WRONG: Skipped heading levels
# Title
### Subsection (skipped ##)
## Section
#### Deep (skipped ###)
#), not setext (underlines) — unless project convention dictates otherwise## after #, never ### after ##) per file — the document titleAlways specify a language tag on fenced code blocks. Use triple backticks and maintain consistent fence style throughout the project.
```python
# CORRECT: Language tag specified
def hello():
print("Hello, world!")
```
```bash
# CORRECT: Shell commands
npm install
npm run build
```
```text
# CORRECT: Plain output
CORRECT for non-code output
```
```json
{
"CORRECT": "structured data"
}
```
python, bash, json, text, yaml, dockerfile, etc.text for plain output with no syntax highlightingPrefer relative paths for internal links. Use descriptive link text in narrative documentation.
<!-- CORRECT: Relative internal links -->
See the [setup guide](./docs/setup.md) for installation instructions.
Refer to the [API reference](../api/README.md) for endpoint details.
<!-- CORRECT: Reference-style for repeated links -->
The [API docs][api] describe all endpoints. See the [API reference][api] for more.
[api]: ./docs/api/README.md
<!-- WRONG: Bare URL in prose -->
Visit https://example.com/docs for documentation.
<!-- WRONG: Meaningless link text -->
[Click here](./docs/setup.md) for the setup guide.
./docs/setup.md)[text][ref] for links used more than once<url> syntax is acceptable in dedicated "References" or "Links" sectionsUse consistent indentation and blank lines around lists.
<!-- CORRECT: Consistent 2-space indentation -->
- Item one
- Nested item
- Another nested item
- Deeply nested
- Item two
<!-- CORRECT: Blank lines around lists -->
Some paragraph text.
- Item one
- Item two
- Item three
Next paragraph text.
- for unordered lists (consistent marker)1. for ordered lists (let the renderer handle numbering)Default maximum line length is 100 characters. Respect the project's markdownlint config if present.
Exceptions (lines that may exceed the limit):
YAML frontmatter appears between --- markers at the very start of the file.
---
Edit PDFs with natural-language instructions using the nano-pdf CLI.