Skip to content
SkillScript-led2,244 tokens in use

xlsx

Anthropic's spreadsheet skill: create and edit .xlsx files with openpyxl and pandas, keep live formulas, and recalculate them in LibreOffice until no errors remain.

197,764 stars on the repositoryanthropics/skills · skills/xlsx
/plugin install document-skills@anthropic-agent-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing xlsx costs

206tokens idle
2,244tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Script-led

Script-ledMixedModel-led

Most of this skill is scripts, so it behaves much the same whichever model runs it.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: scripts/office/helpers/__init__.py, scripts/office/helpers/pptx_chart.py, scripts/office/helpers/pptx_slide.py, scripts/office/helpers/pptx_theme.py, scripts/office/soffice.py, scripts/office/validate.py, scripts/office/validators/__init__.py, scripts/office/validators/base.py, scripts/office/validators/docx.py, scripts/office/validators/pptx.py, scripts/office/validators/redlining.py, scripts/recalc.py.

Touches

shelldetectedwrites filesdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts and code blocks. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter15/15
  • Structure11/25
  • Examples9/15
  • Output15/15
  • Size13/15
  • Resources2/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 37
  • Writes files−8

    does this on the machine, and the frontmatter does not say so

    scripts/office/helpers/__init__.py, line 114

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity72
  • Maintenance32
  • Community68
  • Maturity36
  • Momentum40

The xlsx skill is the spreadsheet guide from Anthropic’s public skills repository, one of the document skills that power Claude’s file creation features. It triggers whenever a spreadsheet file is the main input or output: opening, editing or fixing an .xlsx, .xlsm, .xltx, .csv or .tsv file, building a new workbook, converting between tabular formats, or cleaning messy tabular data into a proper sheet. It picks the tool by task: openpyxl to create or edit with formulas and formatting, pandas for bulk data, markitdown for a quick look, and two openpyxl loads to read both formulas and values.

The guide sets rules for every output: a professional font, formulas instead of hardcoded results, the user’s spec followed literally, every assumption documented, and an existing file’s conventions matched exactly. Its centre is a mandatory recalculation step: a bundled script has LibreOffice compute the formulas on a copy, writes only the values back, and reports each formula error by cell, so the agent fixes them before shipping. It adds advice on which Excel functions survive that check, a list of openpyxl gotchas, and color, number-format and structure conventions for financial models.

What You Get

  • A SKILL.md guide with a task table: openpyxl for formulas and formatting, pandas for bulk data, markitdown for a quick look, and two loads for reading formulas and values together
  • Requirements for every output: professional fonts, zero formula errors, formulas instead of hardcoded results, literal adherence to the user’s spec and documented assumptions
  • recalc.py, which recalculates a workbook through LibreOffice and returns JSON with the status, formula count, errors by type and cell, and the formulas it could not compute
  • Guidance on functions: prefer Excel 2007-era ones, prefix six newer ones with _xlfn., and avoid XLOOKUP, FILTER, UNIQUE and other dynamic-array functions
  • A list of openpyxl gotchas covering data_only loads, merged cells, macros in .xlsm, quoted sheet names, dropped shapes and slicers, rich text, number formats and chart settings
  • Financial model conventions for input and formula colors, currency, percentage and multiple formats, and assumption cells referenced by formulas

Common Use Cases

  • Building a financial model or budget whose totals and projections stay live formulas
  • Editing an existing workbook’s input cells without disturbing its formulas or formatting
  • Cleaning a CSV or TSV with malformed rows and misplaced headers into a proper spreadsheet
  • Adding columns, formulas, formatting or charts to a spreadsheet a user uploaded
  • Checking a workbook for #REF!, #DIV/0!, #NAME? and other formula errors before handing it over

What Makes It Unique

Like the docx and pptx skills from the same repository, it is Anthropic’s own reference for a complex document skill used in production, but where those render their output to images to check it, this one checks a spreadsheet by computing it: every formula is recalculated in LibreOffice and errors are reported by cell. It insists on formulas over Python-computed results so the sheet keeps working when its inputs change, and it is candid about the limits of its own check: a clean recalc proves formulas evaluate, not that they are right, and functions LibreOffice lacks are listed separately rather than counted as passing.

Under The Hood

The guide has the agent run shell commands: it writes and runs its own Python scripts with openpyxl and pandas, which it expects to be preinstalled and installs with pip only if an import fails, calls the markitdown command for a quick read, and runs python scripts/recalc.py on the output. recalc.py copies the workbook into a temporary folder, creates a throwaway LibreOffice profile, writes a small LibreOffice Basic macro into it that recalculates and saves, and runs soffice headless on the copy. It then reads the computed values out of the copy and splices only those into the original’s sheet XML, writing a new file beside it and swapping it in, so the workbook it was given is rewritten in place. It scans the result for Excel error values and flags formulas that call functions LibreOffice lacks or link to another workbook. soffice.py runs LibreOffice with a headless display setting; where the sandbox blocks Unix sockets it writes a small C shim to the temp folder, compiles it with gcc and loads it with LD_PRELOAD, and before rendering to PDF or images it cuts links to outside files from a copy. The shared office folder also carries validate.py, its validators and helpers, including a rezip function that writes a packed document beside its target and swaps it in; this skill’s guide does not use them, and validate.py performs no schema validation for xlsx files.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers