Agent skill

pdf-analysis

PDF 文档解析。自动区分文字型 PDF 与扫描型 PDF,覆盖:文本/表格提取、多页全量扫描、嵌入图表 caption、单位感知数值计算。

OpenSenseNovagithub.com/OpenSenseNovaGitHub ↗
claude-codeMIT
Install
npx skills add OpenSenseNova/SenseNova-Skills --skill pdf-analysis --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/sn-da-non-spreadsheet-analysis/capability/pdf-analysis/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,911
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# PDF Analysis ## Step 0 — Detect PDF type (text vs scanned) **Critical first step**: determine whether the PDF has extractable text or is a scanned image. Never skip this — using the wrong parser wastes time and produces empty results. ```python import fitz # PyMuPDF def detect_pdf_type(pdf_path, sample_pages=3): """ Returns 'text' if PDF has extractable text, 'scanned' if image-based. Checks first N pages (or all if fewer). """ doc = fitz.open(pdf_path) total_chars = 0 pages_checked = min(sample_pages, len(doc)) for i in range(pages_checked): page = doc[i] text = page.get_text("text") total_chars += len(text.strip()) doc.close() avg_chars = total_chars / max(pages_checked, 1) pdf_type = 'text' if avg_chars > 50 else 'scanned' print(f"PDF type: {pdf_type} (avg {avg_chars:.0f} chars/page, checked {pages_checked} pages)") return pdf_type ``` --- ## Core Method 1: Text PDF — Full Text Extraction (ALL pages) ```python import fitz def extract_text_pdf(pdf_path): """Extract text from all pages of a text-based PDF.""" doc = fitz.open(pdf_path) total_pages = len(doc) print(f"Total pages: {total_pages}") all_text = [] for i, page in enumerate(doc): text = page.get_text("text").strip() if t

What's inside
Steps it walks through
  1. Step 0 — Detect PDF type (text vs scanned)
  2. Core Method 1: Text PDF — Full Text Extraction (ALL pages)
  3. Core Method 2: Text PDF — Table Extraction
  4. Core Method 3: Scanned PDF — OCR via Caption
  5. Core Method 4: Hybrid PDF (mixed text + image pages)
  6. Core Method 5: Extract Embedded Images / Charts from PDF
  7. Common Patterns
  8. Multi-invoice / multi-document PDF (发票汇总)
  9. Numeric extraction with unit awareness
  10. Long document keyword search
  11. Pitfalls
More from SenseNova-Skills
All skills →
About this skill
What does the pdf-analysis skill do?

PDF 文档解析。自动区分文字型 PDF 与扫描型 PDF,覆盖:文本/表格提取、多页全量扫描、嵌入图表 caption、单位感知数值计算。

How do I install it?

Run `npx skills add OpenSenseNova/SenseNova-Skills --skill pdf-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From OpenSenseNova/SenseNova-Skills, a repository with 4,911 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going