Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Nutrient DWS API を使用してドキュメントの処理、変換、OCR、抽出、編集、署名、フォーム入力を行います。PDF、DOCX、XLSX、PPTX、HTML、画像に対応しています。
.claude/skills/affaan-m-nutrient-document-processing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 84% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 126% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 89% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 119% | 0% |
使用 Nutrient DWS Processor API 处理文档。转换格式、提取文本和表格、对扫描文档进行 OCR、编辑 PII、添加水印、数字签名以及填写 PDF 表单。
在 nutrient.io 获取一个免费的 API 密钥
bashexport NUTRIENT_API_KEY="pdf_live_..."
所有请求都以 multipart POST 形式发送到 https://api.nutrient.io/build,并附带一个 instructions JSON 字段。
bash# DOCX to PDF curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.docx=@document.docx" \ -F 'instructions={"parts":[{"file":"document.docx"}]}' \ -o output.pdf # PDF to DOCX curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.pdf=@document.pdf" \ -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"docx"}}' \ -o output.docx # HTML to PDF curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "index.html=@index.html" \ -F 'instructions={"parts":[{"html":"index.html"}]}' \ -o output.pdf
支持的输入格式:PDF, DOCX, XLSX, PPTX, DOC, XLS, PPT, PPS, PPSX, ODT, RTF, HTML, JPG, PNG, TIFF, HEIC, GIF, WebP, SVG, TGA, EPS。
bash# Extract plain text curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.pdf=@document.pdf" \ -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"text"}}' \ -o output.txt # Extract tables as Excel curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.pdf=@document.pdf" \ -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"xlsx"}}' \ -o tables.xlsx
bash# OCR to searchable PDF (supports 100+ languages) curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "scanned.pdf=@scanned.pdf" \ -F 'instructions={"parts":[{"file":"scanned.pdf"}],"actions":[{"type":"ocr","language":"english"}]}' \ -o searchable.pdf
支持语言:通过 ISO 639-2 代码支持 100 多种语言(例如,eng, deu, fra, spa, jpn, kor, chi_sim, chi_tra, ara, hin, rus)。完整的语言名称如 english 或 german 也适用。查看 完整的 OCR 语言表 以获取所有支持的代码。
bash# Pattern-based (SSN, email) curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.pdf=@document.pdf" \ -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"social-security-number"}},{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"email-address"}}]}' \ -o redacted.pdf # Regex-based curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.pdf=@document.pdf" \ -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"regex","strategyOptions":{"regex":"\\b[A-Z]{2}\\d{6}\\b"}}]}' \ -o redacted.pdf
预设:social-security-number, email-address, credit-card-number, international-phone-number, north-american-phone-number, date, time, url, ipv4, ipv6, mac-address, us-zip-code, vin。
bashcurl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.pdf=@document.pdf" \ -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"watermark","text":"CONFIDENTIAL","fontSize":72,"opacity":0.3,"rotation":-45}]}' \ -o watermarked.pdf
bash# Self-signed CMS signature curl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "document.pdf=@document.pdf" \ -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"sign","signatureType":"cms"}]}' \ -o signed.pdf
bashcurl -X POST https://api.nutrient.io/build \ -H "Authorization: Bearer $NUTRIENT_API_KEY" \ -F "form.pdf=@form.pdf" \ -F 'instructions={"parts":[{"file":"form.pdf"}],"actions":[{"type":"fillForm","formFields":{"name":"Jane Smith","email":"jane@example.com","date":"2026-02-06"}}]}' \ -o filled.pdf
对于原生工具集成,请使用 MCP 服务器代替 curl:
json{ "mcpServers": { "nutrient-dws": { "command": "npx", "args": ["-y", "@nutrient-sdk/dws-mcp-server"], "env": { "NUTRIENT_DWS_API_KEY": "YOUR_API_KEY", "SANDBOX_PATH": "/path/to/working/directory" } } } }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 6,961 | 3,735 | -46% | 1 | 1 | 0% | 1,385 | 2,550 | +84% | 0 | 0 | — |
case-02 | fail→pass | 32,913 | 5,502 | -83% | 1 | 1 | 0% | 3,520 | 2,712 | -23% | 0 | 0 | — |
case-03 | pass→pass | 9,810 | 8,527 | -13% | 1 | 1 | 0% | 1,821 | 3,478 | +91% | 0 | 0 | — |
case-04 | pass→pass | 10,026 | 5,916 | -41% | 1 | 1 | 0% | 2,011 | 3,065 | +52% | 0 | 0 | — |
case-05 | pass→pass | 10,269 | 7,164 | -30% | 1 | 1 | 0% | 1,523 | 3,002 | +97% | 0 | 0 | — |
case-06 | fail→pass | 6,832 | 4,149 | -39% | 1 | 1 | 0% | 1,167 | 2,632 | +126% | 0 | 0 | — |
case-07 | pass→pass | 7,273 | 2,865 | -61% | 1 | 1 | 0% | 1,254 | 2,299 | +83% | 0 | 0 | — |
case-08 | fail→pass | 7,254 | 3,008 | -59% | 1 | 1 | 0% | 1,240 | 2,348 | +89% | 0 | 0 | — |
case-09 | fail→pass | 6,665 | 2,976 | -55% | 1 | 1 | 0% | 1,041 | 2,281 | +119% | 0 | 0 | — |
case-10 | fail→pass | 9,141 | 3,161 | -65% | 1 | 1 | 0% | 1,553 | 2,329 | +50% | 0 | 0 | — |
case-11 | pass→pass | 18,681 | 3,612 | -81% | 1 | 1 | 0% | 1,546 | 2,525 | +63% | 0 | 0 | — |
case-12 | fail→pass | 11,076 | 4,926 | -56% | 1 | 1 | 0% | 1,959 | 2,694 | +38% | 0 | 0 | — |
case-13 | fail→pass | 9,063 | 3,715 | -59% | 1 | 1 | 0% | 1,307 | 2,417 | +85% | 0 | 0 | — |
case-14 | pass→pass | 5,912 | 2,711 | -54% | 1 | 1 | 0% | 1,094 | 2,367 | +116% | 0 | 0 | — |
case-15 | fail→pass | 10,749 | 3,128 | -71% | 1 | 1 | 0% | 1,747 | 2,385 | +37% | 0 | 0 | — |
case-16 | fail→pass | 9,463 | 3,525 | -63% | 1 | 1 | 0% | 1,142 | 2,399 | +110% | 0 | 0 | — |
case-17 | fail→pass | 5,937 | 2,845 | -52% | 1 | 1 | 0% | 997 | 2,267 | +127% | 0 | 0 | — |
case-18 | pass→pass | 3,997 | 1,819 | -54% | 1 | 1 | 0% | 686 | 2,105 | +207% | 0 | 0 | — |
case-19 | fail→pass | 10,963 | 4,560 | -58% | 1 | 1 | 0% | 1,334 | 2,700 | +102% | 0 | 0 | — |
case-20 | fail→pass | 17,522 | 4,521 | -74% | 1 | 1 | 0% | 1,458 | 2,677 | +84% | 0 | 0 | — |
case-21 | fail→pass | 9,732 | 3,098 | -68% | 1 | 1 | 0% | 1,587 | 2,334 | +47% | 0 | 0 | — |
case-22 | fail→pass | 8,094 | 1,805 | -78% | 1 | 1 | 0% | 1,449 | 2,071 | +43% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.