Back to Skills

scanner-pdf-analysis

verified

Analyze PDF documents with table extraction, section identification, and content summarization. Use when reading technical documents, reports, or papers. This skill provides PDF analysis capabilities: - Text extraction and OCR - Table detection and CSV conversion - Section and heading identification - Key points summarization - Metadata extraction Triggers: "analyze PDF", "extract tables", "summarize document", "read PDF", "PDF解析", "テーブル抽出", "ドキュメント要約"

View on GitHub

Marketplace

ai-agent-marketplace

takemi-ohama/ai-agent-marketplace

Plugin

ndf

Repository

takemi-ohama/ai-agent-marketplace
1stars

plugins/ndf/skills/scanner-pdf-analysis/SKILL.md

Last Verified

January 18, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/takemi-ohama/ai-agent-marketplace/blob/main/plugins/ndf/skills/scanner-pdf-analysis/SKILL.md -a claude-code --skill scanner-pdf-analysis

Installation paths:

Claude
.claude/skills/scanner-pdf-analysis/
Powered by add-skill CLI

Instructions

# Scanner PDF Analysis Skill

## 概要

このSkillは、scannerエージェントがPDFドキュメントを分析し、構造化されたデータを抽出する際に使用します。テーブル抽出、セクション識別、要約生成などの機能を提供します。

## 主な機能

1. **テキスト抽出**: PDFからテキストを抽出
2. **テーブル抽出**: 表をCSV/JSON形式に変換
3. **セクション識別**: 見出しと構造を認識
4. **要約生成**: 重要なポイントを抽出
5. **メタデータ取得**: ページ数、作成日等

## 使用方法

### スクリプト

```bash
python scripts/analyze-pdf.py <pdf-path> [options]
```

**オプション**:
- `--extract-tables`: テーブルを抽出
- `--summarize`: 要約を生成
- `--output=<path>`: 出力ファイルパス

**使用例**:

```bash
# 基本的な分析
python scripts/analyze-pdf.py report.pdf

# テーブル抽出 + 要約
python scripts/analyze-pdf.py report.pdf --extract-tables --summarize

# 出力ファイル指定
python scripts/analyze-pdf.py report.pdf --output=analysis-result.md
```

## 出力形式

### 分析結果(Markdown)

```markdown
# report.pdf 分析結果

## 概要
- ページ数: 25
- テーブル数: 3
- 作成日: 2023-12-01

## 重要ポイント
1. [ポイント1]
2. [ポイント2]
3. [ポイント3]

## 抽出テーブル

### テーブル1 (ページ 5)
| 列1 | 列2 | 列3 |
|-----|-----|-----|
| A   | B   | C   |

### テーブル2 (ページ 12)
[...]

## セクション構造
1. はじめに (p.1)
2. 背景 (p.3)
3. 方法 (p.7)
4. 結果 (p.15)
5. 結論 (p.23)

## 全文テキスト
[抽出されたテキスト...]
```

## スクリプト詳細

### analyze-pdf.py

PDFを解析し、構造化されたデータを抽出します。

**必要なライブラリ**:
```bash
pip install PyPDF2 tabula-py pdfplumber
```

**機能**:
- PyPDF2: テキスト抽出、メタデータ取得
- tabula-py: テーブル抽出(Java必要)
- pdfplumber: 高精度なレイアウト解析

**コード概要**:
```python
import PyPDF2
import tabula
import pdfplumber

def analyze_pdf(pdf_path):
    # メタデータ取得
    with open(pdf_path, 'rb') as f:
        reader = PyPDF2.PdfReader(f)
        page_count = len(reader.pages)

        # テキスト抽出
        text = ''.join([page.extract_text() for page in reader.pages])

    # テーブル抽出
    tables = tabula.read_pdf(pdf_path, pages='all')

    # pdfplumberでレイアウト解析
    with pdfplumber.open(pdf_path) as pdf:
        # セクション識別(フォントサイズで判定)
        sections = extract_sections(pdf)

    return {
        'page_count': page_count,
        'text': text,
        'tables': tables,
        'sections': sections
    }
```

## 実装例

### 例1: 技術仕様書の分析

```python
# 技術仕様書から要件を抽出
result = analyze_pdf('

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3936 chars