Skip to content
cccskills
FreePublished on GitHub

document-processor

PDF/PPTX/Excelファイルの読み取り・編集・分析を行うサブエージェント。大きなドキュメントの処理をメインコンテキストから分離し、コンテキスト消費を最適化する。「PDFを分析」「PPTXの内容を読んで」「Excelを解析」「スライドを編集」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

Works withExcelPowerPoint
See how to install

Files included (4)

  • SKILL.md5.4 KB
  • agents/openai.yaml167 B
  • SKILL.en.md4.8 KB
  • SKILL.es.md5.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Document Processor サブエージェント

PDF/PPTX/Excelファイルの読み取り・編集・分析を専用コンテキストで実行するサブエージェント。

目的

大きなドキュメントの処理をメインエージェントのコンテキストから分離し:

  • コンテキスト消費を削減(2000-10000トークン削減効果)
  • 処理結果のサマリーのみを返却
  • 複数ファイルの並列処理が可能

対応フォーマット

フォーマット読み取り編集分析
PDF (.pdf)✅✅✅
PowerPoint (.pptx)✅✅✅
Excel (.xlsx)✅✅✅

使用可能なスクリプト

1. PowerPoint操作 (tools/pptx_ops.py)

# 読み取り
uv run python tools/pptx_ops.py read <file.pptx>

# Markdown変換
uv run python tools/pptx_ops.py to-markdown <file.pptx>

# 構造分析
uv run python tools/pptx_ops.py analyze <file.pptx>

# テンプレート抽出
uv run python tools/pptx_ops.py extract-template <file.pptx> --output template.json

# 新規作成
uv run python tools/pptx_ops.py create <template.json> --output new.pptx

2. Excel操作 (tools/excel_ops.py)

# 読み取り
uv run python tools/excel_ops.py read <file.xlsx>

# 特定シート読み取り
uv run python tools/excel_ops.py read <file.xlsx> --sheet "Sheet1"

# Markdown変換
uv run python tools/excel_ops.py to-markdown <file.xlsx>

# 分析レポート
uv run python tools/excel_ops.py analyze <file.xlsx>

# 書き込み
uv run python tools/excel_ops.py write <file.xlsx> --data '{"sheet": "Sheet1", "cell": "A1", "value": "Hello"}'

3. PDF操作 (tools/pdf_page_editor.py)

# テキスト抽出・分析
uv run python tools/pdf_page_editor.py analyze <file.pdf>

# ページ編集
uv run python tools/pdf_page_editor.py edit <file.pdf> --page 1 --changes <changes.yaml>

# 圧縮
uv run python tools/pdf_page_editor.py compress <file.pdf> --output compressed.pdf

サブエージェント呼び出しパターン

メインエージェントは以下のパターンでこのサブエージェントを呼び出す:

Task(
    subagent_type="generalPurpose",
    model="fast",
    description="Document analysis",
    prompt="""
    このスキルを読んで実行してください: skills/document-processor/SKILL.md
    
    タスク: {ユーザーの指示}
    対象ファイル: {ファイルパス}
    
    結果はサマリー形式で返却してください。
    """
)

返却フォーマット

処理結果は以下のサマリー形式で返却:

status: success
file: example.pptx
summary:
  total_slides: 10
  key_content:
    - slide_1: "タイトルスライド - プロジェクト概要"
    - slide_2: "目次 - 5項目"
  findings:
    - "テンプレートは16:9アスペクト比"
    - "カラースキーム: 青/白/黒"
output_files:
  - example_structure.json
  - example_structure.txt

依存関係

python-pptx>=0.6.21
openpyxl>=3.1.0
pdf2image>=1.16.0
Pillow>=9.0.0
PyMuPDF>=1.21.0
google-generativeai>=0.3.0

ユースケース

  1. PPTX分析: テンプレート構造の把握、プレースホルダー特定
  2. Excel分析: データ構造の理解、シート間の関係把握
  3. PDF編集: テキスト修正、ページ再構築
  4. バッチ処理: 複数ドキュメントの一括処理

注意事項

  • 大きなファイル(>50MB)は処理に時間がかかる場合がある
  • PDF編集は元ファイルを変更せず、新規ファイルを生成
  • 画像の多いPPTXは--with-imagesオプションで画像も抽出可能

Overview

PDF/PPTX/Excelファイルの読み取り・編集・分析を専用コンテキストで実行するサブエージェントスキルです。大きなドキュメントの処理をメインコンテキストから分離し、処理結果のサマリーのみを返却します。

Troubleshooting

エラー解決方法
python-pptx not installeduv add python-pptx でインストール
PDF parsing errorPyMuPDF がインストールされているか確認: uv add PyMuPDF
File too large (>50MB)処理に時間がかかる場合あり。PDF圧縮スキルで事前に軽量化を検討

Success Criteria

  • ドキュメントの内容がサマリー形式(YAML)で返却されている
  • 編集操作時に元ファイルが変更されず新規ファイルが生成されている
  • エラーなく完了している

Usage

上記「使用可能なスクリプト」セクションを参照。基本例:

# PPTX読み取り
uv run python tools/pptx_ops.py read presentation.pptx

# Excel分析
uv run python tools/excel_ops.py analyze data.xlsx

# PDF分析
uv run python tools/pdf_page_editor.py analyze document.pdf

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

A/Bテストや実験の設計・実装を支援するスキル。 「A/Bテストを設計して」「スプリットテストしたい」「仮説を立ててテストしたい」「バリアントを比較」等のリクエストで発動。 トラッキング実装は analytics-tracking を参照。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

マルチエージェントシステムのアーキテクチャ設計ツールキット。 「エージェントを設計して」「マルチエージェント構成」「エージェントのアーキテクチャ」「オーケストレーション設計」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campのローカル環境セットアップを確認するスキル。 「セットアップ確認」「環境チェック」「初期設定できてる?」「インストール確認」「依存関係チェック」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campのスラッシュコマンドをCodexでルーティングするスキル。 「/start-0-1を実行」「スラッシュコマンドを使いたい」「コマンドルーティング」「Cursorのコマンドを使いたい」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campの環境変数・認証情報を安全に管理するスキル。 「APIキーを設定」「.envを管理」「環境変数の設定」「credential managerを使いたい」「秘密情報の管理」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campリポジトリの案内・オリエンテーションスキル。 「リポジトリ案内」「次のレッスンは?」「どこから始める」「ツールの違い」「aiagent概要」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

See all skills by minicoohei

Report a problem with this skill