Platform Notes
- Optional helper plugins may help in some environments, but they must not be treated as required for this skill.
Markdown Lint Cleanup
Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.
Use When
- Fix markdown lint warnings by enforcing headings, blank lines around lists, and language-tagged code fences for clean documentation.
Evidence Produced
| Category |
Artifact |
Format |
Example |
| Correctness |
Markdown lint cleanup record |
Markdown doc tracking lint warnings fixed (headings, blank lines around lists, language-tagged fences) per pass |
docs/lint/markdown-cleanup-2026-04-16.md |
References
- Use the links and companion skills already referenced in this file when deeper context is needed.
Overview
Use this skill to clean markdown files so they pass lint checks with zero warnings. It focuses on consistent headings, spacing, and fenced code block language tags.
When to Use
- Markdown lint warnings appear (MD022, MD032, MD036, MD040, MD031)
- Documentation updates need a clean lint pass
- Large docs need formatting normalization without content changes
Core Rules (Required)
- Headings must be proper headings
- Replace bold-only headings with
##, ###, etc.
- Blank lines around lists
- Add a blank line before and after lists
- Blank lines around fenced code blocks
- Surround code fences with blank lines
- Language tags on fenced code blocks
- Use
bash, php, sql, or text as appropriate
Common Fixes
MD036: Emphasis used instead of a heading
Replace:
Section Title
With:
Section Title
MD032: Blanks around lists
Ensure blank lines before and after lists:
Text paragraph.
Next paragraph.
MD022: Blanks around headings
Add a blank line before and after headings:
Paragraph text.
Heading
MD040: Fenced code language
Add a language identifier:
Example output line
MD031: Blanks around fences
Ensure fences are separated from other text:
Paragraph text.
php scripts/verify_uom_system.php
File Safety
- Do not change meaning or content structure
- Only adjust formatting to satisfy lint rules
- Preserve links and references exactly
Recommended Workflow
- Identify lint warnings and their line numbers
- Apply targeted fixes (headings, spacing, code fence languages)
- Re-check lint until clean
Output Expectations
- No markdown lint warnings
- No content meaning changes
- Consistent formatting across documents
Decision Rules
| Condition |
Action |
| Fix is mechanical and meaning-preserving |
Apply narrowly |
| Rule conflicts with repository style |
Follow repository configuration |
| Fix alters meaning |
Stop and report separately |
Capability Contract
Read and search are required. Editing and lint execution require authorisation.
Degraded Mode
Fallback: without execution, return the patch and name the lint command still required.
Domain Anti-Patterns
- Rewording prose during formatting cleanup.
- Renumbering headings without checking links.
- Guessing a code-fence language.
- Formatting vendored files unintentionally.
- Claiming a clean run without evidence.
Inputs
| Artefact |
Required? |
Purpose |
| Markdown scope, lint rules, repository conventions, and protected content |
yes |
Bound safe cleanup |
Outputs
- Produce cleaned Markdown, lint results, and a note of intentionally retained exceptions.
1---2name: markdown-lint-cleanup3description: Use when fixing Markdown lint failures, heading structure, list spacing, code-fence languages, or local formatting consistency without changing document meaning.4---56## Platform Notes78- Optional helper plugins may help in some environments, but they must not be treated as required for this skill.910# Markdown Lint Cleanup11Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.1213<!-- dual-compat-start -->14## Use When1516- Fix markdown lint warnings by enforcing headings, blank lines around lists, and language-tagged code fences for clean documentation.1718## Evidence Produced1920| Category | Artifact | Format | Example |21|----------|----------|--------|---------|22| Correctness | Markdown lint cleanup record | Markdown doc tracking lint warnings fixed (headings, blank lines around lists, language-tagged fences) per pass | `docs/lint/markdown-cleanup-2026-04-16.md` |2324## References2526- Use the links and companion skills already referenced in this file when deeper context is needed.27<!-- dual-compat-end -->28## Overview2930Use this skill to clean markdown files so they pass lint checks with zero warnings. It focuses on consistent headings, spacing, and fenced code block language tags.3132## When to Use3334- Markdown lint warnings appear (MD022, MD032, MD036, MD040, MD031)35- Documentation updates need a clean lint pass36- Large docs need formatting normalization without content changes3738## Core Rules (Required)39401. **Headings must be proper headings**41 - Replace bold-only headings with `##`, `###`, etc.422. **Blank lines around lists**43 - Add a blank line before and after lists443. **Blank lines around fenced code blocks**45 - Surround code fences with blank lines464. **Language tags on fenced code blocks**47 - Use `bash`, `php`, `sql`, or `text` as appropriate4849## Common Fixes5051### MD036: Emphasis used instead of a heading5253**Replace**:5455**Section Title**5657**With**:5859## Section Title6061### MD032: Blanks around lists6263Ensure blank lines before and after lists:6465Text paragraph.6667- Item one68- Item two6970Next paragraph.7172### MD022: Blanks around headings7374Add a blank line before and after headings:7576Paragraph text.7778#### Heading7980- List item8182### MD040: Fenced code language8384Add a language identifier:8586```text87Example output line88```8990### MD031: Blanks around fences9192Ensure fences are separated from other text:9394Paragraph text.9596```bash97php scripts/verify_uom_system.php98```99100## File Safety101102- Do not change meaning or content structure103- Only adjust formatting to satisfy lint rules104- Preserve links and references exactly105106## Recommended Workflow1071081. Identify lint warnings and their line numbers1092. Apply targeted fixes (headings, spacing, code fence languages)1103. Re-check lint until clean111112## Output Expectations113114- No markdown lint warnings115- No content meaning changes116- Consistent formatting across documents117118## Decision Rules119120| Condition | Action |121|---|---|122| Fix is mechanical and meaning-preserving | Apply narrowly |123| Rule conflicts with repository style | Follow repository configuration |124| Fix alters meaning | Stop and report separately |125126## Capability Contract127128Read and search are required. Editing and lint execution require authorisation.129130## Degraded Mode131132Fallback: without execution, return the patch and name the lint command still required.133134## Domain Anti-Patterns135136- Rewording prose during formatting cleanup.137- Renumbering headings without checking links.138- Guessing a code-fence language.139- Formatting vendored files unintentionally.140- Claiming a clean run without evidence.141## Inputs142| Artefact | Required? | Purpose |143|---|---|---|144| Markdown scope, lint rules, repository conventions, and protected content | yes | Bound safe cleanup |145## Outputs146- Produce cleaned Markdown, lint results, and a note of intentionally retained exceptions.