Automation and conversion tool for LibreOffice Writer document workflows.
Install
mkdir -p .claude/skills/writer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9698" && unzip -o skill.zip -d .claude/skills/writer && rm skill.zipInstalls to .claude/skills/writer
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
ALWAYS use this when the request matches Writer: Document creation, format conversion (ODT/DOCX/PDF), mail merge, and automation with LibreOffice Writer.Key capabilities
- →ODT document creation
- →Format conversion between ODT, DOCX, PDF, and HTML
- →Mail merge automation
- →Batch document processing
- →Template-based document generation
How it works
It utilizes the LibreOffice soffice command-line interface or UNO Python bindings to manipulate and convert documents programmatically.
Inputs & outputs
When to use writer
- →Convert documents to PDF
- →Automate document generation
- →Batch process ODT files
About this skill
LibreOffice Writer
Selective Reading Rule
Start with:
references/senior-master-standard.mdreferences/usage-routing.mdreferences/quality-checklist.md
Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.
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
- Use styles for consistency
- Create templates for recurring documents
- Ensure accessibility (heading hierarchy, alt text)
- Fill document metadata
- Store ODT source files in version control
- Test conversions thoroughly
- Embed fonts for PDF distribution
- Handle conversion failures gracefully
- Log automation operations
- 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.
When not to use it
- →Tasks requiring non-LibreOffice native document formats
- →Environment-specific validation without expert review
Prerequisites
Limitations
- →Requires LibreOffice installed on the host system
- →Conversion quality depends on document complexity
How it compares
This approach automates document workflows via CLI or scripts instead of manual GUI-based editing.
Compared to similar skills
writer side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| writer (this skill) | 0 | 3mo | Review | Intermediate |
| architecture-decision-records | 54 | 5mo | Review | Beginner |
| meeting-minutes | 41 | 6mo | No flags | Beginner |
| docs-write | 22 | 6mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Anhvu1107
View all by Anhvu1107 →You might also like
architecture-decision-records
wshobson
Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.
meeting-minutes
github
Generate concise, actionable meeting minutes for internal meetings. Includes metadata, attendees, agenda, decisions, action items (owner + due date), and follow-up steps.
docs-write
metabase
Write documentation following Metabase's conversational, clear, and user-focused style. Use when creating or editing documentation files (markdown, MDX, etc.).
rust-docs-guidelines
RediSearch
Guidelines for writing Rust documentation
ml-paper-writing
davila7
Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Use when drafting papers from research repos, structuring arguments, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, reviewer guidelines, and citation verification workflows.
content-research-writer
ComposioHQ
Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.