jpskill.com
📄 ドキュメント コミュニティ

working-with-documents

Word、PDF、PowerPointといったOfficeドキュメントの作成、編集、形式変換、変更追跡など、ドキュメントに関する様々な作業を効率的に行うSkill。

📜 元の英語説明(参考)

Creates and edits Office documents: Word (.docx), PDF, and PowerPoint (.pptx). Use when working with document creation, PDF manipulation, presentation generation, tracked changes, or converting between formats.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Word、PDF、PowerPointといったOfficeドキュメントの作成、編集、形式変換、変更追跡など、ドキュメントに関する様々な作業を効率的に行うSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o working-with-documents.zip https://jpskill.com/download/17321.zip && unzip -o working-with-documents.zip && rm working-with-documents.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17321.zip -OutFile "$d\working-with-documents.zip"; Expand-Archive "$d\working-with-documents.zip" -DestinationPath $d -Force; ri "$d\working-with-documents.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して working-with-documents.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → working-with-documents フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
2

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ドキュメントの操作

クイックリファレンス

フォーマット 読み込み 作成 編集
DOCX pandoc, python-docx docx-js OOXML (展開/編集/パック)
PDF pdfplumber, pypdf reportlab pypdf (マージ/分割)
PPTX markitdown html2pptx OOXML (展開/編集/パック)

Wordドキュメント (.docx)

コンテンツの読み込み

# Markdownに変換 (構造を保持)
pandoc document.docx -o output.md

# 変更履歴を表示
pandoc --track-changes=all document.docx -o output.md

新規ドキュメントの作成

docx-js (JavaScript) を使用します:

const { Document, Packer, Paragraph, TextRun } = require('docx');

const doc = new Document({
  sections: [{
    children: [
      new Paragraph({
        children: [
          new TextRun({ text: "Hello World", bold: true }),
        ],
      }),
    ],
  }],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("output.docx", buffer);
});

既存ドキュメントの編集 (変更履歴)

# 1. 展開
python ooxml/scripts/unpack.py document.docx unpacked/

# 2. unpacked/word/document.xml 内の XML ファイルを編集
# 主要ファイル:
#   - word/document.xml (メインコンテンツ)
#   - word/comments.xml (コメント)
#   - word/media/ (画像)

# 3. パック
python ooxml/scripts/pack.py unpacked/ edited.docx

変更履歴 XML パターン:

<!-- 削除 -->
<w:del><w:r><w:delText>old text</w:delText></w:r></w:del>

<!-- 挿入 -->
<w:ins><w:r><w:t>new text</w:t></w:r></w:ins>

PDFドキュメント

PDFの読み込み

import pdfplumber

# テキストの抽出
with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        print(page.extract_text())

# テーブルの抽出
with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        tables = page.extract_tables()
        for table in tables:
            for row in table:
                print(row)

PDFの作成

from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet

doc = SimpleDocTemplate("output.pdf", pagesize=letter)
styles = getSampleStyleSheet()
story = [
    Paragraph("Report Title", styles['Title']),
    Paragraph("Body text goes here.", styles['Normal']),
]
doc.build(story)

PDFのマージ/分割

from pypdf import PdfReader, PdfWriter

# マージ
writer = PdfWriter()
for pdf_file in ["doc1.pdf", "doc2.pdf"]:
    reader = PdfReader(pdf_file)
    for page in reader.pages:
        writer.add_page(page)
writer.write(open("merged.pdf", "wb"))

# 分割
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
    writer = PdfWriter()
    writer.add_page(page)
    writer.write(open(f"page_{i+1}.pdf", "wb"))

コマンドラインツール

# テキストの抽出
pdftotext input.pdf output.txt
pdftotext -layout input.pdf output.txt  # レイアウトを保持

# qpdf でマージ
qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf

# ページを分割
qpdf input.pdf --pages . 1-5 -- pages1-5.pdf

PowerPointプレゼンテーション (.pptx)

コンテンツの読み込み

# Markdownに変換
python -m markitdown presentation.pptx

新規プレゼンテーションの作成

html2pptx ワークフローを使用します:

  1. HTMLスライドを作成 (16:9の場合は720pt × 405pt)
  2. html2pptx.js ライブラリで変換
  3. サムネイルグリッドで検証
# 検証用のサムネイルを作成
python scripts/thumbnail.py output.pptx --cols 4

既存プレゼンテーションの編集

# 1. 展開
python ooxml/scripts/unpack.py presentation.pptx unpacked/

# 主要ファイル:
#   - ppt/slides/slide1.xml, slide2.xml, etc.
#   - ppt/notesSlides/ (発表者ノート)
#   - ppt/media/ (画像)

# 2. XMLを編集

# 3. 検証
python ooxml/scripts/validate.py unpacked/ --original presentation.pptx

# 4. パック
python ooxml/scripts/pack.py unpacked/ edited.pptx

スライドの並べ替え

# スライドの複製、並べ替え、削除
python scripts/rearrange.py template.pptx output.pptx 0,3,3,5,7
# 作成: スライド 0, スライド 3 (2回), スライド 5, スライド 7

フォーマット間の変換

# DOCX/PPTX から PDF
soffice --headless --convert-to pdf document.docx

# PDF から画像
pdftoppm -jpeg -r 150 document.pdf page
# 作成: page-1.jpg, page-2.jpg, etc.

# DOCX から Markdown
pandoc document.docx -o output.md

スキャンされたドキュメントのOCR

import pytesseract
from pdf2image import convert_from_path

images = convert_from_path('scanned.pdf')
text = ""
for image in images:
    text += pytesseract.image_to_string(image)

デザインガイドライン (プレゼンテーション)

カラーパレット

相性の良い3〜5色を選択します:

パレット
クラシックブルー ネイビー #1C2833, スレート #2E4053, シルバー #AAB7B8
ティール & コーラル ティール #5EA8A7, コーラル #FE4447, ホワイト #FFFFFF
ブラック & ゴールド ゴールド #BF9A4A, ブラック #000000, クリーム #F4F6F6

Webセーフフォントのみ

Arial, Helvetica, Times New Roman, Georgia, Verdana, Tahoma, Trebuchet MS, Courier New, Impact

レイアウトルール

  • 2カラム: 2つの明確なアイテムに使用
  • 3カラム: 3つのアイテムに使用
  • テキストの下にチャートを縦に積み重ねない
  • テキストオーバーレイ付きのフルブリード画像は効果的

依存関係

# Python
pip install pypdf pdfplumber reportlab python-docx openpyxl

# システムツール
apt-get install pandoc poppler-utils libreoffice

# Node.js (docx-js用)
npm install docx

検証

実行: python scripts/verify.py

関連スキル

  • working-with-spreadsheets - Excelファイルの取り扱い
  • building-nextjs-apps - ドキュメントアップロード用のフロントエンド
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Working with Documents

Quick Reference

Format Read Create Edit
DOCX pandoc, python-docx docx-js OOXML (unpack/edit/pack)
PDF pdfplumber, pypdf reportlab pypdf (merge/split)
PPTX markitdown html2pptx OOXML (unpack/edit/pack)

Word Documents (.docx)

Reading Content

# Convert to markdown (preserves structure)
pandoc document.docx -o output.md

# With tracked changes visible
pandoc --track-changes=all document.docx -o output.md

Creating New Documents

Use docx-js (JavaScript):

const { Document, Packer, Paragraph, TextRun } = require('docx');

const doc = new Document({
  sections: [{
    children: [
      new Paragraph({
        children: [
          new TextRun({ text: "Hello World", bold: true }),
        ],
      }),
    ],
  }],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("output.docx", buffer);
});

Editing Existing Documents (Tracked Changes)

# 1. Unpack
python ooxml/scripts/unpack.py document.docx unpacked/

# 2. Edit XML files in unpacked/word/document.xml
# Key files:
#   - word/document.xml (main content)
#   - word/comments.xml (comments)
#   - word/media/ (images)

# 3. Pack
python ooxml/scripts/pack.py unpacked/ edited.docx

Tracked changes XML pattern:

<!-- Deletion -->
<w:del><w:r><w:delText>old text</w:delText></w:r></w:del>

<!-- Insertion -->
<w:ins><w:r><w:t>new text</w:t></w:r></w:ins>

PDF Documents

Reading PDFs

import pdfplumber

# Extract text
with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        print(page.extract_text())

# Extract tables
with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        tables = page.extract_tables()
        for table in tables:
            for row in table:
                print(row)

Creating PDFs

from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet

doc = SimpleDocTemplate("output.pdf", pagesize=letter)
styles = getSampleStyleSheet()
story = [
    Paragraph("Report Title", styles['Title']),
    Paragraph("Body text goes here.", styles['Normal']),
]
doc.build(story)

Merging/Splitting PDFs

from pypdf import PdfReader, PdfWriter

# Merge
writer = PdfWriter()
for pdf_file in ["doc1.pdf", "doc2.pdf"]:
    reader = PdfReader(pdf_file)
    for page in reader.pages:
        writer.add_page(page)
writer.write(open("merged.pdf", "wb"))

# Split
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
    writer = PdfWriter()
    writer.add_page(page)
    writer.write(open(f"page_{i+1}.pdf", "wb"))

Command-Line Tools

# Extract text
pdftotext input.pdf output.txt
pdftotext -layout input.pdf output.txt  # Preserve layout

# Merge with qpdf
qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf

# Split pages
qpdf input.pdf --pages . 1-5 -- pages1-5.pdf

PowerPoint Presentations (.pptx)

Reading Content

# Convert to markdown
python -m markitdown presentation.pptx

Creating New Presentations

Use html2pptx workflow:

  1. Create HTML slides (720pt × 405pt for 16:9)
  2. Convert with html2pptx.js library
  3. Validate with thumbnail grid
# Create thumbnails for validation
python scripts/thumbnail.py output.pptx --cols 4

Editing Existing Presentations

# 1. Unpack
python ooxml/scripts/unpack.py presentation.pptx unpacked/

# Key files:
#   - ppt/slides/slide1.xml, slide2.xml, etc.
#   - ppt/notesSlides/ (speaker notes)
#   - ppt/media/ (images)

# 2. Edit XML

# 3. Validate
python ooxml/scripts/validate.py unpacked/ --original presentation.pptx

# 4. Pack
python ooxml/scripts/pack.py unpacked/ edited.pptx

Rearranging Slides

# Duplicate, reorder, delete slides
python scripts/rearrange.py template.pptx output.pptx 0,3,3,5,7
# Creates: slide 0, slide 3 (twice), slide 5, slide 7

Converting Between Formats

# DOCX/PPTX to PDF
soffice --headless --convert-to pdf document.docx

# PDF to images
pdftoppm -jpeg -r 150 document.pdf page
# Creates: page-1.jpg, page-2.jpg, etc.

# DOCX to Markdown
pandoc document.docx -o output.md

OCR for Scanned Documents

import pytesseract
from pdf2image import convert_from_path

images = convert_from_path('scanned.pdf')
text = ""
for image in images:
    text += pytesseract.image_to_string(image)

Design Guidelines (Presentations)

Color Palettes

Pick 3-5 colors that work together:

Palette Colors
Classic Blue Navy #1C2833, Slate #2E4053, Silver #AAB7B8
Teal & Coral Teal #5EA8A7, Coral #FE4447, White #FFFFFF
Black & Gold Gold #BF9A4A, Black #000000, Cream #F4F6F6

Web-Safe Fonts Only

Arial, Helvetica, Times New Roman, Georgia, Verdana, Tahoma, Trebuchet MS, Courier New, Impact

Layout Rules

  • Two-column: Use for exactly 2 distinct items
  • Three-column: Use for exactly 3 items
  • Never vertically stack charts below text
  • Full-bleed images with text overlays work well

Dependencies

# Python
pip install pypdf pdfplumber reportlab python-docx openpyxl

# System tools
apt-get install pandoc poppler-utils libreoffice

# Node.js (for docx-js)
npm install docx

Verification

Run: python scripts/verify.py

Related Skills

  • working-with-spreadsheets - Excel file handling
  • building-nextjs-apps - Frontend for document uploads

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。