agentleFS
CuiMuxuanCuiMuxuan/academic-codex-skills/skills/pdf-docx-parsing-workflow/SKILL.md

pdf-docx-parsing-workflow

Skill8 starsChanged 5 months agoMITView on GitHub

Parse, inspect, and structure academic PDF and DOCX files for papers, theses, dissertations, review articles, supervisor comments, formatting templates, and evidence extraction. Use when the user needs PDF text/table extraction, DOCX heading inventory, comments, tracked changes, style inspection, bibliography extraction, evidence CSVs, or conversion of documents into reusable structured notes. Chinese triggers: 解析PDF, 解析DOCX, 提取论文证据, Word批注, 修订痕迹, 文档结构化, PDF文献解析.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 17 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to turn PDFs and DOCX files into structured, traceable material for research verification, writing, formatting, and figure …

    line 8
  2. Very specific:

    Treat extracted metadata as verified literature identity.

    line 21
  3. Distinctive:

    Keep extracted text tied to source path and page or document location.

    line 29
  4. Distinctive:

    Prefer structured outputs over long raw dumps.

    line 31
  5. Distinctive:

    Use the least fragile parser that works in the environment.

    line 32
  6. Distinctive:

    Do not install dependencies, run OCR, or use Word automation without user approval.

    line 33
  7. Distinctive:

    Do not overwrite source documents.

    line 34
  8. Distinctive:

    When extracting review comments, preserve comment count, source location, author/time metadata when available, and downstream …

    line 35
  9. Distinctive:

    Before parsing files, ask for missing materials that would materially improve extraction quality:

    line 41
  10. Distinctive:

    If materials are unavailable, run only safe local inventory or produce a manual recovery plan after user confirmation.

    line 50
  11. Very specific:

    Stop and ask before installing dependencies, running OCR, using Word automation, treating low or failed extraction zones as usable …

    line 54
  12. Distinctive:

    Use parser-selection.md for parser choice and checkpoint format.

    line 56
  13. Distinctive:

    Use one or more:

    line 70
  14. Distinctive:

    Read structured-output-schema.md before creating CSV/JSON outputs or coordinating parsed material with research and writing skills.

    line 83
  15. Distinctive:

    Read parser-selection.md when choosing PDF/DOCX parsers, OCR, dependencies, or Word automation.

    line 85
  16. Distinctive:

    Read pdf-extraction-playbook.md for PDF text, table, bibliography, and scanned-page recovery extraction.

    line 87
  17. Distinctive:

    Read docx-extraction-playbook.md for DOCX headings, comments, tracked changes, styles, captions, and template inspection.

    line 89
  18. Distinctive:

    Read reviewer-comment-action-plan-gate.md when parsed comments should preserve enough detail for downstream triage and concrete revision …

    line 91
  19. Distinctive:

    Read handoff-quality-gates.md before passing parsed outputs to research, writing, formatting, or figure workflows.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PDF DOCX Parsing Workflow

Use this skill to turn PDFs and DOCX files into structured, traceable material for research verification, writing, formatting, and figure planning.

Boundaries

Do:

  • Extract document structure and reusable evidence.
  • Preserve page, heading, paragraph, comment, style, and revision context when possible.
  • Produce structured outputs for downstream skills.
  • Identify failed or low-confidence extraction zones.

Do not:

  • Treat extracted metadata as verified literature identity; route DOI/title checks to $academic-research-verification.
  • Rewrite the manuscript as the primary task; route writing to $paper-writing-workflow.
  • Apply final formatting; route to $academic-formatting-workflow.
  • Generate figures; route to $academic-figure-workflow.

Core Rules

  1. Inventory files before parsing.
  2. Keep extracted text tied to source path and page or document location.
  3. Mark extraction quality and uncertainty.
  4. Prefer structured outputs over long raw dumps.
  5. Use the least fragile parser that works in the environment.
  6. Do not install dependencies, run OCR, or use Word automation without user approval.
  7. Do not overwrite source documents.
  8. When extracting review comments, preserve comment count, source location, author/time metadata when available, and downstream action-planning fields.

Intake

Identify input paths, parsing purpose, target examples, output format, OCR needs, dependency constraints, password/access constraints, sensitivity constraints, and downstream target skill.

Before parsing files, ask for missing materials that would materially improve extraction quality:

Required or high-value materials:
Missing materials:
Can proceed without them: yes/no
Fallback if unavailable:

If materials are unavailable, run only safe local inventory or produce a manual recovery plan after user confirmation.

Parsing Checkpoints

Stop and ask before installing dependencies, running OCR, using Word automation, treating low or failed extraction zones as usable evidence, passing bibliography metadata as verified literature, or parsing restricted/sensitive documents in a questionable way.

Use parser-selection.md for parser choice and checkpoint format.

Workflow

  1. Inventory files and their likely roles.
  2. Choose the parser using parser-selection.md.
  3. For PDFs, apply pdf-extraction-playbook.md.
  4. For DOCX files, apply docx-extraction-playbook.md.
  5. Normalize outputs with structured-output-schema.md.
  6. Apply reviewer-comment-action-plan-gate.md when extracted comments will be routed into writing or post-draft review.
  7. Apply handoff-quality-gates.md before routing outputs downstream.

Outputs

Use one or more:

  • document_inventory.md;
  • pdf_evidence.csv;
  • docx_structure.csv;
  • docx_comments.csv;
  • review_comment_inventory.md;
  • tracked_changes_report.md;
  • format_template_inventory.md;
  • manual_recovery_list.md.

Reference

Read structured-output-schema.md before creating CSV/JSON outputs or coordinating parsed material with research and writing skills.

Read parser-selection.md when choosing PDF/DOCX parsers, OCR, dependencies, or Word automation.

Read pdf-extraction-playbook.md for PDF text, table, bibliography, and scanned-page recovery extraction.

Read docx-extraction-playbook.md for DOCX headings, comments, tracked changes, styles, captions, and template inspection.

Read reviewer-comment-action-plan-gate.md when parsed comments should preserve enough detail for downstream triage and concrete revision actions.

Read handoff-quality-gates.md before passing parsed outputs to research, writing, formatting, or figure workflows.

Bundled Utilities

  • scripts/pdf_text_inventory.py: PyMuPDF-based page-level PDF text inventory. Requires PyMuPDF and user approval before installing it.
  • scripts/pdf_table_ocr_inventory.py: PyMuPDF-based page text plus table extraction and optional OCR recovery report; can fall back to pdfplumber for tables when installed. Requires user approval before OCR or dependency installation.
  • scripts/docx_inventory.py: no-dependency DOCX heading, style, caption, comment, and tracked-change inventory helper.
  • scripts/make_evidence_register.py: create an empty evidence register CSV with the standard fields.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.