Skip to content

Guide · Agent skill

How to use the LibreOffice Document CLI agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The LibreOffice Document CLI agent skill teaches an AI agent to use the cli-anything-libreoffice command-line tool. That tool creates and edits Writer documents, Calc spreadsheets and Impress presentations as real ODF files, and it can import existing DOCX, XLSX and PPTX files, all without opening the LibreOffice graphical app. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what to check for safely.

LibreOffice Document CLIHKUDS/CLI-Anything · Apache-2.0

Quick start

  1. 1Install Python and LibreOffice. Make sure Python 3.10 or newer and LibreOffice are installed on your system. The source lists both as prerequisites.
  2. 2Install the pip package. Run pip install cli-anything-libreoffice in your terminal to install the command-line tool the skill uses.
  3. 3Download the skill ZIP. Download the skill ZIP from this page and unzip it to get the skill folder.
  4. 4Place the skill in the right folder. Copy the unzipped skill into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project.
  5. 5Or upload it in the Claude apps. Alternatively, upload the ZIP in the Claude apps under Settings, then Capabilities, then Skills.
  6. 6Ask for a document task. Describe the document, spreadsheet or presentation you want in plain language and name the output format, such as PDF.

What this skill makes the agent do

The skill gives an agent a stateful command-line interface for document editing. The agent builds a project file, then adds headings, paragraphs, lists, tables, sheets, slides and other content step by step. It can set and read spreadsheet cells, rename or remove sheets, and manage styles.

When finished, the agent can export the document to a final format such as PDF. Session commands let it undo or redo recent operations, with up to 50 levels of history according to the source.

  • Writer: add paragraphs, headings, lists, tables and page breaks
  • Calc: add, rename and remove sheets, and set or get cell values
  • Impress: add, remove and update slides
  • Export: list presets and render the document to a file

How to install the skill

You can install the skill in one of two ways. Download the skill ZIP from this page and unzip it into your personal skills folder at ~/.claude/skills/, or into a project's .claude/skills/ folder if you want it only for that project. Alternatively, upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

The skill calls a separate command-line tool, so you also need the pip package. The source gives this install command. You must have Python 3.10 or newer and LibreOffice on the system first.

  • Install Python 3.10 or newer
  • Confirm LibreOffice is installed on your system (listed as a prerequisite in the source)
  • Install the package with pip
  • Place the unzipped skill folder in ~/.claude/skills/ or a project's .claude/skills/
pip install cli-anything-libreoffice

How to trigger the skill with natural requests

You do not need to type commands yourself. Ask the agent for a document, spreadsheet or presentation task in plain language, and name the file type or output you want. Mention the source file if you are converting one. The agent uses the skill when the request matches its description.

Good requests state the goal, the file and the output format. For example, ask for a report with headings and a table, or a spreadsheet with named sheets, or an export of an existing DOCX to a PDF.

  • Create a new report with a title, three headings and a summary table, then export it to PDF.
  • Import this DOCX file into an editable project and list its content items.
  • Make a spreadsheet with two sheets, one called Sales and one called Costs, and fill in the totals row.

Core commands the agent uses

The agent works through the cli-anything-libreoffice command. Commands are grouped by Document, Writer, Calc, Impress, Style, Export and Session. The source says every command supports a human-readable default output and a machine-readable --json flag.

You can run the CLI in interactive REPL mode by starting it with no subcommand, which gives tab-completion and history. Agents usually run one-shot commands with --json instead.

  • new: create a new document
  • open and import: open a project JSON or import an existing Office or ODF file
  • add-heading, add-paragraph, add-table: build Writer content
  • set-cell and get-cell: work with Calc values
  • render: export the document to a file
  • undo, redo and history: manage session changes
cli-anything-libreoffice --json project info -p project.json

Examples of a full working session

A typical run starts with a new project file, adds content, then exports. The first command below creates the project. The second exports it to PDF, using the --project option and the --overwrite flag as shown in the source.

To convert an existing Office file, the source recommends importing it to project JSON first, then editing it. Afterwards, check that the output file exists.

  • Create the project file with project new -o
  • Edit the content with Writer, Calc or Impress commands
  • Export with export render and an output file name
cli-anything-libreoffice project new -o myproject.json cli-anything-libreoffice --project myproject.json export render output.pdf --overwrite

Safety notes: scripts and network

The source lists this skill as running scripts. The listing states that it runs local code on the files it is given. It states that the skill does not use the network. Treat the code as running on your machine, so review it and its output before using it on important files.

Do not push confidential or sensitive documents through the tool without checking the results. Install the package from a source you trust, and keep backups of original files.

  • Runs scripts: yes, local code runs on your files
  • Uses network: no, according to the listing
  • Check the output of any converted or edited file before sharing it
  • Keep the original files untouched and work on copies

Tips for getting reliable results

The source gives specific habits for agents. Always use the --json flag so output can be parsed. Check return codes, where 0 means success and non-zero means an error. On failure, read stderr for the message. Use absolute paths for all file operations, and verify that outputs exist after an export.

The source also points to additional documentation: a README.md, a TEST.md and a HARNESS.md in the related plugin package.

  • Always pass --json for parseable output
  • Treat any non-zero return code as a failure and read stderr
  • Use absolute file paths
  • Verify the exported file exists before reporting success

What people use it for

  • Generate a structured report with headings, paragraphs and tables from data an agent receives
  • Batch-create spreadsheets with named sheets and cell values for a data pipeline
  • Convert existing DOCX, XLSX or PPTX files into editable project JSON, then modify them
  • Build slide decks with titles and content for a presentation workflow
  • Export finished Writer or Calc work to PDF as a final file

Frequently asked questions

Is the LibreOffice Document CLI agent skill free?

The listing gives its licence as Apache-2.0. The source does not state pricing, so the licence is the only licensing information this guide can confirm. Check the licence text before using it in a commercial product.

What do I need to install it?

According to the source, you need Python 3.10 or newer, LibreOffice installed on your system, and the pip package cli-anything-libreoffice. The source's overview also says it works without a LibreOffice installation, so test on your own machine to confirm what your setup needs.

How do I install the skill in Claude?

Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings, then Capabilities, then Skills. Install the pip package as well, since the skill depends on it.

Can the agent convert a DOCX file to an editable document?

Yes, the source says the CLI can import DOCX, XLSX and PPTX files and convert them into editable project JSON. Use the import command first, then edit the project. The source notes that this import step is recommended before the agent works on the file.

Does the skill need an internet connection?

The listing says the skill does not use the network. It does run local scripts on the files you give it, so review what runs before you use it on sensitive documents.

What if a command fails?

Check the return code, where 0 means success and any non-zero value means an error. Read stderr for the error message and confirm you used absolute file paths. Then run the command again with the --json flag to get structured output for debugging.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers and data users who want an AI agent to build or batch-edit ODF documents, spreadsheets and presentations in a scripted pipeline. It is a poor fit for a one-off edit you could make in a normal office app, or for sensitive files you have not reviewed, because it runs local code on them and requires installing Python tooling.

Download the skill