markdown-converter について
`uvx` 経由で `markitdown` を実行し、ファイルなどの入力を Markdown に変換するスキルです。文書、データ、メディア形式に対応し、出力先や解析用ヒントも指定できます。
主な機能
- 01文書を Markdown に変換
- 02ウェブとデータ形式に対応
- 03画像と音声の内容を抽出
- 04ZIP の内容と YouTube URL を読み込み
- 05出力先と入力形式のヒントを指定
活用シーン
- 01PDF レポートを Markdown に変換
- 02スプレッドシートから表を抽出
- 03プレゼンテーションを Markdown ファイル化
- 04テキスト処理用にメディアやウェブデータを変換
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ steipete/ agent-scripts --skill markdown-converterインストール後、Claude Code で/markdown-converterを入力して読み込まれたか確認します。
詳細
Markdown コンバーター
uvx --from "markitdown[all]" markitdown を使ってファイルを Markdown に変換します。インストールは不要です。
基本的な使い方
# Convert to stdout
uvx --from "markitdown[all]" markitdown input.pdf
# Save to file
uvx --from "markitdown[all]" markitdown input.pdf -o output.md
uvx --from "markitdown[all]" markitdown input.docx > output.md
# From stdin
cat input.pdf | uvx --from "markitdown[all]" markitdown
対応形式
- ドキュメント:PDF、Word(.docx)、PowerPoint(.pptx)、Excel(.xlsx、.xls)
- ウェブ/データ:HTML、CSV、JSON、XML
- メディア:画像(EXIF+OCR)、音声(EXIF+文字起こし)
- その他:ZIP(内容を順に処理)、YouTube URL、EPub
オプション
-o OUTPUT # Output file
-x EXTENSION # Hint file extension (for stdin)
-m MIME_TYPE # Hint MIME type
-c CHARSET # Hint charset (e.g., UTF-8)
-d # Use Azure Document Intelligence
-e ENDPOINT # Document Intelligence endpoint
--use-plugins # Enable 3rd-party plugins
--list-plugins # Show installed plugins
使用例
# Convert Word document
uvx --from "markitdown[all]" markitdown report.docx -o report.md
# Convert Excel spreadsheet
uvx --from "markitdown[all]" markitdown data.xlsx > data.md
# Convert PowerPoint presentation
uvx --from "markitdown[all]" markitdown slides.pptx -o slides.md
# Convert with file type hint (for stdin)
cat document | uvx --from "markitdown[all]" markitdown -x .pdf > output.md
# Use Azure Document Intelligence for better PDF extraction
uvx --from "markitdown[all]" markitdown scan.pdf -d -e "https://your-resource.cognitiveservices.azure.com/"
注意事項
- 出力では、見出し、表、リスト、リンクなど、ドキュメントの構造が保持されます。
- 初回実行時に依存関係がキャッシュされるため、2回目以降は高速になります。
- 抽出結果が不十分な複雑な PDF では、Azure Document Intelligence とともに
-dを使用してください。 - テキストファイルの文字コードが自動検出で誤って判定される場合は、
-c UTF-8(または判明している文字コード)を指定してください。
コメント
Markdown 対応