# Nutrient Skills

AI agent skills for [Nutrient](https://www.nutrient.io/) APIs and SDKs. Works with Claude Code, Codex, Pi, Cursor, Gemini CLI, and [other agents](https://github.com/vercel-labs/skills#supported-agents).

## Why these skills

The document extraction skills aren't wrappers around a prompt. They run a real document engine locally, and the accuracy numbers come from a public benchmark, not a set we picked ourselves:

- **Fast and free.** `pdf-to-markdown` extracts digital-born PDFs at about **0.004 seconds per page** — roughly **134× docling's throughput** on the public 200-document [opendataloader-bench](https://github.com/opendataloader-project/opendataloader-bench) corpus, at essentially the same overall accuracy (0.89 vs 0.89; docling edges it at the third decimal). (Throughput, not a like-for-like single-document race: Nutrient converts batch-parallel while docling runs sequentially — see the [method](https://github.com/PSPDFKit/pdf-to-markdown/blob/main/docs/benchmarks.md#speed).) Free up to 1,000 documents a month, no key and no signup.
- **Tuned for how agents actually work.** The skills tell the agent to parse once and search with a bounded `grep`, reaching for ranked retrieval only when a plain grep would flood context. In our own testing that noticeably cut the token cost of answering questions over a document, at the same accuracy — the win is the instructions, not just the tool.
- **Accurate when the page is hard.** The licensed `--vision` tier adds a local machine-vision pipeline for scanned, photographed, and handwritten documents. On the same corpus it tops every accuracy metric while still running faster than docling.
- **Local by default.** Binaries are signed and run on macOS (Apple Silicon), Linux, and Windows. The local CLI does not upload your source PDFs to Nutrient. (Two honest caveats: extracted text you then feed to your own LLM/agent goes to that model provider like any other prompt, and the CLI downloads its binary from Nutrient's CDN on first run.)

Method and full tables: [pdf-to-markdown benchmarks](https://github.com/PSPDFKit/pdf-to-markdown#benchmarks) and the [live results page](https://www.nutrient.io/api/data-extraction-api/benchmarks/).

## Available Skills

| Plugin | Skill | Description |
|--------|-------|-------------|
| [`nutrient-dws`](plugins/nutrient-dws) | `document-processor-api` | Generate, convert, assemble, OCR, redact, sign, archive, and optimize documents via the Nutrient Document Web Services API |
| [`nutrient-dws`](plugins/nutrient-dws) | `document-extraction-api` | Parse documents into a structural model or Markdown via the Nutrient Data Extraction API |
| [`nutrient-dws`](plugins/nutrient-dws) | `grounded-rag-ingestion` | Chunk documents into provenance-carrying JSONL (element type, page, bbox, confidence, reading order) for grounded, auditable RAG pipelines |
| [`nutrient-dws`](plugins/nutrient-dws) | `dws-viewer-api` | Upload documents and mint viewer session JWTs for the Nutrient cloud Viewer API. Embeds interactive viewing, annotation, forms, and signing via cloud infrastructure — no viewing/storage servers to run (you still mint session tokens from your backend) |
| [`make-pdf`](plugins/make-pdf) | `make-pdf` | Generate PDFs from Markdown or HTML — single files or whole directories — with accessible PDF/UA, archival PDF/A, and watermark outputs, plus built-in conformance verification |
| [`remediate-pdf`](plugins/remediate-pdf) | `remediate-pdf` | Remediate existing PDFs: auto-tag with PDF/UA semantic structure (headings, lists, tables, reading order) via the Nutrient DWS Accessibility API (auto-tag only — verify output with the bundled verify-pdf.py) |
| [`pdf-to-markdown`](plugins/pdf-to-markdown) | `pdf-to-markdown` | Extract text from PDFs as structured, semantic Markdown |
| [`pdf-to-text`](plugins/pdf-to-text) | `pdf-to-text` | Extract layout-preserving plain text from PDFs |
| [`query`](plugins/query) | `query` | Find the most relevant passages in an extracted document with ranked (BM-25) search |
| [`nutrient-sdk-dev`](plugins/nutrient-sdk-dev) | 13 SDK skills | Build with Nutrient SDKs — Web Viewer, Document Authoring, mobile (iOS/Android/React Native/Flutter/MAUI), server (Python/Java/Node.js/.NET), self-hosted Document Engine, and AI Assistant |

## Installation

### npx skills (recommended)

Install using the [Skills CLI](https://github.com/vercel-labs/skills):

```bash
npx skills add pspdfkit-labs/nutrient-skills --skill document-processor-api
npx skills add pspdfkit-labs/nutrient-skills --skill document-extraction-api
npx skills add pspdfkit-labs/nutrient-skills --skill grounded-rag-ingestion
npx skills add pspdfkit-labs/nutrient-skills --skill dws-viewer-api
npx skills add pspdfkit-labs/nutrient-skills --skill make-pdf
npx skills add pspdfkit-labs/nutrient-skills --skill remediate-pdf
npx skills add pspdfkit-labs/nutrient-skills --skill pdf-to-markdown
npx skills add pspdfkit-labs/nutrient-skills --skill pdf-to-text
npx skills add pspdfkit-labs/nutrient-skills --skill query
```

The `nutrient-sdk-dev` plugin's 13 per-SDK skills install the same way (e.g. `--skill nutrient-web-sdk`).

This works with Claude Code, Codex, Cursor, Gemini CLI, and [many other agents](https://github.com/vercel-labs/skills#supported-agents).

To list all available skills in this repo:

```bash
npx skills add pspdfkit-labs/nutrient-skills --list
```

### Claude Code / Codex plugin marketplace

Both Claude Code and Codex support the `/plugin` command:

```
/plugin marketplace add pspdfkit-labs/nutrient-skills
/plugin install nutrient-dws@nutrient-skills
/plugin install make-pdf@nutrient-skills
/plugin install remediate-pdf@nutrient-skills
/plugin install pdf-to-markdown@nutrient-skills
/plugin install pdf-to-text@nutrient-skills
/plugin install query@nutrient-skills
/plugin install nutrient-sdk-dev@nutrient-skills
```

After installation, the plugin's skills will automatically load in all future sessions.

### Pi

You can install the Nutrient skills with:

```bash
pi install git:github.com/PSPDFKit-labs/nutrient-skills
```

Pi will load all skills from the packaged `plugins/*/skills` directories. If you only want to try the package without installing it, use:

```bash
pi -e git:github.com/PSPDFKit-labs/nutrient-skills
```

You can still point Pi at a specific plugin's `skills/` directory or at the repo-wide `plugins/` directory in `~/.pi/agent/settings.json` or a project-local `.pi/settings.json` if you prefer manual control.

### Manual / any agent

Clone the repository and point your agent at the skill directory:

```bash
git clone https://github.com/pspdfkit-labs/nutrient-skills.git
# Skills live under plugins/<plugin>/skills/<skill>/SKILL.md
```

Reference `SKILL.md` directly in your agent's context, or symlink the skill directory into wherever your agent resolves skills.

---

## Repository Layout

```
.claude-plugin/
  marketplace.json                  Marketplace catalog
AGENTS.md                           Agent instructions (Codex, generic)
CLAUDE.md                           Agent instructions (Claude Code)
plugins/
  <plugin-name>/                    One directory per plugin
    .claude-plugin/
      plugin.json                   Plugin manifest (Claude Code)
    .codex-plugin/
      plugin.json                   Plugin manifest (Codex)
    skills/
      <skill-name>/                 One or more skills per plugin
        SKILL.md                    Skill definition
        scripts/                    Optional: task scripts
        assets/                     Optional: templates, static files
        references/                 Optional: API docs, guides
```
