Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

minimax-xlsx — Claude Code skill: create, edit, and analyze Excel

Skill to create, read, edit, and validate Excel files (.xlsx, .xlsm, .csv, .tsv) directly in code. Use it when you need to build a financial model, add calculated columns, or fix broken formulas while preserving formatting and macros.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MiniMax-AI/skills --skill minimax-xlsx -a claude-code
Open on GitHub

What minimax-xlsx does

minimax-xlsx works with spreadsheets by editing the XML inside the file directly — this preserves formatting, charts, and macros that would break with ordinary library round-trips. The skill routes tasks: read and analyze via pandas, create new files from XML templates, edit specific cells and formulas without touching the rest.

Includes utilities: xlsx_reader.py for structural inspection, xlsx_unpack.py and xlsx_pack.py for packing and unpacking, xlsx_add_column.py to add columns while copying style and formulas from adjacent cells, xlsx_insert_row.py to insert rows and recalculate sums. Built-in colour palette for accounting-standard financial tables.

Critical rule: when editing an existing file, the skill forbids creating a new Workbook() — only XML transforms. After saving the output file, verify that source sheets and data are intact. Requires Python with XML and pandas libraries.

What it helps with

  • build a financial model in Excel with formulas and accounting colours
  • add a calculated column to an existing table without losing formatting
  • insert a row into a budget mid-way and auto-recalculate sums
  • analyze CSV or XLSX data, compute totals, and output a formatted report
  • fix broken formulas in a legacy Excel file

Example prompts for the agent

  • Create a new XLSX with a budget for three quarters, monthly amounts, and a total row with SUM formulas
  • Read sales_data.csv, calculate sum by category, output to Excel with percentage of total formatted to two decimals
  • Edit budget.xlsx: add a 'Variance %' column with formula =(actual−plan)/plan and apply 2-decimal number format

How to install minimax-xlsx

1Skills CLI (Vercel)

npx skills add MiniMax-AI/skills --skill minimax-xlsx -a claude-code

2Manually: put the files in place

~/.claude/skills/minimax-xlsx/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/minimax-xlsx/

From the same set17

The whole set →
pptx-generator MiniMax-AI A skill to read, edit, and build PowerPoint decks from scratch using PptxGenJS and XML workflows. Useful when generating presentations from code or extracting slide text. Claude Code CX Codex Cursor +1 6,000installs minimax-docx MiniMaxAI A skill for generating, filling and formatting Word documents with OpenXML SDK. Use it when the agent must deliver a .docx, not plain text. Claude Code CX Codex Cursor +1 4,500installs minimax-pdf MiniMax-AI Generates professional PDFs with visual identity: reports, resumes, portfolios. Design is derived from document type, with consistent color and typography throughout. Claude Code CX Codex Cursor +1 3,800installs fullstack-dev MiniMax-AI Guides full-stack backend architecture and frontend integration. It enforces a structured checklist from requirement gathering to verification smoke tests. Claude Code CX Codex Cursor +1 3,400installs frontend-dev MiniMax-AI Orchestrates frontend development, motion design, AI-generated media, and conversion copy. Built for landing pages, marketing sites, and dashboards. Claude Code CX Codex Cursor +1 3,200installs vision-analysis MiniMax-AI Describes images, extracts text, and reviews UI mockups using the MiniMax vision MCP tool. Handy when an agent needs to understand a screenshot or design file. Claude Code CX Codex Cursor +1 2,700installs android-native-dev MiniMax-AI Guides AI agents through native Android development: project scaffolding, Gradle setup, Jetpack Compose dependencies, and product flavors. Claude Code CX Codex Cursor +1 2,700installs shader-dev MiniMax-AI GLSL reference skill covering 36 real-time shader techniques for ShaderToy and WebGL2. Helpful for ray marching, SDF scenes, fluids, and visual effects. Claude Code CX Codex Cursor +1 2,500installs

Similar

job-post-builder official anthropics Generates hiring packets with job descriptions, structured interview guides, and offer letter templates from a brief role intake. Claude Code CX Codex Cursor +1 1,700installs rhwp-edit NomaDamas Edits HWP documents directly from the coding assistant: inserts text, runs search-and-replace, builds tables, and updates cell values. Claude Code CX Codex Cursor +1 6,600installs resume-builder reactive-resume Builds resumes as Reactive Resume JSON through conversation with your agent. Asks for missing details instead of inventing them. Claude Code CX Codex Cursor +1 560installs remove-ai-marks guillaumemeyer Strips invisible Unicode, statistical text watermarks and C2PA or EXIF metadata from text, images and office files. The agent calls a separate cleaning service. Claude Code CX Codex Cursor +1 859installs resume-formatter Paramchoudhary Guides resume formatting for ATS scanners and human recruiters. Standardises fonts, margins, section hierarchy, and bullet points. Claude Code CX Codex Cursor +1 10,300installs pptx official anthropics This skill helps create, read, and edit .pptx files and .potx templates. Use it when building a deck or extracting slide text. Claude Code Claude.ai 241,433installs pdf official anthropics This skill lets an agent read, create, and edit PDF files, including forms and scanned documents. Use it when PDF work is part of the task. Claude Code Claude.ai 216,041installs docx official anthropics This skill creates, reads, and edits Word documents and templates. Use it for reports, letters, and files that need headings, tables, or page numbers. Claude Code Claude.ai 206,304installs

Questions about minimax-xlsx

How do I install minimax-xlsx in Claude Code?

Run npx skills add MiniMax-AI/skills --skill minimax-xlsx -a claude-code in the terminal. The skill will load into ~/.claude/skills/minimax-xlsx/SKILL.md and be ready to use.

What does minimax-xlsx do?

Creates, reads, edits, and validates Excel files by editing XML directly. Preserves formatting and formulas, recalculates sums when inserting rows, adds columns while copying style from adjacent cells.

Why not just use openpyxl to edit existing files?

Full round-trip through openpyxl corrupts macros, charts, and sparklines. minimax-xlsx unpacks the XML, edits only what you request, and repacks it — everything else stays untouched.

Source text

SKILL.md · MIT
---
name: minimax-xlsx
description: "Open, create, read, analyze, edit, or validate Excel/spreadsheet files (.xlsx, .xlsm, .csv, .tsv). Use when the user asks to create, build, modify, analyze, read, validate, or format any Excel spreadsheet, financial model, pivot table, or tabular data file. Covers: creating new xlsx from scratch, reading and analyzing existing files, editing existing xlsx with zero format loss, formula recalculation and validation, and applying professional financial formatting standards. Triggers on 'spreadsheet', 'Excel', '.xlsx', '.csv', 'pivot table', 'financial model', 'formula', or any request to produce tabular data in Excel format."
license: MIT
metadata:
  version: "1.0"
  category: productivity
  sources:
    - ECMA-376 Office Open XML File Formats
    - Microsoft Open XML SDK documentation
---

# MiniMax XLSX Skill

Handle the request directly. Do NOT spawn sub-agents. Always write the output file the user requests.

## Task Routing

| Task | Method | Guide |
|------|--------|-------|
| **READ** — analyze existing data | `xlsx_reader.py` + pandas | `references/read-analyze.md` |
| **CREATE** — new xlsx from scratch | XML template | `references/create.md` + `references/format.md` |
| **EDIT** — modify existing xlsx | XML unpack→edit→pack | `references/edit.md` (+ `format.md` if styling needed) |
| **FIX** — repair broken formulas in existing xlsx | XML unpack→fix `<f>` nodes→pack | `references/fix.md` |
| **VALIDATE** — check formulas | `formula_check.py` | `references/validate.md` |

## READ — Analyze data (read `references/read-analyze.md` first)

Start with `xlsx_reader.py` for structure discovery, then pandas for custom analysis. Never modify the source file.

**Formatting rule**: When the user specifies decimal places (e.g. "2 decimal places"), apply that format to ALL numeric values — use `f'{v:.2f}'` on every number. Never output `12875` when `12875.00` is required.

**Aggregation rule**: Always compute sums/means/counts directly from the DataFrame column — e.g. `df['Revenue'].sum()`. Never re-derive column values before aggregation.

## CREATE — XML template (read `references/create.md` + `references/format.md`)

Copy `templates/minimal_xlsx/` → edit XML directly → pack with `xlsx_pack.py`. Every derived value MUST be an Excel formula (`<f>SUM(B2:B9)</f>`), never a hardcoded number. Apply font colors per `format.md`.

## EDIT — XML direct-edit (read `references/edit.md` first)

**CRITICAL — EDIT INTEGRITY RULES:**
1. **NEVER create a new `Workbook()`** for edit tasks. Always load the original file.
2. The output MUST contain the **same sheets** as the input (same names, same data).
3. Only modify the specific cells the task asks for — everything else must be untouched.
4. **After saving output.xlsx, verify it**: open with `xlsx_reader.py` or `pandas` and confirm the original sheet names and a sample of original data are present. If verification fails, you wrote the wrong file — fix it before delivering.

Never use openpyxl round-trip on existing files (corrupts VBA, pivots, sparklines). Instead: unpack → use helper scripts → repack.

**"Fill cells" / "Add formulas to existing cells" = EDIT task.** If the input file already exists and you are told to fill, update, or add formulas to specific cells, you MUST use the XML edit path. Never create a new `Workbook()`. Example — fill B3 with a cross-sheet SUM formula:
```bash
python3 SKILL_DIR/scripts/xlsx_unpack.py input.xlsx /tmp/xlsx_work/
# Find the target sheet's XML via xl/workbook.xml → xl/_rels/workbook.xml.rels
# Then use the Edit tool to add <f> inside the target <c> element:
#   <c r="B3"><f>SUM('Sales Data'!D2:D13)</f><v></v></c>
python3 SKILL_DIR/scripts/xlsx_pack.py /tmp/xlsx_work/ output.xlsx
```

**Add a column** (formulas, numfmt, styles auto-copied from adjacent column):
```bash
python3 SKILL_DIR/scripts/xlsx_unpack.py input.xlsx /tmp/xlsx_work/
python3 SKILL_DIR/scripts/xlsx_add_column.py /tmp/xlsx_work/ --col G \
    --sheet "Sheet1" --header "% of Total" \
    --formula '=F{row}/$F$10' --formula-rows 2:9 \
    --total-row 10 --total-formula '=SUM(G2:G9)' --numfmt '0.0%' \
    --border-row 10 --border-style medium
python3 SKILL_DIR/scripts/xlsx_pack.py /tmp/xlsx_work/ output.xlsx
```
The `--border-row` flag applies a top border to ALL cells in that row (not just the new column). Use it when the task requires accounting-style borders on total rows.

**Insert a row** (shifts existing rows, updates SUM formulas, fixes circular refs):
```bash
python3 SKILL_DIR/scripts/xlsx_unpack.py input.xlsx /tmp/xlsx_work/
# IMPORTANT: Find the correct --at row by searching for the label text
# in the worksheet XML, NOT by using the row number from the prompt.
# The prompt may say "row 5 (Office Rent)" but Office Rent might actually
# be at row 4. Always locate the row by its text label first.
python3 SKILL_DIR/scripts/xlsx_insert_row.py /tmp/xlsx_work/ --at 5 \
    --sheet "Budget FY2025" --text A=Utilities \
    --values B=3000 C=3000 D=3500 E=3500 \
    --formula 'F=SUM(B{row}:E{row})' --copy-style-from 4
python3 SKILL_DIR/scripts/xlsx_pack.py /tmp/xlsx_work/ output.xlsx
```
**Row lookup rule**: When the task says "after row N (Label)", always find the row by searching for "Label" in the worksheet XML (`grep -n "Label" /tmp/xlsx_work/xl/worksheets/sheet*.xml` or check sharedStrings.xml). Use the actual row number + 1 for `--at`. Do NOT call `xlsx_shift_rows.py` separately — `xlsx_insert_row.py` calls it internally.

**Apply row-wide borders** (e.g. accounting line on a TOTAL row):
After running helper scripts, apply borders to ALL cells in the target row, not just newly added cells. In `xl/styles.xml`, append a new `<border>` with the desired style, then append a new `<xf>` in `<cellXfs>` that clones each cell's existing `<xf>` but sets the new `borderId`. Apply the new style index to every `<c>` in the row via the `s` attribute:
```xml
<!-- In xl/styles.xml, append to <borders>: -->
<border>
  <left/><right/><top style="medium"/><bottom/><diagonal/>
</border>
<!-- Then append to <cellXfs> an xf clone with the new borderId for each existing style -->
```
**Key rule**: When a task says "add a border to row N", iterate over ALL cells A through the last column, not just newly added cells.

**Manual XML edit** (for anything the helper scripts don't cover):
```bash
python3 SKILL_DIR/scripts/xlsx_unpack.py input.xlsx /tmp/xlsx_work/
# ... edit XML with the Edit tool ...
python3 SKILL_DIR/scripts/xlsx_pack.py /tmp/xlsx_work/ output.xlsx
```

## FIX — Repair broken formulas (read `references/fix.md` first)

This is an EDIT task. Unpack → fix broken `<f>` nodes → pack. Preserve all original sheets and data.

## VALIDATE — Check formulas (read `references/validate.md` first)

Run `formula_check.py` for static validation. Use `libreoffice_recalc.py` for dynamic recalculation when available.

## Financial Color Standard

| Cell Role | Font Color | Hex Code |
|-----------|-----------|----------|
| Hard-coded input / assumption | Blue | `0000FF` |
| Formula / computed result | Black | `000000` |
| Cross-sheet reference formula | Green | `00B050` |

## Key Rules

1. **Formula-First**: Every calculated cell MUST use an Excel formula, not a hardcoded number
2. **CREATE → XML template**: Copy minimal template, edit XML directly, pack with `xlsx_pack.py`
3. **EDIT → XML**: Never openpyxl round-trip. Use unpack/edit/pack scripts
4. **Always produce the output file** — this is the #1 priority
5. **Validate before delivery**: `formula_check.py` exit code 0 = safe

## Utility Scripts

```bash
python3 SKILL_DIR/scripts/xlsx_reader.py input.xlsx                 # structure discovery
python3 SKILL_DIR/scripts/formula_check.py file.xlsx --json         # formula validation
python3 SKILL_DIR/scripts/formula_check.py file.xlsx --report      # standardized report
python3 SKILL_DIR/scripts/xlsx_unpack.py in.xlsx /tmp/work/         # unpack for XML editing
python3 SKILL_DIR/scripts/xlsx_pack.py /tmp/work/ out.xlsx          # repack after editing
python3 SKILL_DIR/scripts/xlsx_shift_rows.py /tmp/work/ insert 5 1  # shift rows for insertion
python3 SKILL_DIR/scripts/xlsx_add_column.py /tmp/work/ --col G ... # add column with formulas
python3 SKILL_DIR/scripts/xlsx_insert_row.py /tmp/work/ --at 6 ...  # insert row with data
```

© MiniMax-AI · MIT · MiniMax-AI/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor