
nutrient-document-processing
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.
- Installs
- 470
- 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-agent-skill --skill nutrient-document-processing- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads nutrient-document-processing automatically when relevant.
- 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.
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_KEYthrough 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 withuv 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:4means 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:
- Identify the exact operation and every local file or remote URL transferred.
- Obtain a current credit estimate from the dashboard/pricing applicable to that operation.
- Present the product, operation, transferred inputs, estimate, and proposed output path to the user.
- Wait for approval immediately before the request.
- Only then pass both
--estimated-credits NUMBERand--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
- Prefer a covered
scripts/*.pyhelper; it uses the pinned typed client and safe output writer. - For a multi-step Processor job, copy and customize
assets/templates/custom-workflow-template.pyat runtime. - 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, ormarkdown; 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 withsignatureTypeand 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:
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
fillFormbuild 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/pdfuaendpoint for a new integration.
Reference map
references/request-basics.md: product boundary, authentication, typed outputs, approval, and errorsreferences/generation-and-conversion.md: current conversion and generation patternsreferences/pdf-manipulation.md: inclusive ranges and page operationsreferences/extraction-and-ocr.md: Processor JSON-content extraction versus Data Extraction parsingreferences/security-signing-and-forms.md: staged redaction, signing, forms, passwords, and watermarkingreferences/compliance-and-optimization.md: PDF/A, PDF/UA routing, optimization, and validationreferences/workflow-recipes.md: safe sequencing for multi-step jobs
FAQ
What does the nutrient-document-processing skill do?
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.
How do I install nutrient-document-processing?
Run npx skills add https://github.com/pspdfkit-labs/nutrient-agent-skill --skill nutrient-document-processing 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/nutrient-document-processing/ (personal) or .claude/skills/nutrient-document-processing/ (project).
Which AI agents can use nutrient-document-processing?
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 nutrient-document-processing 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 nutrient-document-processing?
It is published by pspdfkit-labs in pspdfkit-labs/nutrient-agent-skill. It has 470 recorded installs.
Popular docs & writing skills
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.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.