agentleFS
NousResearchNousResearch/hermes-agent/skills/productivity/microsoft-office/SKILL.md

microsoft-office

Skill259k starsChanged 30 days agoMITView on GitHub

Create, read, and edit Word, PowerPoint, and Excel files.

  • Deletes or force-pushes
  • Installs packages

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create, read, edit, and template Word (.docx), PowerPoint (.pptx), and Excel (.xlsx, .csv) files offline with small Python CLIs built on …

    line 17
  2. Very specific:

    Not for .doc/.ppt/.xls: convert first with soffice --headless --convert-to docx|pptx|xlsx old-file when LibreOffice is installed.

    line 36
  3. Very specific:

    Not for .odt/.odp/.ods, or WYSIWYG layout work.

    line 38
  4. Very specific:

    Run every helper with "$PY".

    line 79
  5. Very specific:

    Never pip install into the interpreter that runs Hermes or into the hermes pm environment one.

    line 82
  6. Very specific:

    Every helper lives in scripts/, is an argparse CLI with --help, prints JSON to stdout, and exits non-zero on failure.

    line 90
  7. Distinctive:

    Create, edit, or read with that format's helpers.

    line 118
  8. Distinctive:

    Verify the result as the reference's Verification section says, then give the user the exact output path.

    line 120
  9. Distinctive:

    When LibreOffice is installed, convert headlessly:

    line 125
  10. Very specific:

    Check first with command -v soffice || command -v libreoffice.

    line 132
  11. Distinctive:

    Encoding: Write specs as UTF-8; the helpers read UTF-8 explicitly.

    line 148

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Microsoft Office Skill

Create, read, edit, and template Word (.docx), PowerPoint (.pptx), and Excel (.xlsx, .csv) files offline with small Python CLIs built on python-docx, python-pptx, and openpyxl. Office itself is never needed. It does not open legacy binary formats (.doc, .ppt, .xls) and does not render pages without LibreOffice.

When to Use

Pick the format, then read its reference with skill_view before working:

FileReferenceTypical asks
.docxreferences/word.mdreports, letters, contracts, {{token}} templates, tracked changes, comments
.pptxreferences/powerpoint.mdpitch decks, brand-template decks, chart refreshes, speaker notes, slide PNGs
.xlsx, .csvreferences/excel.mdstyled multi-sheet workbooks, formulas, charts, CSV conversion, row/column restructures

Deeper notes: references/revisions-and-comments.md (Word review markup) and references/restructuring.md (Excel reference shifting).

  • Not for .doc/.ppt/.xls: convert first with soffice --headless --convert-to docx|pptx|xlsx old-file when LibreOffice is installed.
  • Not for .odt/.odp/.ods, or WYSIWYG layout work.

Prerequisites

  • Python 3.10+ with python-docx, python-pptx, and openpyxl (import names docx, pptx, openpyxl).
  • Pick the interpreter with terminal. Use python when it already imports the libraries (the Hermes Docker image ships them). Otherwise, when hermes is on PATH, let Hermes build its shared, pinned documents environment under the Hermes home: it survives container restarts, never touches the Hermes install itself, and is safe to run from several agents at once. When it is not (the terminal runs in a Docker sandbox, which has no Hermes), the block builds a venv in the sandbox home with the same pinned versions. Use this exact block in every document skill so they all share one environment:

    python -c "import docx, pptx, openpyxl" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then
      PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"
    else
      PY="$HOME/.cache/hermes-docs-venv/bin/python"
      "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null || (
        # Safe to run from several agents at once: each caller builds a private venv,
        # a symlink publishes the first finished one atomically, the others delete theirs;
        # a published build is replaced and deleted only while it still fails to import.
        mkdir -p "$HOME/.cache" && cd "$HOME/.cache" && stage="$(mktemp -d hermes-docs-venv.XXXXXX)" || exit 1
        old="$(readlink hermes-docs-venv)"  # the published build, if any (another agent may have just published it)
        python3 -m venv "$stage" &&
          "$stage/bin/python" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0 &&
          "$stage/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" &&
          if [ -z "$old" ]; then python3 -c 'import os, sys; os.symlink(*sys.argv[1:])' "$stage" hermes-docs-venv
          elif [ "$(readlink hermes-docs-venv)" = "$old" ] && ! "$old/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null; then
            ln -s "$stage" "$stage.lnk" && python3 -c 'import os, sys; os.replace(*sys.argv[1:])' "$stage.lnk" hermes-docs-venv &&
              case "$old" in hermes-docs-venv.??????) rm -rf "$old" ;; esac
          fi 2>/dev/null
        [ "$(readlink hermes-docs-venv)" = "$stage" ] || rm -rf "$stage" "$stage.lnk"
      )
    fi
    export PY
    "$PY" scripts/docx_create.py --help

    Run every helper with "$PY". In PowerShell (Hermes runs on that host, so it is on PATH): $env:PY = hermes pm environment documents --extra documents --extra documents-pdf. Never pip install into the interpreter that runs Hermes or into the hermes pm environment one; Hermes owns both.

  • Optional: LibreOffice (soffice) for PDF export, Excel recalculation, and slide rendering, plus poppler (pdftoppm or pdftocairo) for slide PNGs. The helpers that need them report what is missing and exit 0.

How to Run

Every helper lives in scripts/, is an argparse CLI with --help, prints JSON to stdout, and exits non-zero on failure. Run them with terminal from the skill directory. Author JSON specs with write_file; read results with read_file or straight from stdout.

"$PY" scripts/docx_create.py spec.json out.docx
"$PY" scripts/pptx_create.py deck.json out.pptx
"$PY" scripts/xlsx_create.py spec.json report.xlsx

Quick Reference

TaskWordPowerPointExcel
Create from JSON specdocx_create.pypptx_create.pyxlsx_create.py, csv_to_xlsx.py
Read backdocx_read.py --text/--structurepptx_read.py --outlinexlsx_read.py --sheets/--json
Editdocx_edit.pypptx_edit.pyxlsx_edit.py, xlsx_restructure.py
Fill a templatedocx_template.pypptx_from_template.py—
Review / checkdocx_revisions.py, docx_comments.py, docx_validate.pypptx_render.py (slide PNGs)xlsx_recalc.py, xlsx_to_csv.py

The per-format reference has the full flag table.

Procedure

  1. Identify the format from the file extension or the ask, and load its reference (skill_view with file_path=references/<format>.md).
  2. Set PY with the Prerequisites block once per session.
  3. Create, edit, or read with that format's helpers; pass an output path to keep the original whenever the helper supports one.
  4. Verify the result as the reference's Verification section says, then give the user the exact output path.

Converting to PDF

When LibreOffice is installed, convert headlessly:

soffice --headless --convert-to pdf --outdir out/ file.docx   # also .pptx, .xlsx
soffice --headless --convert-to csv --outdir out/ report.xlsx # first sheet only

Check first with command -v soffice || command -v libreoffice. Fonts not on the host are substituted, so render-check decks before shipping. There is no pure-Python path to PDF for any of these formats: if soffice is missing, say so rather than approximating. For other sheets use xlsx_to_csv.py --sheet NAME.

Pitfalls

  • Never unzip-and-edit the XML. These files are zip packages; raw text substitution corrupts them. Edit through the helpers (or the libraries) and use patch/write_file only for JSON inputs.
  • Text is split into runs. Word and PowerPoint fragment text at edit boundaries; the replace helpers merge equal-format runs first, but a match across differently formatted runs takes the first run's formatting.
  • Nothing computes fields or formulas. Word TOC/page fields and Excel formulas are filled in by the office app on open (or by xlsx_recalc.py).
  • Encoding. Write specs as UTF-8; the helpers read UTF-8 explicitly.
  • Format-specific traps are in each reference.

Verification

  • Re-read every output with the format's read helper and check the expected content is there and the old content is gone.
  • Word: docx_validate.py out.docx exits 0 after revision, comment, or field surgery.
  • PowerPoint: render with pptx_render.py and check each PNG with vision_analyze when the render tools exist.
  • Excel: xlsx_read.py --formulas lists written formulas; run xlsx_recalc.py when cached values matter.
  • The bundled tests are the full contract: "$PY" -m pytest tests/ -q (needs pytest in that interpreter).

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 14 mentionsApr 2026: 21 mentionsMay 2026: 19 mentionsJun 2026: 13 mentionsJul 2026: 9 mentionsAug 2026: 9 mentionsSep 2026: 8 mentionsOct 2026: 8 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NousResearch/hermes-agent repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about NousResearch/hermes-agent

The biggest 5 of 103 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 103

Talked about on GitHub, Bluesky, the web and Hacker News (103 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 31

26 more on Bluesky

On the web · 14

9 more on the web

On Hacker News · 8

3 more on Hacker News

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.