Skills for Real Engineers. Straight from my .agents directory.
pdf-analysis
Agent skill fromOpenSenseNova/SenseNova-Skills
PDF 文档解析。自动区分文字型 PDF 与扫描型 PDF,覆盖:文本/表格提取、多页全量扫描、嵌入图表 caption、单位感知数值计算。
How to install pdf-analysis
npx skills add OpenSenseNova/SenseNova-Skills# or add only this skill to Claude Code: copy the folder
skills/sn-da-non-spreadsheet-analysis/capability/pdf-analysis/
# into
~/.claude/skills/pdf-analysis/ (all projects)
.claude/skills/pdf-analysis/ (one project)
1# PDF Analysis23## Step 0 — Detect PDF type (text vs scanned)45**Critical first step**: determine whether the PDF has extractable text or is a scanned image.6Never skip this — using the wrong parser wastes time and produces empty results.78```python9import fitz # PyMuPDF1011def detect_pdf_type(pdf_path, sample_pages=3):12 """13 Returns 'text' if PDF has extractable text, 'scanned' if image-based.14 Checks first N pages (or all if fewer).15 """16 doc = fitz.open(pdf_path)17 total_chars = 018 pages_checked = min(sample_pages, len(doc))1920 for i in range(pages_checked):21 page = doc[i]22 text = page.get_text("text")23 total_chars += len(text.strip())2425 doc.close()26 avg_chars = total_chars / max(pages_checked, 1)27 pdf_type = 'text' if avg_chars > 50 else 'scanned'28 print(f"PDF type: {pdf_type} (avg {avg_chars:.0f} chars/page, checked {pages_checked} pages)")29 return pdf_type30```3132---3334## Core Method 1: Text PDF — Full Text Extraction (ALL pages)3536```python37import fitz3839def extract_text_pdf(pdf_path):40 """Extract text from all pages of a text-based PDF."""41 doc = fitz.open(pdf_path)42 total_pages = len(doc)43 print(f"Total pages: {total_pages}")4445 all_text = []46 for i, page in enumerate(doc):47 text = page.get_text("text").strip()48 if text:49 all_text.append(f"=== Page {i+1} ===\n{text}")50 else:51 print(f" Page {i+1}: no text (may be image — will caption later)")52…
Excerpt shown under the repository's MIT license.
More skills in SenseNova-Skills
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
