From antigravity-awesome-skills
Creates, edits, converts (ODT/DOCX/PDF), and automates document workflows using LibreOffice Writer, with support for mail merge, templates, and batch processing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/antigravity-awesome-skills:writerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
LibreOffice Writer skill for creating, editing, converting, and automating document workflows using the native ODT (OpenDocument Text) format.
LibreOffice Writer skill for creating, editing, converting, and automating document workflows using the native ODT (OpenDocument Text) format.
Use this skill when:
soffice --writer template.odt
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)
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")
# 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
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
soffice --headless
soffice --headless --convert-to <format> <file>
soffice --writer # Writer
soffice --calc # Calc
soffice --impress # Impress
soffice --draw # Draw
pip install odfpy # ODF manipulation
pip install ezodf # Easier ODF handling
killall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"
soffice --headless --convert-to pdf:writer_pdf_Export document.odt
npx claudepluginhub sickn33/antigravity-awesome-skills --plugin antigravity-bundle-aas-mobile-app-builderAutomates LibreOffice Writer for document creation, format conversion (ODT/DOCX/PDF/HTML/RTF), mail merge, batch processing, and template generation via CLI and Python.
Automates office workflows for document creation, spreadsheet processing, presentation generation, format conversion, and integrations with LibreOffice and Microsoft Office formats. Useful for programmatic reports and batch processing.
Creates, reads, and edits Word documents (.docx) using pandoc, docx-js, and Python scripts. Activates on mentions of Word docs, .docx, or requests for reports/memos.