Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/harehare/mq/processing-markdownnpx skills add harehare/mq --skill processing-markdowngit clone --depth 1 https://github.com/harehare/mqWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00036 | $0.01795 |
| Opus 5 | $0.00018 | $0.00898 |
| Sonnet 5 | $0.00007 | $0.00359 |
| Haiku 4.5 | $0.00004 | $0.00179 |
Grade A, and why
processing-markdown scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s https://example.com | mq -I html '.p | to_text' How it starts
The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Processing Markdown with mq
Core Selectors
| Selector | Description |
|---|---|
.h |
All headings |
.h1–.h6 |
Specific heading level |
.text |
Text nodes |
.code |
Code blocks |
.code_inline |
Inline code |
.strong |
Bold text |
.emphasis |
Italic text |
.delete |
Strikethrough |
.link |
Links |
.image |
Images |
.list |
List items |
.blockquote |
Block quotes |
.[][] |
Table cells |
.html / .<> |
HTML nodes |
.footnote |
Footnotes |
.math |
Math blocks |
.yaml, .toml |
Frontmatter |
.link_ref |
Link references |
.image_ref |
Image references |
.definition |
Link/image definitions |
Selector Calls (Filtered Matching)
.h(1) # Only h1 headings
.h(2, 3) # h2 and h3 headings
.h(1..3) # h1 through h3 (range)
.code("rust") # Only Rust code blocks
Key Attribute Access
.h.level / .h.depth # Heading level (1–6)
.h.value # Heading text
.code.lang # Code language
.code.value # Code content
.link.url # Link URL
.image.alt # Image alt text
.list.checked # Checkbox state (boolean)
."key" # Dict key access (property selector)
Update Operator
.code.lang |= "rust" # Change code language in-place
.link.url |= "https://new" # Update link URL
Recursive Descent
..ident # Recursively select matching nodes in nested structures
Common Patterns
# Extract
mq '.h' file.md # All headings
mq '.h(2)' file.md # h2 only
mq '.code("rust")' file.md # Rust code blocks
mq '.link.url' file.md # All URLs
mq '.yaml | to_text' post.md # Frontmatter
# Filter
mq 'select(.code)' file.md # Only code blocks
mq 'select(!.code)' file.md # Exclude code blocks
mq 'select(.h.level <= 2)' file.md # h1 and h2 only
mq 'select(contains("TODO"))' file.md # Nodes with "TODO"
# Transform
mq '.h | to_text' file.md # Headings as plain text
mq -U '.code.lang |= "rust"' file.md # Update in place
# Multi-file
mq -A 'pluck(.code.value)' *.md # Collect code values, per file
mq --eval-all -A '.h | to_text' *.md # Combine all files into one query (e.g. cross-file TOC)
mq -S 's"\n---\n"' 'identity' *.md # Merge with separator
# mq accepts multiple file args directly (shell glob expansion) —
# no need to loop over files in bash:
mq '.h | to_text' *.md work/*.md docs/*.md
# Format conversion
mq -F html 'identity' file.md # Markdown → HTML
mq -F json '.h | to_text' file.md # Headings → JSON
mq -I html 'identity' page.html # HTML → Markdown
# Streaming large files
mq --stream 'select(contains("ERROR"))' large.md
# Section operations (needs -A or `nodes` — see EXAMPLES.md)
mq -A 'section::section("Installation")' file.md # Extract section by heading
mq -A 'section::filter_sections(fn(s): section::title(s) != "Deprecated";) | section::collect()' file.md # Delete section by heading
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 183 lines · 36 tokens per session scan A 013908de0492
processing-markdown is a skill published in the GitHub repository harehare/mq (1,023 stars, last pushed 2d ago), licensed MIT. It adds 36 tokens to every session and 1,795 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
markdown-documents
Use when creating or editing Markdown documents, notes, reports, briefs, drafts, or other editable writing where Markdown should be the primary artifact format.
migrate-v0-to-v1
Migrate a Scraps wiki from v0 to v1. Use this whenever the user asks to upgrade Scraps, migrate v0 wiki syntax/config, convert implicit tags to explicit #[[tag]], move from scraps-writer to scraps, or audit a wiki for v1 readiness. This skill is designed for one-pass LLM-led migrations that discover the latest v0 and…
kimun-cli
Use when the user has kimun installed and wants to create, append, search, or read notes from the terminal, or when automating note management as part of a workflow or agent task.
hwpforge
Generate, inspect, edit, and fill Korean HWP/HWPX documents using HwpForge. Use when the user asks to create a Korean government document, proposal, report, or official letter; convert Markdown to HWPX; convert an old HWP5 (.hwp) file to HWPX; fill in a Korean template (e.g. 국가과제 제안서) with content; edit/append content…
ingest
Create a new scrap from a source (prompt, URL, or arbitrary markdown), update cross-links in related scraps, and run a sanity check. Use this when the user wants to add a scrap, summarize an article, save synthesized content to the wiki, or file back a Q&A result.
query
Answer questions about the wiki by searching, reading, and synthesizing relevant scraps with [[Title]] citations. Use this when the user wants to query the wiki, ask what they have written about a topic, compare scraps, find related notes, or pull a synthesized overview from existing scraps.