Communitygithub.com

David-Li0406/meta-skill-evloving

ファイルやオフィス文書をMarkdownに変換します。PDF、DOCX、PPTX、XLSX、画像(OCR対応)、音声(文字起こし対応)、HTML、CSV、JSON、XML、ZIP、YouTube URL、EPUBなどに対応しています。

meta-skill-evloving とは?

これは、ファイルをMarkdown形式に変換するための統合スキルです。Microsoftが開発した「MarkItDown」ツールをベースにしており、PDF、Word、PowerPoint、Excel、画像(OCRによるテキスト抽出)、音声ファイル(文字起こし)、HTML、CSV、JSON、XML、ZIP、EPUB、YouTube動画の文字起こしなど、15以上のファイル形式をサポートします。Markdownはトークン効率が良く、LLM(大規模言語モデル)が理解しやすい形式であるため、AIエージェントやRAG(検索拡張生成)パイプラインとの連携に最適です。さらに、OpenRouter経由でLLMを利用したAIによる画像説明の生成、Azure Document Intelligenceによる高度なPDF変換、プラグインシステムによる機能拡張など、高度な機能も備えています。また、このスキルは、科学的なダイアグラムや回路図を自動生成する「scientific-schematics」スキルと連携し、文書の視覚的な表現を強化することを推奨しています。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/David-Li0406/meta-skill-evloving/tree/HEAD/AgentSkillOS/data/skill_seeds/markitdown

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

MarkItDown - ファイルからMarkdownへの変換

概要

MarkItDownは、Microsoftが開発した、さまざまなファイル形式をMarkdownに変換するためのPythonツールです。Markdownはトークン効率が高く、現代の言語モデルによく理解されるため、ドキュメントをLLMにとって扱いやすいテキスト形式に変換するのに特に便利です。

主な利点:

  • ドキュメントをクリーンで構造化されたMarkdownに変換
  • LLM処理に適したトークン効率の良い形式
  • 15以上のファイル形式をサポート
  • オプションのAI強化画像説明
  • 画像やスキャン文書向けのOCR
  • 音声ファイルの音声文字起こし

科学的な回路図による視覚的強化

このスキルで文書を作成する際は、科学的なダイアグラムや回路図を追加して、視覚的なコミュニケーションを強化することを常に検討してください。

文書に回路図やダイアグラムがまだ含まれていない場合:

  • scientific-schematicsスキルを使用して、AI駆動の出版品質のダイアグラムを生成します
  • 自然言語で希望のダイアグラムを説明するだけです
  • Nano Banana Proが自動的に回路図を生成、レビュー、改良します

新しい文書の場合: 科学的な回路図は、テキストで説明されている主要な概念、ワークフロー、アーキテクチャ、または関係性を視覚的に表現するために、デフォルトで生成されるべきです。

回路図を生成する方法:

python scripts/generate_schematic.py "あなたのダイアグラムの説明" -o figures/output.png

AIは自動的に:

  • 適切なフォーマットで出版品質の画像を作成
  • 複数回の反復でレビューと改良を実施
  • アクセシビリティを確保(色覚異常者に優しい、高コントラスト)
  • 出力をfigures/ディレクトリに保存

回路図を追加するタイミング:

  • 文書変換ワークフロー図
  • ファイル形式アーキテクチャの図解
  • OCR処理パイプライン図
  • 統合ワークフロー図
  • システムアーキテクチャ図
  • データフロー図
  • 視覚化が有効な複雑な概念

回路図作成の詳細なガイダンスについては、scientific-schematicsスキルのドキュメントを参照してください。


サポートされている形式

形式説明備考
PDFPortable Document Format全文テキスト抽出
DOCXMicrosoft Wordテーブル、書式保持
PPTXPowerPointノート付きスライド
XLSXExcelスプレッドシートテーブルとデータ
画像JPEG, PNG, GIF, WebPEXIFメタデータ + OCR
音声WAV, MP3メタデータ + 文字起こし
HTMLWebページクリーンな変換
CSVカンマ区切り値テーブル形式
JSONJSONデータ構造化表現
XMLXML文書構造化形式
ZIPアーカイブファイル内容を反復処理
EPUB電子書籍全文テキスト抽出
YouTube動画URL文字起こしを取得

クイックスタート

インストール

# すべての機能を含めてインストール
pip install 'markitdown[all]'

# またはソースからインストール
git clone https://github.com/microsoft/markitdown.git
cd markitdown
pip install -e 'packages/markitdown[all]'

コマンドラインでの使用

# 基本変換
markitdown document.pdf > output.md

# 出力ファイルを指定
markitdown document.pdf -o output.md

# パイプで内容を渡す
cat document.pdf | markitdown > output.md

# プラグインを有効にする
markitdown --list-plugins  # 利用可能なプラグインを一覧表示
markitdown --use-plugins document.pdf -o output.md

Python API

from markitdown import MarkItDown

# 基本的な使い方
md = MarkItDown()
result = md.convert("document.pdf")
print(result.text_content)

# ストリームから変換
with open("document.pdf", "rb") as f:
    result = md.convert_stream(f, file_extension=".pdf")
    print(result.text_content)

高度な機能

1. AI強化画像説明

OpenRouter経由でLLMを使用して、詳細な画像説明を生成します(PPTXおよび画像ファイル用):

from markitdown import MarkItDown
from openai import OpenAI

# OpenRouterクライアントの初期化(OpenAI互換API)
client = OpenAI(
    api_key="your-openrouter-api-key",
    base_url="https://openrouter.ai/api/v1"
)

md = MarkItDown(
    llm_client=client,
    llm_model="anthropic/claude-sonnet-4.5",  # 科学的な視覚分析に推奨
    llm_prompt="科学的なドキュメントのためにこの画像を詳細に説明してください"
)

result = md.convert("presentation.pptx")
print(result.text_content)

2. Azure Document Intelligence

Microsoft Document Intelligenceを使用した拡張PDF変換:

# コマンドライン
markitdown document.pdf -o output.md -d -e "<document_intelligence_endpoint>"
# Python API
from markitdown import MarkItDown

md = MarkItDown(docintel_endpoint="<document_intelligence_endpoint>")
result = md.convert("complex_document.pdf")
print(result.text_content)

3. プラグインシステム

MarkItDownは、機能を拡張するためのサードパーティプラグインをサポートしています:

# インストール済みプラグインの一覧表示
markitdown --list-plugins

# プラグインを有効にする
markitdown --use-plugins file.pdf -o output.md

GitHubでハッシュタグ #markitdown-plugin を使ってプラグインを検索できます。

オプションの依存関係

サポートするファイル形式を制御します:

# 特定の形式をインストール
pip install 'markitdown[pdf, docx, pptx]'

# 利用可能なすべてのオプション:
# [all]                  - すべてのオプション依存関係
# [pptx]                 - PowerPointファイル
# [docx]                 - Word文書
# [xlsx]                 - Excelスプレッドシート
# [xls]                  - 古いExcelファイル
# [pdf]                  - PDF文書
# [outlook]              - Outlookメッセージ
# [az-doc-intel]         - Azure Document Intelligence
# [audio-transcription]  - WAVおよびMP3の文字起こし
# [youtube-transcription] - YouTube動画の文字起こし

一般的なユースケース

1. 科学論文をMarkdownに変換

from markitdown import MarkItDown

md = MarkItDown()

# PDF論文を変換
result = md.convert("research_paper.pdf")
with open("paper.md", "w") as f:
    f.write(result.text_content)

2. Excelからデータを抽出して分析

from markitdown import MarkItDown

md = MarkItDown()
result = md.convert("data.xlsx")

# 結果はMarkdownテーブル形式になります
print(result.text_content)

3. 複数の文書を処理

from markitdown import MarkItDown
import os
from pathlib import Path

md = MarkItDown()

# ディレクトリ内のすべてのPDFを処理
pdf_dir = Path("papers/")
output_dir = Path("markdown_output/")
output_dir.mkdir(exist_ok=True)

for pdf_file in pdf_dir.glob("*.pdf"):
    result = md.convert(str(pdf_file))
    output_file = output_dir / f"{pdf_file.stem}.md"
    output_file.write_text(result.text_content)
    print(f"変換完了: {pdf_file.name}")

4. AI説明付きPowerPointを変換

from markitdown import MarkItDown
from openai import OpenAI

# 複数のAIモデルにアクセスするためにOpenRouterを使用
client = OpenAI(
    api_key="your-openrouter-api-key",
    base_url="https://openrouter.ai/api/v1"
)

md = MarkItDown(
    llm_client=client,
    llm_model="anthropic/claude-sonnet-4.5",  # プレゼンテーションに推奨
    llm_prompt="このスライド画像を詳細に説明し、主要な視覚要素とデータに焦点を当ててください"
)

result = md.convert("presentation.pptx")
with open("presentation.md", "w") as f:
    f.write(result.text_content)

5. 異なる形式でバッチ変換

from markitdown import MarkItDown
from pathlib import Path

md = MarkItDown()

# 変換するファイル
files = [
    "document.pdf",
    "spreadsheet.xlsx",
    "presentation.pptx",
    "notes.docx"
]

for file in files:
    try:
        result = md.convert(file)
        output = Path(file).stem + ".md"
        with open(output, "w") as f:
            f.write(result.text_content)
        print(f"✓ 変換完了: {file}")
    except Exception as e:
        print(f"✗ 変換エラー: {file}: {e}")

6. YouTube動画の文字起こしを抽出

from markitdown import MarkItDown

md = MarkItDown()

# YouTube動画を文字起こしに変換
result = md.convert("https://www.youtube.com/watch?v=VIDEO_ID")
print(result.text_content)

Dockerでの使用

# イメージをビルド
docker build -t markitdown:latest .

# 変換を実行
docker run --rm -i markitdown:latest < ~/document.pdf > output.md

ベストプラクティス

1. 適切な変換方法を選択

  • 単純な文書: 基本的な MarkItDown() を使用
  • 複雑なPDF: Azure Document Intelligenceを使用
  • 視覚的なコンテンツ: AI画像説明を有効にする
  • スキャン文書: OCR依存関係がインストールされていることを確認

2. エラーを適切に処理

from markitdown import MarkItDown

md = MarkItDown()

try:
    result = md.convert("document.pdf")
    print(result.text_content)
except FileNotFoundError:
    print("ファイルが見つかりません")
except Exception as e:
    print(f"変換エラー: {e}")

3. 大きなファイルを効率的に処理

from markitdown import MarkItDown

md = MarkItDown()

# 大きなファイルの場合は、ストリーミングを使用
with open("large_file.pdf", "rb") as f:
    result = md.convert_stream(f, file_extension=".pdf")
    
    # チャンクで処理するか、直接保存
    with open("output.md", "w") as out:
        out.write(result.text_content)

4. トークン効率を最適化

Markdown出力はすでにトークン効率が良いですが、以下のことが可能です:

  • 過剰な空白を削除
  • 類似したセクションを統合
  • 不要な場合はメタデータを削除
from markitdown import MarkItDown
import re

md = MarkItDown()
result = md.convert("document.pdf")

# 余分な空白をクリーンアップ
clean_text = re.sub(r'\n{3,}', '\n\n', result.text_content)
clean_text = clean_text.strip()

print(clean_text)

科学的なワークフローとの統合

文献をレビュー用に変換

from markitdown import MarkItDown
from pathlib import Path

md = MarkItDown()

# literatureフォルダ内のすべての論文を変換
papers_dir = Path("literature/pdfs")
output_dir = Path("literature/markdown")
output_dir.mkdir(exist_ok=True)

for paper in papers_dir.glob("*.pdf"):
    result = md.convert(str(paper))
    
    # メタデータとともに保存
    output_file = output_dir / f"{paper.stem}.md"
    content = f"# {paper.stem}\n\n"
    content += f"**ソース**: {paper.name}\n\n"
    content += "---\n\n"
    content += result.text_content
    
    output_file.write_text(content)

# 図を含むAI強化変換用
from openai import OpenAI

client = OpenAI(
    api_key="your-openrouter-api-key",
    base_url="https://openrouter.ai/api/v1"
)

md_ai = MarkItDown(
    llm_client=client,
    llm_model="anthropic/claude-sonnet-4.5",
    llm_prompt="科学的な図を技術的な精度で説明してください"
)

分析用のテーブルを抽出

from markitdown import MarkItDown
import re

md = MarkItDown()
result = md.convert("data_tables.xlsx")

# Markdownテーブルは解析するか、そのまま使用できます
print(result.text_content)

トラブルシューティング

一般的な問題

  1. 依存関係の欠落: 機能固有のパッケージをインストール

    pip install 'markitdown[pdf]'  # PDFサポート用
    
  2. バイナリファイルエラー: ファイルがバイナリモードで開かれていることを確認

    with open("file.pdf", "rb") as f:  # "rb"に注意
        result = md.convert_stream(f, file_extension=".pdf")
    
  3. OCRが動作しない: tesseractをインストール

    # macOS
    brew install tesseract
    
    # Ubuntu
    sudo apt-get install tesseract-ocr
    

パフォーマンスに関する考慮事項

  • PDFファイル: 大きなPDFは時間がかかる場合があります。サポートされている場合はページ範囲を検討してください
  • 画像OCR: OCR処理はCPU負荷が高いです
  • 音声文字起こし: 追加の計算リソースが必要です
  • AI画像説明: API呼び出しが必要です(費用が発生する場合があります)

次のステップ

  • 完全なAPIドキュメントについては references/api_reference.md を参照
  • 形式固有の詳細については references/file_formats.md を確認
  • 自動化の例については scripts/batch_convert.py をレビュー
  • AI強化変換については scripts/convert_with_ai.py を探索

リソース

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

David-Li0406/meta-skill-evloving

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.

David-Li0406/meta-skill-evloving

Create technical diagrams using Mermaid syntax for architecture, sequences, ERDs, flowcharts, and state machines. Use for visualizing system design, data flows, and processes. Triggers: diagram, mermaid, architecture diagram, sequence diagram, flowchart, ERD, entity relationship, state diagram, C4 model, component diagram, visualize, draw.

David-Li0406/meta-skill-evloving

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

David-Li0406/meta-skill-evloving

Complete color manipulation and green screen effects system. PROACTIVELY activate for: (1) Green screen/chromakey removal, (2) Color grading with LUTs, (3) Color correction (levels, curves, white balance), (4) Colorkey/color removal effects, (5) Hue/saturation manipulation, (6) Color space conversions (BT.709, BT.2020, HDR), (7) Color isolation effects, (8) Teal and orange look, (9) Vintage/film looks, (10) Color keying for transparency. Provides: chromakey and colorkey filters, LUT application (lut3d), curves and levels adjustment, color balance, selective color manipulation, color space handling, HDR tone mapping, professional color grading chains.

David-Li0406/meta-skill-evloving

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

David-Li0406/meta-skill-evloving

Build with OpenAI's stateless APIs - Chat Completions (GPT-5, GPT-4o), Embeddings, Images (DALL-E 3), Audio (Whisper + TTS), and Moderation. Includes Node.js SDK and fetch-based approaches for Cloudflare Workers. Use when: implementing chat completions with GPT-5/GPT-4o, streaming responses with SSE, using function calling/tools, creating structured outputs with JSON schemas, generating embeddings for RAG (text-embedding-3-small/large), generating images with DALL-E 3, editing images with GPT-Image-1, transcribing audio with Whisper, synthesizing speech with TTS (11 voices), moderating content (11 safety categories), or troubleshooting rate limits (429), invalid API keys (401), function calling failures, streaming parse errors, embeddings dimension mismatches, or token limit exceeded.

David-Li0406/meta-skill-evloving

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

David-Li0406/meta-skill-evloving

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

David-Li0406/meta-skill-evloving

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

David-Li0406/meta-skill-evloving

Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.

David-Li0406/meta-skill-evloving

Best practices for Remotion - Video creation in React

David-Li0406/meta-skill-evloving

Provides bidirectional translation (Chinese/English), grammar checking, and sentence polishing. Supports specific tense constraints, context-aware tone adjustment, and natural expression optimization. Outputs direct text without formatting.

David-Li0406/meta-skill-evloving

指导如何通过自定义注解(如@Unicom)标识Dubbo接口,利用BeanDefinitionRegistryPostProcessor在启动时扫描并动态注册ReferenceBean,实现RPC调用的封装。

David-Li0406/meta-skill-evloving

生成Python脚本,利用FFmpeg将图片序列按3x3布局合并,或将合并图拆分。要求使用subprocess模块执行命令,并支持用户交互式输入路径。

David-Li0406/meta-skill-evloving

SOP for extracting and analyzing promotional activity details, handling time formatting, location mapping, payment logic, and step-by-step process validation.

David-Li0406/meta-skill-evloving

Specializes in creating TikTok short video scripts using an anthropomorphic 'Chef' perspective to explain wildlife food chains and survival environments, utilizing real field footage.

David-Li0406/meta-skill-evloving

针对TikTok平台,以拟人化视角(如动物作为厨师)创作系列短视频脚本。重点介绍野生动物、食物链及生态环境,要求使用野外实拍素材,风格幽默且具有教育意义。

David-Li0406/meta-skill-evloving

Generates KWL (Know, Want to know, Learned) charts for educational videos, specifically BrainPOP, using simple 7th-grade language and short, concise bullet points.

David-Li0406/meta-skill-evloving

Develops DAX measures to calculate promo and regular volumes and generates a calculated table of dates excluding continuous promo date ranges, handling multiple periods and nulls.

David-Li0406/meta-skill-evloving

Tracks complex, multi-session work using the Beads issue tracker and dependency graphs, and provides persistent memory that survives conversation compaction. Use when work spans multiple sessions, has complex dependencies, or needs persistent context across compaction cycles. Trigger with phrases like "create task for", "what's ready to work on", "show task", "track this work", "what's blocking", or "update status".

関連スキル