MCPInstall

query

Search extracted Markdown or plain text with ranked keyword search. Use this skill after pdf-to-markdown or pdf-to-text when you do not know the document's exact wording or a plain grep would return too many matches. For a known term, use a bounded grep first.

Installs
84
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/pspdfkit-labs/nutrient-skills --skill query
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads query automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Rules for agents

  • For a known term, start with a bounded search such as grep -n -i -C2 "term" file | head.
  • Use query when you do not know the exact wording or a plain search returns too many matches.
  • Use -k 1 or -k 2 for a single fact. Add --language <lang> to match related word forms.
  • Build an index with --emit-index only when you expect several queries over the same file.

Query a document

Search an extracted Markdown or text file and return the most relevant line ranges. The command reads the local file; it does not parse PDFs.

Related skills

  • pdf-to-markdown — converts a PDF to structured Markdown.
  • pdf-to-text — converts a PDF to plain text while preserving columns and spacing.

Usage

Set SKILL_DIR to the absolute path of the directory containing this file. Use $SKILL_DIR/bin/query in the commands below.

The wrapper downloads the CLI from Nutrient's CDN on first use and stores it in ~/.local/share/nutrient/cli/. It checks for updates every six hours.

$SKILL_DIR/bin/query text INPUT.md "your question" [-k N] [-e N]
  • INPUT.md — an extracted Markdown or text file, or a saved query index.
  • "your question" — the words to rank. Include several specific terms when useful.
  • -k N — the maximum number of result windows. The default is 8; use 1–3 for most questions.
  • -e N — the number of surrounding lines. The default is 5; use 0 to return only matching lines.

Each result starts with a 1-based Lines A-B range. Use that range for a focused follow-up read when needed.

Reuse an index

Create an index when you expect several questions about the same file:

$SKILL_DIR/bin/query text INPUT.md "first question" --emit-index INPUT.idx
$SKILL_DIR/bin/query text INPUT.idx "second question"

The index contains the source lines, so later queries need only the index file.

Workflow

  1. Convert the PDF once with pdf-to-markdown or pdf-to-text.
  2. Run one focused query with a small -k value.
  3. Answer from the returned passages. Read a wider line range only when needed.
  4. Reuse an index for later questions about the same file.

Query tips

  • Use specific words likely to appear in the document.
  • Put related terms in one query instead of running several narrow queries.
  • Add --language en, or another ISO language code, to match inflected forms.
  • Increase -e for more context. Increase -k only when you expect several separate answers.

Troubleshooting

  • No relevant matches found: Try a more specific term, a synonym, or --mode lenient. The message is not document content.
  • Empty output: Check that the converted file contains text. query does not perform OCR.
  • Poor matches: Add rarer terms or use --mode strict.
  • Nonzero exit: Read stderr and report the specific error. Common causes are a missing input file or a first-run download failure.
  • First run is slow: The wrapper downloads the platform binary once. Later runs use the cached copy.

Usage and licensing

query is free to use. It runs locally, requires no account, reports no usage, and uses no Vision pages.

Use is subject to the Nutrient PDF to Markdown License and Nutrient's Privacy Policy. Redistribution, OEM, embedded, and white-label use require a separate agreement with Nutrient.

FAQ

What does the query skill do?

Search extracted Markdown or plain text with ranked keyword search. Use this skill after pdf-to-markdown or pdf-to-text when you do not know the document's exact wording or a plain grep would return too many matches. For a known term, use a bounded grep first.

How do I install query?

Run npx skills add https://github.com/pspdfkit-labs/nutrient-skills --skill query in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/query/ (personal) or .claude/skills/query/ (project).

Which AI agents can use query?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is query safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains query?

It is published by pspdfkit-labs in pspdfkit-labs/nutrient-skills. It has 84 recorded installs.

More from pspdfkit-labs/nutrient-skills

View all →

pdf-to-markdown

pspdfkit-labs/nutrient-skills

Convert PDF content to structured Markdown for analysis or AI workflows. Use this skill whenever a user needs text or Markdown from a PDF. Use Standard for PDFs with selectable text and Vision for scans or visually complex pages. Use pdf-to-text instead when whitespace and column alignment must be preserved.

Docs & Writing831 installs

pdf-to-text

pspdfkit-labs/nutrient-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing90 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs