# processing-markdown

processing-markdown is a Claude Code skill for querying and transforming Markdown with mq. It activates for content extraction, document changes, and mq queries.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1 install
- Author: DuxLocutus
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/DuxLocutus/ai-skills/tree/HEAD/skills/mq/SKILL.md
- Updated: 2026-03-18
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/processing-markdown

## What it does

The skill uses mq queries to select parts of a Markdown document and return their content or a transformed result. It can extract headings, code blocks, links, images, list items, and other nodes, then filter them with conditions.

For multiple files, mq can gather results into one array or join file contents with a separator. Options also cover in-place updates, input and output formats, runtime variables, and line-by-line processing. With HTML input through `-I html`, queries still use Markdown selectors such as `.link` or `.h`, not HTML tag names.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add DuxLocutus/ai-skills --skill processing-markdown -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/mq/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/mq/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add DuxLocutus/ai-skills --skill processing-markdown -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/mq/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add DuxLocutus/ai-skills --skill processing-markdown -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/mq/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install DuxLocutus/ai-skills skills/mq
```

2. **Manually: put the files in place**
- File: `.github/skills/mq/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add DuxLocutus/ai-skills --skill processing-markdown -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/DuxLocutus/ai-skills --path skills/mq
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/mq/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add DuxLocutus/ai-skills --skill processing-markdown -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/DuxLocutus/ai-skills/tree/HEAD/skills/mq/SKILL.md

## When to use it
- extract headings or links from a Markdown file
- filter code blocks by language
- collect results from several Markdown files

## Example prompts
- Use `mq` to extract every heading from `README.md`.
- Find Rust code blocks in the Markdown files.
- Turn the links in `docs.md` into text strings.

## Similar
- [obsidian-markdown](https://affpapa.org/en/nevibecode/skills/obsidian-markdown.md) — skill · 490 installs
- [nutrient-document-processing](https://affpapa.org/en/nevibecode/skills/nutrient-document-processing.md) — skill · 6200 installs
- [baoyu-markdown-to-html](https://affpapa.org/en/nevibecode/skills/baoyu-markdown-to-html.md) — skill · 32900 installs
- [pdf-processing-pro](https://affpapa.org/en/nevibecode/skills/pdf-processing-pro.md) — skill · 5869 installs
- [markdown-to-html](https://affpapa.org/en/nevibecode/skills/markdown-to-html.md) — skill · 9899 installs
- [doc-to-markdown](https://affpapa.org/en/nevibecode/skills/doc-to-markdown.md) — skill · 945 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
