querying-markdown

querying-markdown is a skill for Claude Code from oaustegard/claude-skills. It costs 108 tokens per session (1,477 once invoked), scanned A, original, MIT.

A command-line tool for querying Markdown by its structure, similar to how jq queries JSON. Markdown is plain text with conventions for headings, links, quotes, and code blocks.

In plain words
What is it for?
Use it to extract sections, headings, links, or language-specific code blocks, create tables of contents, and transform Markdown documents in batches.
Why use it?
It lets you select document elements such as headings or code blocks without depending on their exact line positions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the development-tools plugin — 1 skill shipped together

Good fit Use it to extract sections, headings, links, or language-specific code blocks, create tables of contents, and transform Markdown documents in batches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oaustegard/claude-skills/querying-markdown
Install

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.

Any agent
npx skills add oaustegard/claude-skills --skill querying-markdown
Clone the repo
git clone --depth 1 https://github.com/oaustegard/claude-skills

Made for: Claude Code.

Or install development-tools, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for querying-markdown

README.md
[![agentmods](https://agentmods.dev/badge/skills/oaustegard/claude-skills/querying-markdown/github.svg)](https://agentmods.dev/skills/oaustegard/claude-skills/querying-markdown)
Your own site
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/querying-markdown"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/querying-markdown/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for querying-markdown

Your own site · 80×15
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/querying-markdown"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/querying-markdown.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,477 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01477
Opus 5 $0.00054 $0.00739
Sonnet 5 $0.00022 $0.00295
Haiku 4.5 $0.00011 $0.00148

Measured 9d ago against content hash b32215eac22c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

querying-markdown scanned grade A with 0 findings 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/install-mq.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/development-tools/skills/querying-markdown/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

querying-markdown

mq is "jq for Markdown" — it parses a .md file into a node stream and lets you select, filter, and transform by structure (.h2, .code("rust"), .link) instead of by line-matching. Reach for it when the task is structural: "every H2 title", "all bash code blocks", "a table of contents", "strip the frontmatter". For plain substring search, grep is still the right tool; for code (not prose) structure, use tree-sitting.

Before you use mq: is this actually a structural task?

mq parses the whole document into a node tree before it answers, and that parse cost is real (see Empirical findings). Most "query a markdown file" tasks don't need it. Decide first, using the target — not the file type:

Your target Use Why
Lines with a fixed prefix — #/## headings, > quotes, - bullets, a leading line/verse number grep / awk Line-matching, not structure. grep is faster and already installed.
A substring anywhere grep mq adds nothing.
Code structure inside fences (ASTs, symbols, call sites) tree-sitting mq sees the fence, not the code inside it.
Language-filtered code blocks (.code("bash")); links as structured (text, url) (-F json '.link') mq grep can't filter a fenced block by language without a brittle hand-rolled fence state machine.
Markdown→Markdown transforms that must emit valid Markdown — demote/promote headings, rebuild a TOC with anchors, in-place edit mq sed doesn't know structure and will corrupt nesting/fences.

If your task lands in a grep/awk row, do not install mq — close this skill and use the line tool. Diagnosed 2026-06-04: a full-KJV smoke test queried books/chapters/verses (all line-prefix structure) with mq — ~3.3 s per query where grep is milliseconds, the same answers, and a grep post-filter still needed on top. Wrong-shape corpus; mq's selectors earn their parse cost only on the structural rows.

Read the full file on GitHub · 109 lines

Files

What ships with it

3 files 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.

Changes

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.

  1. 9d ago First seen · 109 lines · 108 tokens per session scan A b32215eac22c

Subscribe to this mod's changes

querying-markdown is a skill published in the GitHub repository oaustegard/claude-skills (148 stars, last pushed yesterday), licensed MIT. It adds 108 tokens to every session and 1,477 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

superdesign

Design or redesign frontend UI, presentations, and graphics on the Superdesign canvas with a choice of leading AI models. Use whenever the user wants to design a page, feature, flow, slide deck, or brand-new product; improve or reproduce existing UI; compare design results across top models; explore visual variants…

superdesigndev/superdesign-skill · 115 tokens

Linear

Managing Linear issues, projects, and teams. Use when working with Linear tasks, creating issues, updating status, querying projects, or managing team workflows.

wrsmith108/linear-claude-skill · 32 tokens

chanlun-engine-skill

A Chinese-language stock-analysis skill based on Chan theory, a method for interpreting price-chart structures such as turning points and trading ranges.

adsorgcn/chanlun-engine-skill · 128 tokens

youtube-summary

Summarize a YouTube video into structured notes — TL;DR, key takeaways, chapter-by-chapter breakdown, and reference links. Use when the user shares a YouTube URL (or invokes /youtube-summary ) and wants a summary, takeaways, transcript notes, or a write-up of a talk, lecture, or tutorial. Fetches the transcript and…

ParthGanatra/agent-skills · 137 tokens

plangate

Use for any non-trivial task with 2+ open decisions/tradeoffs OR multiple implementation steps — instead of deliberating one question at a time in chat, write a structured plan to a file and let the user review it inline in vim with > Q: / > A: blockquote markers, then revise until agreed before touching any code.…

ParthGanatra/agent-skills · 131 tokens

coinmarketcap

Expert assistant for CoinMarketCap Pro API — price quotes, listings, historical OHLCV, market metrics, Fear & Greed Index, CMC100/CMC20 indices, exchange data, DEX data, airdrops, trending, community sentiment. Covers 10+ endpoint categories across REST + MCP + x402 pay-per-call modes. Use when the user wants: current…

Vo1ganin/crypto-claude-skills · 183 tokens