Tristan Manchester

Mistral PDF OCR

オフィス効率化v1.0.0
作者:Tristan Manchester更新日 2026-05-11extracting-mistral-ocr@clawhub_tristanmanchester/extracting-mistral-ocr
PDF 処理#OCR#Document#PDF

AlphaMoatによると、2026-09時点でMistral PDF OCRのダウンロード数は1,333、スター数は0で、AIスキル全体5,078件中4,875位、オフィス効率化では435件中405位です。

インストール数
159
ダウンロード数
1333
スター数
-
総合順位
#4,875
全体の上位 97% · オフィス効率化の上位 94%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗331202--
SkillHub ↗1591333-—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

スキャン OCR、Markdown 変換、構造化抽出に対応します。文書は Mistral に送られ、出力は管理された場所に保存してください。異常応答で指定外に書き込む恐れがあり、mistralai の固定も必要です。 Python、MISTRAL_API_KEY、確認して固定した SDK が必要です。出力ファイル名が指定先を越えないよう修正・検証するまで書き出さないでください。ディレクトリ指定だけでは解決しません。不明な構造化項目は null とし、抽出品質を確認します。

資料公開日 2026-10-27

できること

  • スキャン PDF を OCR する
  • 内容を Markdown や構造化データにする

使う場面

  • 送信が承認され出力先を確認したとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

まず送信の許可と出力範囲の修正を確認し、両方が通った後に指定ディレクトリへ表を抽出してください。

月次の推移

ダウンロード数1333
55897413902026-03 · ダウンロード数 6152026-05 · ダウンロード数 8012026-06 · ダウンロード数 8772026-07 · ダウンロード数 10322026-08 · ダウンロード数 11292026-09 · ダウンロード数 133326-0326-09
スター数-
0112026-03 · スター数 -2026-05 · スター数 -2026-06 · スター数 -2026-07 · スター数 -2026-08 · スター数 -2026-09 · スター数 -26-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-091333—-
2026-081129+9.4%-
2026-071032+17.7%-
2026-06877+9.5%-
2026-05801—-
2026-03615—-

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

3.1 KB・ClawHub v1.0.0
---
name: extracting-mistral-ocr
description: >-
  Extracts text, tables, and images from PDFs (including scanned PDFs) using the Mistral OCR API.
  Use when user asks to OCR a PDF/image, extract text from a PDF, parse a scanned document,
  convert a PDF to Markdown, or extract structured fields from a document.
compatibility: >-
  Requires network access and a MISTRAL_API_KEY environment variable. Expects Python 3.9+ and the mistralai package.
allowed-tools: "Read,Write,Bash(python:*)"
metadata:
すべて表示(全 80 行)
  author: generated-by-chatgpt
  version: 0.1.0
  api: mistral
  default-model: mistral-ocr-latest
---

# Mistral OCR PDF extraction

## Quick start (default)

Run the bundled script to OCR a local PDF and write Markdown + JSON outputs:

```bash
python {baseDir}/scripts/mistral_ocr_extract.py --input path/to/file.pdf --out out/ocr
```

Output directory layout:

- `combined.md` (all pages concatenated)
- `pages/page-000.md` (per-page markdown)
- `raw_response.json` (full OCR response)
- `images/` (decoded embedded images, if requested)
- `tables/` (separate tables, if requested)

## Workflow

1. **Pick input mode**
   - **Local PDF** (most common): upload via Files API, then OCR via `file_id`.
   - **Public URL**: OCR directly via `document_url`.

2. **Choose output fidelity** (defaults are safe for RAG)
   - Keep `table_format=inline` unless the user explicitly wants tables split out.
   - Set `--include-image-base64` when the user needs figures/diagrams extracted.
   - Use `--extract-header/--extract-footer` if header/footer noise hurts downstream search.

3. **Run OCR**
   - Use `scripts/mistral_ocr_extract.py` to produce a deterministic on-disk artefact set.

4. **(Optional) Structured extraction from the whole document**
   - If the user wants fields (invoice totals, contract parties, etc.), provide an annotation prompt.
   - The OCR API can return a document-level `document_annotation` in addition to page markdown.

   Example:

   ```bash
   python {baseDir}/scripts/mistral_ocr_extract.py \
     --input invoice.pdf \
     --out out/invoice \
     --annotation-prompt "Extract supplier_name, invoice_number, invoice_date (ISO-8601), currency, total_amount. Return JSON." \
     --annotation-format json_object
   ```

## Decision rules

- **If the PDF is local and not publicly accessible**, upload it (the script does this automatically).
- **If the PDF URL is private or requires authentication**, do not pass it as `document_url`; upload instead.
- **If output quality is critical**, prefer `table_format=html` for downstream parsing over brittle regex.

## Common failure modes

- **Missing `MISTRAL_API_KEY`**: set it in the environment before running.
- **URL OCR fails**: the URL likely is not publicly accessible; upload the file.
- **Large files**: upload supports large files, but very large PDFs may need page selection (`--pages`) or batch processing.

## References

- API + parameters: `references/mistral_ocr_api.md`
- Output mapping rules (placeholders to extracted images/tables): `references/output_mapping.md`
- Example annotation prompts for common document types: `references/annotation_prompts.md`

オフィス効率化の人気スキル

Tristan Manchesterのその他のスキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。