Skip to main content
skill CX Codex official · Anthropic

doc-extract — Claude Code skill: what it does, how to install

The doc-extract skill for Claude Code extracts plain text from binary document formats without writing files to disk. The agent invokes it when turning contracts or EHR attachments into text.

no license 110 installs ★ 456 updated 2026-08-27

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add anthropics/healthcare --skill doc-extract -a claude-code
Open on GitHub

What doc-extract does

The script reads an input file and prints JSON to stdout without creating caches or temporary files. Setting it up requires running bun install in the skill directory to pull in liteparse and rtf-to-text. Without this setup, PDFs still work via a pdftotext fallback if poppler is installed, but other binary formats require liteparse.

Multi-column tables can interleave cells line by line during extraction, requiring verification against the original page when an answer comes from such a table. The script accepts a --content-type parameter for files lacking a useful extension like downloaded EHR attachments. Because liteparse refuses extensionless files, those PDFs go through the pdftotext fallback.

Errors print to stderr and exit with code 1. Other skills import the extraction functions directly in TypeScript, and the contracts MCP server bundles its own copy to remain self-contained.

What it helps with

  • extract plain text from a PDF file
  • convert a DOCX or XLSX document into JSON
  • parse an RTF document into readable text
  • process an extensionless file with a custom mime type

Example prompts for the agent

  • Extract text from the file contract.pdf
  • Turn the document report.docx into JSON output
  • Parse the attached file using --content-type application/pdf

How to install doc-extract

1Skills CLI (Vercel)

npx skills add anthropics/healthcare --skill doc-extract -a claude-code

2Manually: put the files in place

~/.claude/skills/doc-extract/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/doc-extract/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about doc-extract

How to install doc-extract in Claude Code?

Run npx skills add anthropics/healthcare --skill doc-extract -a claude-code, then check ~/.claude/skills/doc-extract/SKILL.md.

What does doc-extract do?

It turns binary documents such as PDF, DOCX, XLSX, PPTX, RTF, and HTML into plain text with page anchors and outputs a JSON object to stdout.

What is needed to run doc-extract?

The script requires Bun and npm packages liteparse and rtf-to-text, which are installed by running bun install inside the skill directory.

Similar skills

All skills for Office documents →

From the same set9

fhir-developer-skill fhir-developer-skill guides FHIR R4 API development across healthcare endpoints: handles resource validation, OperationOutcome errors, standard status codes, and coding systems. CX Codex +1 692installs clinical-trial-protocol-skill Builds clinical trial protocols for medical devices and drugs. It helps research prior studies and draft study sections for FDA submissions. CX Codex +1 469installs prior-auth-review-skill prior-auth-review-skill is a Claude Code skill that reviews prior authorization requests against coverage rules. It activates for clinical document processing and medical necessity assessments. CX Codex +1 357installs icd10-cm-skill icd10-cm-skill extracts billable ICD-10-CM diagnosis codes from clinical notes following outpatient claim standards. Designed for billing review and chart coding. CX Codex +1 135installs clinical-note-extract-skill The clinical-note-extract-skill skill extracts structured data from medical text with citations for each value and explicit markers for missing fields. Use it to build registries, check trial eligibility, and flag information gaps. CX Codex +1 127installs contracts contracts is a Claude Code skill that answers questions across local contract files with verified citations. It parses clauses and inspects amendments. CX Codex +1 116installs fhir This Claude Code skill connects to FHIR R4 servers and extracts structured findings from patient records. It activates for requests to access a live EHR or retrieve clinical notes. CX Codex +1 111installs fraud-detection The fraud-detection Claude Code skill screens Medicare and Medicaid claims for signs of fraud, waste, and abuse. It runs on requests to scan a claims dataset or spot billing anomalies. CX Codex +1 104installs

Project sponsors

Companies that keep this analytics open