jpskill.com
📄 ドキュメント コミュニティ 🟢 非エンジニアでもOK 👤 事務職・営業・経理

📄 ライター

writer

LibreOffice Writer を用いて、文書作成、ODT/DOCX/PDF形式への変換、差し込み印刷、自動化を行うためのSkill。

⏱ PDF結合・分割・OCR 数十分 → 数秒

📺 まず動画で見る(YouTube)

▶ Claude最新!PowerPoint, Excel, Wordを生成できる機能を解説 ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

Document creation, format conversion (ODT/DOCX/PDF), mail merge, and automation with LibreOffice Writer.

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

一言でいうと

LibreOffice Writer を用いて、文書作成、ODT/DOCX/PDF形式への変換、差し込み印刷、自動化を行うためのSkill。

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

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

🎯 この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-17
取得日時
2026-05-17
同梱ファイル
1

💬 こう話しかけるだけ — サンプルプロンプト

  • Writer を使って、来週の会議資料の下書きを作って
  • Writer で、既存ファイルから必要な部分だけ抽出して
  • Writer で、提供されたテンプレートに沿って自動整形して

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Claude が読む原文 SKILL.md(中身を展開)

この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。

LibreOffice Writer

Overview

LibreOffice Writer skill for creating, editing, converting, and automating document workflows using the native ODT (OpenDocument Text) format.

When to Use This Skill

Use this skill when:

  • Creating new documents in ODT format
  • Converting documents between formats (ODT <-> DOCX, PDF, HTML, RTF, TXT)
  • Automating document generation workflows
  • Performing batch document operations
  • Creating templates and standardized document formats

Core Capabilities

1. Document Creation

  • Create new ODT documents from scratch
  • Generate documents from templates
  • Create mail merge documents
  • Build forms with fillable fields

2. Format Conversion

  • ODT to other formats: DOCX, PDF, HTML, RTF, TXT, EPUB
  • Other formats to ODT: DOCX, DOC, RTF, HTML, TXT
  • Batch conversion of multiple documents

3. Document Automation

  • Template-based document generation
  • Mail merge with data sources (CSV, spreadsheet, database)
  • Batch document processing
  • Automated report generation

4. Content Manipulation

  • Text extraction and insertion
  • Style management and application
  • Table creation and manipulation
  • Header/footer management

5. Integration

  • Command-line automation via soffice
  • Python scripting with UNO
  • Integration with workflow automation tools

Workflows

Creating a New Document

Method 1: Command-Line

soffice --writer template.odt

Method 2: Python with UNO

import uno

def create_document():
    local_ctx = uno.getComponentContext()
    resolver = local_ctx.ServiceManager.createInstanceWithContext(
        "com.sun.star.bridge.UnoUrlResolver", local_ctx
    )
    ctx = resolver.resolve(
        "uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"
    )
    smgr = ctx.ServiceManager
    doc = smgr.createInstanceWithContext("com.sun.star.text.TextDocument", ctx)
    text = doc.Text
    cursor = text.createTextCursor()
    text.insertString(cursor, "Hello from LibreOffice Writer!", 0)
    doc.storeToURL("file:///path/to/document.odt", ())
    doc.close(True)

Method 3: Using odfpy

from odf.opendocument import OpenDocumentText
from odf.text import P, H

doc = OpenDocumentText()
h1 = H(outlinelevel='1', text='Document Title')
doc.text.appendChild(h1)
doc.save("document.odt")

Converting Documents

# ODT to DOCX
soffice --headless --convert-to docx document.odt

# ODT to PDF
soffice --headless --convert-to pdf document.odt

# DOCX to ODT
soffice --headless --convert-to odt document.docx

# Batch convert
for file in *.odt; do
    soffice --headless --convert-to pdf "$file"
done

Template-Based Generation

import subprocess
import tempfile
from pathlib import Path

def generate_from_template(template_path, variables, output_path):
    with tempfile.TemporaryDirectory() as tmpdir:
        subprocess.run(['unzip', '-q', template_path, '-d', tmpdir])
        content_file = Path(tmpdir) / 'content.xml'
        content = content_file.read_text()
        for key, value in variables.items():
            content = content.replace(f'${{{key}}}', str(value))
        content_file.write_text(content)
        subprocess.run(['zip', '-rq', output_path, '.'], cwd=tmpdir)
    return output_path

Format Conversion Reference

Supported Input Formats

  • ODT (native), DOCX, DOC, RTF, HTML, TXT, EPUB

Supported Output Formats

  • ODT, DOCX, PDF, PDF/A, HTML, RTF, TXT, EPUB

Command-Line Reference

soffice --headless
soffice --headless --convert-to <format> <file>
soffice --writer    # Writer
soffice --calc      # Calc
soffice --impress   # Impress
soffice --draw      # Draw

Python Libraries

pip install odfpy     # ODF manipulation
pip install ezodf     # Easier ODF handling

Best Practices

  1. Use styles for consistency
  2. Create templates for recurring documents
  3. Ensure accessibility (heading hierarchy, alt text)
  4. Fill document metadata
  5. Store ODT source files in version control
  6. Test conversions thoroughly
  7. Embed fonts for PDF distribution
  8. Handle conversion failures gracefully
  9. Log automation operations
  10. Clean temporary files

Troubleshooting

Cannot open socket

killall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"

Conversion Quality Issues

soffice --headless --convert-to pdf:writer_pdf_Export document.odt

Resources

Related Skills

  • calc
  • impress
  • draw
  • base
  • docx-official
  • pdf-official
  • workflow-automation

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.