К основному содержанию
скилл CX Codex

nutrient-document-processing · pspdfkit-labs — скилл для Claude Code: PDF, OCR

Скилл для работы с документами через Nutrient DWS Processor: конвертация, OCR, сборка пакетов, редакция и подпись PDF.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add PSPDFKit-labs/nutrient-agent-skill --skill nutrient-document-processing -a claude-code
Открыть на GitHub

Что делает nutrient-document-processing

Скилл подключает агента к облачному Nutrient DWS Processor. Через него можно собрать PDF из данных, сконвертировать документ в docx, xlsx, pptx, png, html или markdown, прогнать OCR, вытащить текст, таблицы и пары ключ-значение, поставить водяной знак, оптимизировать файл или выдать его в PDF/A и PDF/UA.

Внутри — готовые Python-скрипты в scripts/: convert.py, merge.py, split.py, ocr.py, extract-table.py, redact-ai.py, sign.py, password-protect.py и другие. Каждый запускается через uv run и тянет клиент nutrient-dws==3.1.0. Для многошаговых задач есть шаблон assets/templates/custom-workflow-template.py, который копируют во временный путь и правят под себя.

Понадобится ключ NUTRIENT_API_KEY и установленный uv. Ключ берут в панели Nutrient и держат в защищённом окружении агента, а не в аргументах команды. Каждый вызов отправляет файлы на внешний API и тратит кредиты, поэтому скрипты требуют флагов --estimated-credits и --confirm-external-processing после подтверждения пользователя. Редакция идёт в два этапа: сначала разметка, потом отдельное одобрение на необратимое применение. Пароли читаются только из локальных файлов с правами chmod 600.

Какие задачи решает

  • собрать PDF из шаблона и данных
  • распознать текст в сканах через OCR
  • вытащить таблицы и пары ключ-значение из документа
  • собрать несколько файлов в один пакет и разбить обратно
  • подготовить PDF/A или PDF/UA для проверки соответствия

Примеры запросов агенту

  • Сконвертируй report.docx в PDF/A и сохрани рядом
  • Прогони OCR по scan.pdf и вытащи таблицы в JSON
  • Собери packet.pdf из трёх договоров и добавь водяной знак

Как установить nutrient-document-processing

1Через Skills CLI (Vercel)

npx skills add PSPDFKit-labs/nutrient-agent-skill --skill nutrient-document-processing -a claude-code

2Вручную: положить файлы

~/.claude/skills/nutrient-document-processing/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/nutrient-document-processing/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о nutrient-document-processing

Как установить nutrient-document-processing в Claude?

Выполните npx skills add PSPDFKit-labs/nutrient-agent-skill --skill nutrient-document-processing -a claude-code. Скилл встанет в ~/.claude/skills/nutrient-document-processing/SKILL.md.

Что делает nutrient-document-processing?

Даёт агенту набор скриптов для конвертации, генерации, OCR, извлечения контента, редакции, подписи, оптимизации и защиты PDF через Nutrient DWS Processor.

Что нужно для работы скилла?

Установленный uv и переменная окружения NUTRIENT_API_KEY с ключом Processor. Каждый запуск отправляет документы на внешний API и расходует кредиты, поэтому требует подтверждения.

Исходный текст

SKILL.md · MIT-0
---
name: nutrient-document-processing
description: >-
  Process documents with Nutrient DWS Processor. Use for PDF generation and conversion, packet
  assembly, OCR, Processor JSON-content extraction, staged redaction, watermarking, signing,
  password protection, optimization, PDF/A, or PDF/UA output. Route high-fidelity markdown or
  spatial parsing to Nutrient Data Extraction, and accessibility auto-tagging/validation to Nutrient
  Accessibility instead of treating all three products as one API.
license: MIT-0
metadata:
  author: nutrient-sdk
  version: "2.0.0"
  homepage: "https://www.nutrient.io/api/"
  repository: "https://github.com/PSPDFKit-labs/nutrient-agent-skill"
  openclaw:
    requires:
      bins: [uv]
      env: [NUTRIENT_API_KEY]
    primaryEnv: NUTRIENT_API_KEY
---

# Nutrient Document Processing

Use this skill for managed document processing where fidelity, compliance, or a multi-step workflow justifies transferring the user's files to Nutrient DWS.

## Product router

Choose the product before estimating cost or selecting credentials:

| Need | Product | Route used here |
| --- | --- | --- |
| Convert, generate, assemble, OCR, JSON-content extraction, redact, sign, optimize, PDF/A or PDF/UA output | **DWS Processor** | Pinned Python helpers in `scripts/` using `NUTRIENT_API_KEY` |
| High-fidelity document parsing to markdown or spatial JSON | **Data Extraction** | Separate `/extraction/parse` product, credential, and credit pool; use its current official client/docs |
| Accessibility auto-tagging and PDF/UA validation workflow | **Accessibility** | Separate current Accessibility API/product; do not use the deprecated Processor `/processor/pdfua` endpoint |

Do not reuse Processor cost estimates, credentials, or payloads for Data Extraction or Accessibility.

## Setup

- Get a Processor API key from <https://dashboard.nutrient.io/sign_up/?product=processor>.
- Configure `NUTRIENT_API_KEY` through the agent host's protected runtime environment or secrets manager. Never ask the user to paste the key into chat, and never put it in command arguments, logs, generated scripts, or committed configuration. Verify only that the variable is present, not its value.

- Each script uses PEP 723 metadata pinned to `nutrient-dws==3.1.0`; run it with `uv run`.
- Run helpers by path from the installed skill directory. Never assume the current directory is the skill directory.
- Page ranges are zero-based and **inclusive**. `0:4` means five pages. Negative indexes count from the end.

## Paid-run approval gate

Every helper invocation sends document content to the external DWS Processor API and consumes credits. Before each run:

1. Identify the exact operation and every local file or remote URL transferred.
2. Obtain a current credit estimate from the dashboard/pricing applicable to that operation.
3. Present the product, operation, transferred inputs, estimate, and proposed output path to the user.
4. Wait for approval immediately before the request.
5. Only then pass both `--estimated-credits NUMBER` and `--confirm-external-processing`.

Approval never carries over to a retry, batch, second stage, redaction apply, or signature. Do not add the confirmation flag speculatively.

## Helper preference

1. Prefer a covered `scripts/*.py` helper; it uses the pinned typed client and safe output writer.
2. For a multi-step Processor job, copy and customize `assets/templates/custom-workflow-template.py` at runtime.
3. Use a raw request only when a current official contract is cited in the relevant reference. If the exact contract is uncertain, use the typed 3.1.0 helper instead of guessing.

All output helpers create files atomically with owner-only permissions and refuse to overwrite an existing path. Choose a new path for a retry.

## Single-operation helpers

- `convert.py`: `pdf`, `pdfa`, `pdfua`, `docx`, `xlsx`, `pptx`, `png`, `jpeg`, `jpg`, `webp`, `html`, or `markdown`; handles binary, text-content, and JSON-content results.
- `merge.py`, `split.py`, `add-pages.py`, `delete-pages.py`, `duplicate-pages.py`, `rotate.py`: page and packet operations.
- `ocr.py`, `extract-text.py`, `extract-table.py`, `extract-key-value-pairs.py`: Processor OCR and JSON-content extraction.
- `watermark-text.py`, `optimize.py`: delivery transformations.
- `redact-ai.py`: AI **staging only** for a local PDF. Visually review the staged result before a separately approved apply step.
- `sign.py`: local PDF only; requires an explicit JSON config file with `signatureType` and verifies the output is a PDF container. Independently validate the embedded signature and trust chain.
- `password-protect.py`: reads passwords only from owner-only local files (`chmod 600`), never argv.

## Multi-step workflow template

Do not commit a job-specific pipeline under `scripts/`. Copy the template to a task-specific temporary path, then point it back to the installed skill directory:

```bash
export NUTRIENT_SKILL_DIR="/absolute/path/to/nutrient-document-processing"
cp "$NUTRIENT_SKILL_DIR/assets/templates/custom-workflow-template.py" /tmp/ndp-workflow.py
# customize /tmp/ndp-workflow.py
NUTRIENT_SKILL_DIR="$NUTRIENT_SKILL_DIR" uv run /tmp/ndp-workflow.py --help
```

The final paid invocation still needs the operation estimate and explicit confirmation flags. Remove the temporary script when the job is complete unless the user asks to retain it.

## Safety rules

- OCR before extraction or redaction only when the source lacks a useful text layer.
- Redaction is two-stage: create annotations, visually review every match and missed match, then request separate approval to apply irreversibly. Search/render the final PDF to verify removal.
- Signing requires explicit CMS or CAdES configuration. Fill, flatten, redact, assemble, and optimize before signing; treat the signed PDF as immutable.
- Use real form field data expressed as Instant JSON or XFDF. Do not invent a `fillForm` build action.
- Keep passwords and signature secrets out of argv, logs, and committed JSON.
- Treat PDF/A and PDF/UA as compliance targets. Validate final artifacts with the user's required validator before claiming conformance.
- Never call the deprecated `/processor/pdfua` endpoint for a new integration.

## Reference map

- `references/request-basics.md`: product boundary, authentication, typed outputs, approval, and errors
- `references/generation-and-conversion.md`: current conversion and generation patterns
- `references/pdf-manipulation.md`: inclusive ranges and page operations
- `references/extraction-and-ocr.md`: Processor JSON-content extraction versus Data Extraction parsing
- `references/security-signing-and-forms.md`: staged redaction, signing, forms, passwords, and watermarking
- `references/compliance-and-optimization.md`: PDF/A, PDF/UA routing, optimization, and validation
- `references/workflow-recipes.md`: safe sequencing for multi-step jobs

© nutrient-sdk · MIT-0 · PSPDFKit-labs/nutrient-agent-skill

Похожие скиллы

Всё по теме «Документы и офис» →

Сначала — nutrient-document-processing от других авторов.

nutrient-document-processing affaan-m Скилл обращается к Nutrient DWS API, чтобы конвертировать документы, распознавать сканы, извлекать данные и менять PDF. Подойдёт, если эти операции нужны в рабочем процессе с файлами. CX Codex +1 4 500установок business-document-generator ailabs-393 Собирает коммерческое предложение, бизнес-план или годовой бюджет в PDF: подставляет ваши данные в готовый шаблон через Python-скрипт. CX Codex +1 1 400установок Skywork Document SkyworkAI Генерирует отчёты, договоры и статьи в форматах DOCX, PDF, HTML и Markdown через Skywork Office Doc API. Пригодится при оформлении структурированных документов по файлам проекта. CX Codex +1 371установок markitdown julianobarbosa Скилл-инструкция по Microsoft MarkItDown: превращает PDF, Word, Excel, картинки и ссылки в Markdown, готовый для контекста LLM. CX Codex +1 1 600установок paddleocr-doc-parsing freestylefly Скилл разбирает PDF и картинки через PaddleOCR: текст, таблицы, формулы, графики и порядок чтения. Пригодится, когда нужно вытащить структуру из отчёта или статьи. CX Codex +1 369установок doc openai Скилл для чтения, создания и правки документов .docx, когда важна вёрстка: таблицы, разрывы страниц, шрифты. Полезен, если документ уходит клиенту. 99установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой