agentsclimarketplace

Libreoffice

Skill dangrover/claude-libreoffice/skills/libreoffice

Edit a document that is OPEN ON SCREEN in LibreOffice Writer — insert/replace text, navigate by paragraph, redline with Track Changes, add comments, export to PDF/DOCX. Use when the user says "the document I have open", "in LibreOffice", "redline this", "track changes", or wants to watch edits happen live. NOT for editing .docx files on disk that aren't open — use a file-based tool for that.From its SKILL.md

Install
npx -y skills add dangrover/claude-libreoffice --skill libreoffice

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

8.6 KB, as published. Nobody here has run it

LibreOffice (live document editing)

Drives the LibreOffice Writer document currently open on screen, through the mcp-libre extension. Edits appear in real time in the GUI.

Nine consolidated tools come from an MCP server named libreoffice: document, structure, cursor, selection, search, track_changes, comments, save, text. How they're prefixed depends on the client — Claude Code exposes them as mcp__libreoffice__document and so on; other agents may namespace them differently or not at all. Match whatever your tool list actually shows.

If those tools aren't available at all, fall back to curl against the extension's REST API — see REFERENCE.md. Everything below works either way.

RULE 1: Every call targets the FOCUSED document

There is no document handle. Every tool acts on whatever window has focus at the moment of the call — and that can change between two calls if the user clicks another window. This is the single most likely way to cause real damage: a cleanup call intended for a scratch document landing on the user's real work instead.

Before any mutating call (text, selection, search replace, track_changes, comments, save):

  1. document(action="info") — read back title and url.
  2. Confirm it is the intended document. An empty url means an unsaved scratch doc.
  3. Only then mutate. For a long edit sequence, re-check every few operations.

If the target is wrong, stop and ask the user to click the right window — there is no API to focus a document. document(action="list") shows everything open, but you cannot choose among them.

Never assume the document you read three calls ago is still the one in front of you.

Preflight

document(action="status") hits the extension's health endpoint.

If it fails to connect, the extension isn't serving. Tell the user:

LibreOffice needs the MCP server started: Tools → MCP Server → Start MCP Server

Don't retry in a loop and don't try to launch LibreOffice yourself — the server only runs inside the user's GUI session and has to be started by hand after each LibreOffice launch.

The 9 tools

ToolActions
documentcreate (doc_type), info, list, content, status
structureoutline, paragraph (n), range (start,end), count
cursorgoto_paragraph (n), goto_position (char_pos), position, context (chars)
selectionparagraph (n), range (start,end), delete, replace (text)
searchfind (query), replace (old,new), replace_all (old,new)
track_changesstatus, enable (show), disable, list, accept (index), reject (index), accept_all, reject_all
commentslist, add (text, author)
savesave (file_path optional = Save As), export (file_path, export_format)
textinsert (content), format (bold,italic,underline,font_size,font_name)

Indexing: paragraphs are 1-indexed, character positions are 0-indexed.

text(action="insert") inserts at the cursor, wherever that happens to be. Always cursor(action="goto_paragraph", n=...) first, or you'll insert somewhere random.

Writer only. document create/info/list work for calc/impress/draw; everything else returns "not supported" for them.

Track Changes / redlining

Recording changes works correctly. Accepting and rejecting them does not — see Limitations. Plan the workflow around that.

Redlining a document

document(action="info")                     # RULE 1 — confirm target
track_changes(action="status")              # note `recording` so you can restore it
track_changes(action="enable")
… make edits: search(action="replace_all", …), selection + text(action="insert"), …
track_changes(action="status")              # pending_count confirms redlines landed

Every edit made while recording is on becomes a proper tracked change — the user sees the insertion underlined and the deletion struck through, and can walk them in the normal LibreOffice review UI.

Always report the pending_count back to the user — since the changes can't be listed (broken), that count is the only programmatic proof the edits were recorded as redlines rather than applied silently.

Restore the recording state when done if you enabled it. Leaving recording on means the user's own subsequent typing gets redlined too, which surprises people.

Accepting / rejecting

You can't. accept_all, reject_all, accept and reject all return {"success": true, "…_count": 0} and change nothing. Don't call them and don't report success from them. Direct the user to Edit → Track Changes → Manage (or Accept All / Reject All in that menu).

Search and replace with recording on

search(action="replace_all") produces newtextoldtext-style output in the raw text — that's correct redline structure (new text inserted, old text marked deleted), not corruption. But it means:

  • Don't chain a second replace over the same region; you'll match text already marked for deletion and compound the mess.
  • structure(action="paragraph") returns that combined string. The visible_content field is supposed to exclude tracked deletions but is broken (identical to content), so you cannot programmatically read "what the document will look like if these changes are accepted."
  • To verify an edit, re-read with recording off, or ask the user what they see.

Saving and exporting

save(action="save")                                        # in place, keeps .docx as .docx
save(action="save",   file_path="/abs/path/file.odt")      # Save As
save(action="export", file_path="/abs/path/out.pdf", export_format="pdf")

Formats: pdf, docx, odt, html, txt. Paths must be absolute.

Prefer exporting a copy over converting the original — keep the editable source intact.

Ask before saving over a file the user hasn't asked you to save. Exporting to a new path is safe; overwriting their working document is not.

This skill vs. file-based document tools

SituationUse
Document is open in LibreOffice, user wants to watch edits happenthis skill
Needs Track Changes redlines a human will review in Writerthis skill
.docx on disk, not open, batch/scripted edita file-based .docx tool
Building a new .docx from Markdown or codea file-based .docx tool
Reading a .docx for analysisa file-based tool (no GUI needed, faster)

If a file is open in LibreOffice and edited on disk by another tool, the open copy will overwrite those edits when the user saves. Pick one path. If in doubt, ask.

Verified limitations

Established by probing a running extension (v1.0.0, 32 REST tools) — not from its README, which overstates several of these.

BrokenActual behavior
track_changes(action="list")Returns [] even with redlines present (uno_bridge.py swallows a per-redline read error and continues)
accept/reject/accept_all/reject_allSilent no-op, reports count 0 (guards on doc.rejectRedline, which doesn't exist on the Writer model)
visible_contentIdentical to content; does not strip tracked deletions
has_selection in document(action="info")Always true (the cursor counts as a selection) — useless as an "is text selected" check

Working and trustworthy: pending_count in track_changes(action="status"), all navigation and structure reads, insert/format, find/replace, comments add+list, save and export.

Also missing upstream: no comment deletion or reply, no undo/redo, no table tools.

success: true is not proof an operation did anything. Verify state actually changed before reporting success.

Setup

This skill ships as part of the libreoffice plugin, which registers the MCP server and its launcher. The plugin depends on the mcp-libre LibreOffice extension being built and installed separately — see the plugin README for the install steps.

If the tools are missing but LibreOffice is running with the extension started, the REST API in REFERENCE.md still works via curl.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.