スキル一覧に戻る
donellmccoy

markdown-expert-writer

by donellmccoy

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: markdown-expert-writer description: Use when creating or editing markdown files to ensure strict compliance with markdownlint rules and professional markdown best practices

Markdown Expert Writer (Strict Markdownlint Compliance)

Overview

This skill enables writing markdown files that strictly comply with all 30+ markdownlint rules. Markdownlint enforces consistency, readability, and compatibility across markdown parsers (kramdown, GitHub, CommonMark). Every markdown file created or edited must pass markdownlint validation with zero violations.

Core principle: Perfect markdown is consistent, readable, and parser-compatible. Every violation of a markdownlint rule represents a choice that reduces one of these qualities.

Markdownlint Rules Reference (All 30+ Rules)

This section documents all rules with violations to avoid. Rules are grouped by category for easy reference.

Headers (MD001-MD026)

RuleProblemSolutionExample
MD001Skip header levels (e.g., h1 → h3)Increment by exactly one level# H1### H3# H1## H2### H3
MD002First header isn't h1Start file with # Title## Header at start ✅ # Title first
MD003Inconsistent header style (atx vs setext)Pick one style and stick with it# ATX then Setext\n===== ✅ Consistent # H1 ## H2
MD018No space after hash in atx headerAlways: # Header not #Header#Header 1# Header 1
MD019Multiple spaces after hash in atxExactly one space: # Header# Header# Header
MD020No space inside closed atx hashesBoth sides: # Header ##Header## Header #
MD021Multiple spaces inside closed atxExactly one: # Header ## Header ## Header #
MD022Headers not surrounded by blank linesAdd blank line before/after (except edges)# Header\nText# Header\n\nText
MD023Header indented by spacesHeaders must start at column 0 # Header# Header
MD024Multiple headers with same textEach header must have unique text# Overview ... # Overview ✅ Make each title unique
MD025Multiple h1 headersOnly one top-level header per document# Title ... # Another ✅ One # Title, rest are ## H2
MD026Header ends with punctuationRemove trailing punctuation# Header.# Header

Lists (MD004-MD007, MD029-MD030)

RuleProblemSolutionExample
MD004Inconsistent unordered list markersUse same symbol throughout (*, +, or -)* Item then - Item* Item 1 * Item 2
MD005Misaligned list items at same levelIndent consistently (3 or 4 spaces)❌ Mixed indentation ✅ All 3 spaces for nested
MD006Top-level list indentedStart lists at column 0 * Item (indented) ✅ * Item (at start)
MD007Wrong list indentation depthDefault 3 spaces (or 4 spaces per config)* Item\n * Nested (2 spaces) ✅ * Item\n * Nested (3 spaces)
MD029Ordered list prefix wrongUse 1. prefix consistently (default)1. Item 2. Item1. Item 1. Item
MD030Wrong spaces after list markerExactly 1 space after marker (default)* Item (2 spaces) ✅ * Item (1 space)

Code Blocks (MD031, MD040, MD046)

RuleProblemSolutionExample
MD031Code block not surrounded by blank linesAdd blank line before/after fenced codeText\n\``\nCodeText\n\n```\nCode\n````
MD040Code block missing languageAlways specify language (or text)\``\nCode\n``````python\nCode\n````
MD046Code block style inconsistentUse fenced blocks (not indented) Code (indented) ✅ \``\nCode\n```` (fenced)
RuleProblemSolutionExample
MD011Reversed link syntaxUse [text](url) not (text)[url](Text)[http://example.com][Text](http://example.com)
MD034Bare URL without angle bracketsWrap URLs: <http://example.com>See http://example.comSee <http://example.com>
MD036Bold/italic used instead of headerUse headers for sections, not bold**Section** (emphasized) ✅ ## Section (header)
MD037Spaces inside emphasis markersRemove spaces: **bold** not ** bold **** bold ****bold**
MD038Spaces inside code backticksRemove spaces: `code` not ` code `` code ``code`
MD039Spaces inside link textRemove spaces: [link](url) not [ link ](url)[ link ](url)[link](url)

Whitespace (MD009-MD010, MD012, MD027-MD028)

RuleProblemSolutionExample
MD009Trailing spaces at end of lineRemove all trailing whitespaceText (3 spaces at end) ✅ Text (no trailing spaces)
MD010Hard tabs instead of spacesReplace tabs with spaces (2, 3, or 4)\t* Item (tab) ✅ * Item (spaces)
MD012Multiple consecutive blank linesMax 1 blank line between sectionsText\n\n\n\nMoreText\n\nMore
MD027Multiple spaces after blockquote markerExactly one space: > Quote> Quote (2 spaces) ✅ > Quote (1 space)
MD028Blank line inside blockquote (adjacent blocks)Add separator text or continue with >> Quote\n\n> Quote2> Quote\n>\n> Continuation

Blockquotes & Horizontal Rules (MD035)

RuleProblemSolutionExample
MD035Inconsistent horizontal rule styleUse same symbol throughout document--- then *** ✅ All --- or all ***

Inline HTML (MD033)

RuleProblemSolutionExample
MD033Raw HTML tags in markdownUse pure markdown instead<h1>Title</h1># Title

Code Commands (MD014)

RuleProblemSolutionExample
MD014Dollar signs in code blocks without outputRemove $ unless showing command+output$ ls (no output shown) ✅ ls or show: $ ls\nfoo bar

Blank Lines Around Blocks (MD032)

RuleProblemSolutionExample
MD032Lists not surrounded by blank linesAdd blank line before/after listsText\n* ItemText\n\n* Item\n\nMore

File Structure (MD041, MD047)

RuleProblemSolutionExample
MD041File doesn't start with h1 headerFirst line must be # Title❌ File starts with text ✅ # Title first line
MD047File doesn't end with newlineAdd final newline after last content❌ File ends: Text[EOF] ✅ File ends: Text\n[EOF]
MD013Line too long (>80 chars)Break long lines, wrap at ~80 chars❌ Very long lines ✅ Wrap to 80 char target

Perfect Markdown Pattern

Here is a complete markdown file that violates ZERO markdownlint rules:

# Document Title

## Overview

This is the main overview section. Markdown must follow strict rules for consistency and parser compatibility.

### Subsection

This is a subsection with explanation.

## Key Concepts

Here are the key points:

* First item
* Second item
* Third item

## Code Example

Here's a code example:

```python
def hello_world():
    print("Hello, world!")

Lists

Both ordered and unordered lists are supported:

  1. First step
  2. Second step
  3. Third step

Nested Lists

Proper nesting with 3 spaces:

  • Item 1
    • Nested 1.1
    • Nested 1.2
  • Item 2
    • Nested 2.1

Here are proper links:

Code Inline

Use backticks for inline code: const x = 5;

Blockquotes

Proper blockquotes with blank lines:

This is a blockquote.

This is the same blockquote continued.

Here's text after the blockquote.

Emphasis

Proper emphasis without spaces:

  • Bold text should not have spaces inside
  • Italic text should not have spaces inside

Horizontal Rule

Use consistent horizontal rules:


Conclusion

This document follows all markdownlint rules.


**Key observations about perfect markdown:**
1. **First line is h1 header** (`# Document Title`)
2. **Headers increment by 1** (h1 → h2 → h3, never h1 → h3)
3. **Headers surrounded by blank lines** (blank before and after)
4. **No trailing punctuation** on headers
5. **Single space after hash** (`# Title` not `#Title` or `#  Title`)
6. **Consistent list markers** (all `*` or all `-`, never mixed)
7. **3-space indentation** for nested lists (or configured default)
8. **Blank lines around lists** (before first item, after last item)
9. **Fenced code blocks with language** (`` ```python `` not `` ``` ``)
10. **Blank lines around code blocks**
11. **No trailing spaces** at end of lines
12. **No hard tabs** (use spaces)
13. **Links in brackets/parentheses** (`[text](url)`)
14. **No multiple blank lines** (max 1 between sections)
15. **Single newline at end of file**

## Practical Rules for Compliance

### Rule #1: Start Every File Correctly

```markdown
# File Title

This is the first content after the title.

Every file MUST:

  • ✅ Start with # Title (h1 header)
  • ✅ Have blank line after title
  • ✅ Have exactly one space after #
  • ✅ Have no trailing punctuation

Rule #2: Use Consistent Header Hierarchy

# Main Title (H1)

## Section One (H2)

### Subsection 1.1 (H3)

Some content.

### Subsection 1.2 (H3)

More content.

## Section Two (H2)

Content here.

Must follow this pattern:

  • ✅ Increment by exactly 1 level (h1 → h2 → h3, never h1 → h3)
  • ✅ Never skip levels
  • ✅ Only one h1 in document (the title)
  • ✅ Each header surrounded by blank lines
  • ✅ Headers start at column 0 (no indentation)

Rule #3: Format Lists Correctly

Unordered lists (pick one marker, use consistently):

* Item 1
* Item 2
* Item 3

Nested unordered (3 space indent):

* Item 1
   * Nested item 1.1
   * Nested item 1.2
* Item 2
   * Nested item 2.1

Ordered lists (always use 1.):

1. First step
1. Second step
1. Third step

Nested ordered (3 space indent):

1. Step 1
   1. Substep 1.1
   1. Substep 1.2
1. Step 2
   1. Substep 2.1

List requirements:

  • ✅ Blank line BEFORE first item
  • ✅ Blank line AFTER last item
  • ✅ Consistent marker throughout (all * or all -, never mixed)
  • ✅ Exactly 1 space after marker
  • ✅ Nested items use 3 spaces (not 2, not 4)
  • ✅ No hanging indents unless using multi-paragraph items

Rule #4: Format Code Blocks

Fenced code blocks (preferred):

Here's an example:

```python
def hello():
    return "world"

More text after.


**Requirements:**
- ✅ Blank line before opening fence
- ✅ Blank line after closing fence
- ✅ Always specify language (`` ```python `` not `` ``` ``)
- ✅ Use consistent fence character (always `` ``` ``)
- ✅ Use fenced, not indented code blocks

**Inline code (backticks):**

```markdown
Use the `const` keyword or `let` for variables.

Requirements:

  • ✅ No spaces inside backticks: `code` not ` code `
  • ✅ Use for short code snippets only

Proper link syntax:

[Link text](https://example.com)

Bare URLs must have angle brackets:

<https://example.com>

NOT valid:

❌ (Link text)[https://example.com]  (reversed syntax)
❌ https://example.com  (bare URL)
❌ [ Link ](url)  (spaces inside brackets)

Rule #6: Format Emphasis

Bold (no spaces inside):

This is **bold text**.

Italic (no spaces inside):

This is *italic text*.

NOT valid:

❌ This is ** bold ** text  (spaces inside)
❌ This is * italic * text  (spaces inside)

Rule #7: Use Headers, Not Bold, for Sections

Correct:

## Important Section

Content goes here.

NOT valid:

❌ **Important Section**

Content goes here.

Rule #8: Use Blockquotes Properly

Correct syntax with continuation:

> This is a blockquote.
>
> This is the same blockquote continued.

Here's text after the blockquote.

NOT valid:

❌ > Quote 1
❌ 
❌ > Quote 2
(This creates two separate quote blocks with potential parser issues)

Rule #9: Use Consistent Horizontal Rules

Some content above.

---

Some content below.

Requirements:

  • ✅ Use same symbol throughout (e.g., all ---)
  • ✅ Have blank line before and after
  • ✅ Use 3+ consecutive characters

NOT valid:

❌ ---    (some uses)
❌ ***    (other uses - inconsistent)

Rule #10: File Structure

Valid file start and end:

# Title

Content...

More content...
[EOF with newline]

Requirements:

  • ✅ Start with # Title (h1 header)
  • ✅ End with newline character (no text right before [EOF])
  • ✅ No characters after final newline
  • ✅ All lines <80 characters (except URLs or code)

NOT valid:

❌ This file starts with text, not header
❌ Text[EOF]  (no final newline)
❌ [EOF][EOF]  (multiple final newlines)

Line Length Guidelines

GuidelineMax LengthException
Regular text80 charsNone
Code blocks80 charsLong URLs or code that can't wrap
Tables80 charsMay exceed for readability
Headers80 charsNone
Lists80 charsLong URLs in list items

Wrapping strategy:

This is a very long line that exceeds the 80 character limit and needs to be
wrapped to meet markdown best practices for readability and consistency with
lint rules.

Common Mistakes & Fixes

MistakeImpactFix
Mix list markers (✗ * then -)Linting error (MD004)Use only one marker type
Missing blank line before listLinting error (MD032), parser confusionAdd blank line before first *
No language in code blockLinting error (MD040), poor readabilityAdd language: ```python
Trailing spacesLinting error (MD009)Delete spaces at line end
Hard tabs for indentLinting error (MD010)Replace tabs with spaces
Skipped header levelsLinting error (MD001)Increment by exactly 1 level
Multiple h1 headersLinting error (MD025)Only one #, rest are ## or ###
Header without blank line beforeLinting error (MD022), parser failureAdd blank line above header
Spaces inside **bold**Linting error (MD037)Remove: **bold** not ** bold **
Bare URLLinting error (MD034), no link parsingWrap: <http://example.com>
No newline at EOFLinting error (MD047)Add newline at very end
Line too longLinting error (MD013)Wrap to ~80 character target

Validation Checklist Before Submitting

Before considering any markdown file complete, verify:

  • MD001: No skipped header levels (h1 → h2 → h3, never h1 → h3)
  • MD002: First header is h1 (# Title)
  • MD003: Header style consistent (all ATX atx style with #)
  • MD004: Unordered list markers consistent (all * or all -)
  • MD005: List items at same level have same indentation
  • MD006: Top-level lists start at column 0 (not indented)
  • MD007: Nested list indentation consistent (3 or 4 spaces)
  • MD009: No trailing spaces at end of lines
  • MD010: No hard tabs (use spaces for indentation)
  • MD011: Links have correct syntax [text](url) not (text)[url]
  • MD012: No multiple consecutive blank lines
  • MD013: Lines <80 characters (except URLs)
  • MD014: No $ in code blocks unless showing output
  • MD018: Space after # in headers (# Header not #Header)
  • MD019: Only one space after # in headers (# Header not # Header)
  • MD020: Closed headers have spaces: # Header #
  • MD021: Only one space in closed headers: # Header # not # Header #
  • MD022: Headers surrounded by blank lines (except file edges)
  • MD023: Headers start at column 0 (no indentation)
  • MD024: Each header has unique text
  • MD025: Only one h1 header (top level)
  • MD026: Headers end without punctuation (. , ; : ! ?)
  • MD027: One space after blockquote marker: > Quote not > Quote
  • MD028: Blockquotes properly separated or continued with >
  • MD029: Ordered lists use 1. prefix consistently
  • MD030: Exactly 1 space after list markers
  • MD031: Code blocks surrounded by blank lines
  • MD032: Lists surrounded by blank lines
  • MD033: No inline HTML (use markdown)
  • MD034: URLs wrapped in angle brackets: <url>
  • MD035: Horizontal rules consistent (--- or ***)
  • MD036: Sections use headers, not bold text
  • MD037: No spaces inside emphasis: **bold** not ** bold **
  • MD038: No spaces inside code: `code` not ` code `
  • MD039: No spaces inside link text: [text](url) not [ text ](url)
  • MD040: Code blocks have language specified
  • MD041: First line is h1 header
  • MD046: Code blocks use fenced syntax, not indentation
  • MD047: File ends with single newline

Real-World Examples

Example 1: Project README

# MyProject

## Overview

MyProject is a framework for...

## Installation

To install MyProject:

```bash
npm install myproject

Usage

Here's a basic example:

const mp = require('myproject');

mp.start();

Features

  • Fast and lightweight
  • Easy to use
  • Well documented
    • API docs
    • Examples
    • Tutorials

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT


**Validates:**
- ✅ Starts with `# MyProject` (h1)
- ✅ Headers increment by 1 level
- ✅ All headers surrounded by blank lines
- ✅ Code blocks have language
- ✅ Lists use consistent markers
- ✅ Proper list nesting
- ✅ Ends with newline

## References

**Markdownlint Official Documentation:**
- Rules: https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md
- Style guide: https://cirosantilli.com/markdown-style-guide
- GitHub markdown: https://guides.github.com/features/mastering-markdown/

**Validation Tools:**
- Online: https://www.markdownlint.com/ (paste markdown to validate)
- CLI: `npm install -g markdownlint-cli`
- Pre-commit hook: Configure `.markdownlintrc` in repository root

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です