Guidelines for writing clean, structured, and lint-compliant Markdown documentation.

Install

mkdir -p .claude/skills/markdown && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11388" && unzip -o skill.zip -d .claude/skills/markdown && rm skill.zip

Installs to .claude/skills/markdown

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when authoring, editing, or reviewing Markdown files — covers proper syntax, lint rules, formatting best practices, tables, code blocks, and deprecated patterns to avoid
173 chars✓ has a “when” trigger
Beginner

Key capabilities

  • Ensure one H1 per document
  • Increment headings by one level
  • Start documents with a heading
  • Use ATX headings style
  • Maintain consistent list markers and indentation

How it works

The skill provides a reference for writing correct, clean, and lint-compliant Markdown by outlining best practices for document structure, spacing, lists, and code blocks.

Inputs & outputs

You give it
Markdown file content
You get back
Lint-compliant and well-formatted Markdown

When to use markdown

  • Writing documentation
  • Linting markdown files
  • Formatting project READMEs

About this skill

Markdown Authoring

Reference skill for writing correct, clean, lint-compliant Markdown. Covers CommonMark, GitHub Flavored Markdown (GFM), markdownlint rules, best practices, and common mistakes.

Sub-files for detailed reference:

  • markdown-reference.md — Advanced examples, edge cases, tables, nested structures, GitHub extensions
  • documentation/markdownlint-rules.md — Complete markdownlint rule list with IDs, aliases, tags, inline config
  • documentation/markdown-syntax-guide.md — Full CommonMark and GFM syntax reference

Best Practices Summary

Document Structure

  • One H1 per document (MD025) — use # for the document title only
  • Increment headings by one (MD001) — never skip levels (e.g., ######)
  • Start with a heading (MD041) — first line should be # (unless YAML front matter)
  • End with a newline (MD047) — single trailing newline at end of file
  • Use ATX headings (MD003) — # Heading style, not setext underline style

Spacing

  • Blank lines around block elements — headings (MD022), lists (MD032), code blocks (MD031), tables (MD058)
  • No multiple blank lines (MD012) — only one blank line between elements
  • No trailing spaces (MD009) — remove invisible trailing whitespace
  • No hard tabs (MD010) — use spaces for indentation
  • Space after # (MD018) — # Heading not #Heading

Lists

  • Consistent markers (MD004) — use - for unordered lists, don't mix with * or +
  • Consistent indentation (MD005) — indent nested items by 2 spaces
  • Surround with blank lines (MD032) — blank line before and after every list

Code Blocks

  • Always specify a language (MD040) — ```typescript not ```
  • Use fenced blocks (MD046) — never use indented code blocks
  • Use backticks (MD048) — not tildes (~~~)
  • Surround with blank lines (MD031) — blank line before and after every fenced block

Links & Images

  • No bare URLs (MD034) — use [text](url) or <url>
  • Descriptive link text (MD059) — never use "click here" or "link"
  • Always add alt text (MD045) — ![description](image.png)
  • No empty links (MD042) — every link must have an href

Tables

  • Surround with blank lines (MD058) — blank line before and after every table
  • Consistent column counts (MD056) — every row must have the same number of pipes
  • Use leading/trailing pipes| Cell | not Cell
  • Compact tables preferred| --- | not |---| or | --- |
  • Aligned tables are not preferred unless the cell content is very short

Most Common Lint Rules (Quick Reference)

RuleAliasWhat It Catches
MD001heading-incrementSkipped heading levels (######)
MD009no-trailing-spacesInvisible trailing whitespace
MD012no-multiple-blanksTwo or more consecutive blank lines
MD013line-lengthLines longer than 80 chars (usually disabled, so safe to ignore)
MD022blanks-around-headingsMissing blank line before/after heading
MD031blanks-around-fencesMissing blank line before/after code block
MD032blanks-around-listsMissing blank line before/after list
MD033no-inline-htmlRaw HTML tags in Markdown
MD034no-bare-urlsURLs without link syntax
MD040fenced-code-languageCode block without language identifier
MD041first-line-h1File doesn't start with H1 heading
MD047single-trailing-newlineFile doesn't end with exactly one newline
MD058blanks-around-tablesMissing blank line before/after table

Correct Patterns

Headings

# Document Title

## Section

### Subsection

#### Detail Level

Table

Aligned tables (not preferred, unless cell content is very short)

Pipes are aligned in every row, no before/after space requirement.

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |

Compact tables (preferred)

One space before and after the pipe.

| Column 1 | Column 2 | Column 3 |
| --- | --- | --- |
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |

Tight tables (not preferred, hard to read)

No space before or after the pipe.

|Column 1|Column 2|Column 3|
| --- | --- | --- |
|Cell 1|Cell 2|Cell 3|
|Cell 4|Cell 5|Cell 6|

Column Alignment

Use colons to align columns.

| Left     |  Center   | Right    |
|:---------|:---------:|---------:|
| Aligned  |  Aligned  |  Aligned |
  • :--- = Left-aligned (default)
  • :---: = Center-aligned
  • ---: = Right-aligned

Fenced Code Block

Use 3 backticks for fenced code blocks. Code blocks MUST have a language identifier.

```typescript
interface User {
  id: string;
  name: string;
}
```

Links

See the [configuration guide](https://example.com/config) for details.

Download the [latest release][release].

[release]: https://github.com/user/repo/releases/latest

List

Prerequisites:

- Node.js 20+
- npm 10+
- VS Code (recommended)

Steps:

1. Clone the repository
2. Install dependencies
3. Start the dev server

Deprecated / Incorrect Patterns

❌ Deprecated / Wrong✅ Use InsteadRule
#Heading (no space)# HeadingMD018
Setext headings (===, --- underlines)ATX headings (#, ##)MD003
# at end of heading (## Heading ##)No closing hashesMD020/021
Indented code blocks (4 spaces)Fenced code blocks (```)MD046
~~~ tilde fences``` backtick fencesMD048
Bare URLs (https://...)[text](url) or <url>MD034
(text)[url] (reversed)[text](url)MD011
* text * (spaces in emphasis)*text*MD037
` code ` (spaces in code)`code`MD038
[ text ](url) (spaces in link)[text](url)MD039
Trailing punctuation in heading (## Why?)## WhyMD026
**Bold Text** used as heading## Bold Text as proper headingMD036
"Click here" link textDescriptive: "See the API docs"MD059
![](image.png) (no alt text)![Description](image.png)MD045

Deprecated Setext Headings

<!-- ❌ DEPRECATED: Setext style -->
My Heading
==========

Sub Heading
-----------

<!-- ✅ CORRECT: ATX style -->
# My Heading

## Sub Heading

Deprecated Indented Code

<!-- ❌ DEPRECATED: Indented code block -->
    function hello() {
      return "world";
    }

<!-- ✅ CORRECT: Fenced code block with language -->
```javascript
function hello() {
  return "world";
}
```

Deprecated Closed ATX Headings

<!-- ❌ DEPRECATED: Closed ATX -->
## My Heading ##

<!-- ✅ CORRECT: Open ATX -->
## My Heading

Inline Lint Controls

Disable rules selectively only when you have the explicit permission of the user and have explained the reason for the exception. Always prefer surgical disables over blanket disables.:

<!-- Disable for the next line -->
<!-- markdownlint-disable-next-line MD013 -->
This is a deliberately long line that exceeds the default limit for display purposes.

<!-- Disable for a block, then restore -->
<!-- markdownlint-disable MD033 -->
<details>
<summary>Expandable section</summary>
Content here.
</details>
<!-- markdownlint-restore -->

<!-- Configure for entire file -->
<!-- markdownlint-configure-file { "MD013": { "line_length": 120 } } -->

Best practice: Prefer <!-- markdownlint-disable-next-line --> for surgical exceptions. Avoid blanket <!-- markdownlint-disable --> without a corresponding <!-- markdownlint-restore -->.


Common Mistakes

MistakeFix
No blank line before a listAdd blank line — list won't render without it in some parsers
No blank line after headingAdd blank line — required by MD022
Mixing *, -, + in listsPick one marker (prefer -) and use it consistently
Table missing separator rowAdd |---|---| row between header and body
Code block not closingMatch the number of backticks/tildes in opening and closing
Skipping heading levelsNever jump from ## to #### — go #########
Using emphasis as a headingUse a real ## heading instead of **Bold Text** on its own line
Image without alt textAlways include ![meaningful description](url)
File not ending with newlineEnsure single \n at end of file

GitHub Alerts (Admonitions)

> [!NOTE]
> Background information the reader should know.

> [!TIP]
> Helpful advice for doing things better.

> [!IMPORTANT]
> Key information users need to know.

> [!WARNING]
> Potential issues that could cause problems.

> [!CAUTION]
> Actions that could cause data loss or security risks.

Quick Reference Links

When not to use it

  • When the user intends to use setext underline style headings
  • When the user prefers indented code blocks
  • When the user wants to use bare URLs

Limitations

  • Does not support setext underline style headings
  • Does not support indented code blocks
  • Requires explicit language specification for fenced code blocks

How it compares

This skill offers specific rules and examples for Markdown authoring, ensuring consistency and readability, unlike a manual approach that might lead to varied formatting and linting issues.

Compared to similar skills

markdown side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
markdown (this skill)04moNo flagsBeginner
ml-paper-writing486moReviewAdvanced
docs-review107moNo flagsBeginner
claude-md-improver216moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

ml-paper-writing

davila7

Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Use when drafting papers from research repos, structuring arguments, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, reviewer guidelines, and citation verification workflows.

4897

docs-review

metabase

Review documentation changes for compliance with the Metabase writing style guide. Use when reviewing pull requests, files, or diffs containing documentation markdown files.

1085

claude-md-improver

anthropics

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".

2167

write-docs

tldraw

Writing SDK documentation for tldraw. Use when creating new documentation articles, updating existing docs, or when documentation writing guidance is needed. Applies to docs in apps/docs/content/.

665

update-docs

vercel

This skill should be used when the user asks to "update documentation for my changes", "check docs for this PR", "what docs need updating", "sync docs with code", "scaffold docs for this feature", "document this feature", "review docs completeness", "add docs for this change", "what documentation is affected", "docs impact", or mentions "docs/", "docs/01-app", "docs/02-pages", "MDX", "documentation update", "API reference", ".mdx files". Provides guided workflow for updating Next.js documentation based on code changes.

2543

wiki-architect

microsoft

Analyzes code repositories and generates hierarchical documentation structures with onboarding guides. Use when the user wants to create a wiki, generate documentation, map a codebase structure, or understand a project's architecture at a high level.

1144

Search skills

Search the agent skills registry