skills/markdown/SKILL.md
Markdown syntax, formatting, and document authoring for docs, READMEs, and technical writing. Use when user mentions "markdown", "write README", "format markdown", "markdown table", "markdown links", "GFM", "GitHub flavored markdown", "markdown linting", "MDX", "markdown to HTML", "table of contents", "markdown badges", "markdown checklist", or authoring documentation in markdown.
npx skillsauth add 1mangesh1/dev-skills-collection markdownInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference for markdown documents covering core syntax, GFM extensions, README patterns, technical docs, MDX, and linting. See references/markdown-guide.md for a syntax cheat sheet and references/tech-writing-guide.md for documentation structure.
# H1 - Document Title (one per file)
## H2 - Major Section
### H3 - Subsection
#### H4 - Detail Level
Use ATX style (#), not Setext. Space after #. Never skip levels. One H1 per file.
*italic* **bold** ***bold italic*** ~~strikethrough~~
`inline code` <kbd>Ctrl+C</kbd> <sup>super</sup> <sub>sub</sub>
Prefer * over _ -- underscores in some_variable_name cause issues in some parsers.
[Text](https://example.com) # inline link
[With title](https://example.com "Hover") # titled link
[Relative](./docs/setup.md) # relative path
[Anchor](#section-name) # heading link
 # image
<!-- Reference-style (cleaner in long docs) -->
See the [guide][contrib] and [CoC][coc].
[contrib]: ./CONTRIBUTING.md
[coc]: ./CODE_OF_CONDUCT.md
- Item one # unordered (use - consistently)
- Nested (2-space indent)
1. First step # ordered
2. Second step
- [x] Done # task list (GFM)
- [ ] Pending
Inline: `npm install`
```javascript
function greet(name) {
return `Hello, ${name}!`;
}
```
```diff
- const port = 3000;
+ const port = process.env.PORT || 3000;
```
Always specify the language: javascript, typescript, python, bash, json, yaml, sql, html, css, diff.
> Blockquote text.
> > Nested quote.
--- # horizontal rule (blank lines above/below)
| Feature | Free | Pro | Enterprise |
|---------|------|--------|------------|
| Users | 5 | 50 | Unlimited |
| Storage | 1 GB | 10 GB | 100 GB |
| Left | Center | Right |
|:-----------|:----------:|------------|
| aligned | centered | right |
> [!NOTE] > [!TIP] > [!IMPORTANT]
> Info text. > Advice text. > Key info.
> [!WARNING] > [!CAUTION]
> Urgent info. > Negative consequences.
This needs a source[^1].
[^1]: Source: https://example.com/study
https://example.com <!-- auto-linked -->
@username <!-- user mention -->
#123 <!-- issue reference -->
org/repo#456 <!-- cross-repo reference -->
<details>
<summary>Click to expand</summary>
Content here (blank line required after summary tag).
</details>
Inline: $E = mc^2$
$$
\frac{n!}{k!(n-k)!} = \binom{n}{k}
$$
```mermaid
graph TD
A[Request] --> B{Auth?}
B -->|Yes| C[API Gateway]
B -->|No| D[Login]
C --> E[(Database)]
```
```mermaid
sequenceDiagram
Client->>Server: POST /api/users
Server->>DB: INSERT
DB-->>Server: OK
Server-->>Client: 201 Created
```
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [CLI](#cli)
- [API](#api)
Anchor rules: lowercase, spaces become -, strip punctuation. Auto-generate with scripts/markdown-linter.sh (generate_toc function), VS Code "Markdown All in One", or markdown-toc npm package.





Parameters: ?style=flat-square, ?logo=typescript, ?label=custom, ?color=ff6600.
See examples/markdown-structure.json for a structured template and references/tech-writing-guide.md for guidance. Standard sections in order:
src/
├── index.ts # Entry point
├── routes/
│ ├── auth.ts # Auth routes
│ └── users.ts # User CRUD
└── utils/
└── logger.ts # Logging
Generate with tree -I node_modules, then annotate.
Follow this hierarchy (detailed in references/tech-writing-guide.md):
### Create User
`POST /api/v1/users`
| Field | Type | Required | Description |
|---------|--------|----------|-------------------|
| `name` | string | Yes | Full name |
| `email` | string | Yes | Email address |
**Response (201):**
\`\`\`json
{ "id": "usr_abc123", "name": "Alice", "email": "[email protected]" }
\`\`\`
MDX combines markdown with JSX for interactive docs (Docusaurus, Nextra, Astro). MDX v2+ uses ESM imports.
import { Button } from '@/components/Button';
import { Callout } from '@/components/Callout';
# Button Component
<Callout type="info">Requires a parent `ThemeProvider`.</Callout>
<Button variant="primary">Click me</Button>
| Prop | Type | Default |
|-----------|-----------------------------|-------------|
| `variant` | `'primary' \| 'secondary'` | `'primary'` |
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` |
npm install -g markdownlint-cli
markdownlint "**/*.md"
markdownlint --fix "**/*.md"
Configuration (.markdownlint.json):
{
"MD013": { "line_length": 120 },
"MD033": false,
"MD041": true,
"MD024": { "siblings_only": true }
}
Key rules: MD001 heading increment, MD009 no trailing spaces, MD013 line length, MD024 no duplicate sibling headings, MD033 no inline HTML (disable for <details>/<kbd>), MD041 first line is H1.
npm install remark-cli remark-preset-lint-recommended
npx remark --frail docs/
Use scripts/markdown-linter.sh for local linting. For CI:
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@v19
with:
globs: '**/*.md'
Use scripts/markdown-stats.py to estimate reading time and word counts.
pandoc README.md -o README.html # basic HTML
pandoc README.md -s --toc -o README.html # standalone with TOC
pandoc README.md -o README.pdf # PDF (requires LaTeX)
npx marked -i README.md -o README.html # GFM-compatible
| Mistake | Fix |
|---------|-----|
| No blank line before list | Add blank line above |
| No blank line after heading | Always blank line after |
| Spaces in URL [text](my url) | URL-encode: %20 or use <url> |
| Missing language on code fence | Always add: ```python |
| Mixing * and - for lists | Pick one, stick to it |
| Wrong nested list indent | 2 spaces for unordered, 4 for ordered |
| --- without blank line above | Becomes Setext heading -- add blank line |
| Bare URLs | Use <https://url> or [text](url) |
\*literal asterisks\* \# not a heading \| not a table pipe
Characters needing escape: \ ` * _ {} [] () # + - . ! |
VS Code: Markdown All in One (shortcuts, TOC, preview), markdownlint (inline warnings), Markdown Preview Mermaid Support, Paste Image.
Prettier: Add "proseWrap": "always" and "printWidth": 80 in an override for *.md files.
tools
Parallel execution with xargs, GNU parallel, and batch processing patterns. Use when user mentions "xargs", "parallel", "batch processing", "run in parallel", "parallel execution", "process list of files", "bulk operations", "concurrent commands", "map over files", or running commands on multiple inputs.
development
WebSocket implementation for real-time bidirectional communication. Use when user mentions "websocket", "ws://", "wss://", "real-time", "live updates", "chat application", "socket.io", "Server-Sent Events", "SSE", "push notifications", "live data", "streaming data", "bidirectional communication", "websocket server", "reconnection", or building real-time features.
tools
Frontend bundler configuration for Webpack and Vite. Use when user mentions "webpack", "vite", "bundler", "vite config", "webpack config", "code splitting", "tree shaking", "hot module replacement", "HMR", "build optimization", "bundle size", "chunk splitting", "loader", "plugin", "esbuild", "rollup", "dev server", or configuring JavaScript build tools.
tools
VS Code configuration, extensions, keybindings, and workspace optimization. Use when user mentions "vscode", "vs code", "vscode settings", "vscode extensions", "keybindings", "code editor", "workspace settings", "settings.json", "launch.json", "tasks.json", "vscode snippets", "devcontainer", "remote development", or customizing their VS Code setup.