read-xlsx

read-xlsx is a cursor rule for Cursor from senoff/xlsx-for-ai. It costs 22 tokens per session (1,062 once invoked), scanned A, original, MIT.

A set of instructions for using an xlsx-for-ai service to read, write, compare, audit, and repair Excel spreadsheet files.

In plain words
What is it for?
Use it to inspect workbook sheets, make spreadsheet changes, compare versions, audit data, and repair damaged workbooks.
Why use it?
AI coding tools often cannot open binary .xlsx files directly, so spreadsheet work otherwise requires manual conversion or inspection.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to inspect workbook sheets, make spreadsheet changes, compare versions, audit…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/senoff/xlsx-for-ai/read-xlsx
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/senoff/xlsx-for-ai

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for read-xlsx

README.md
[![agentmods](https://agentmods.dev/badge/rules/senoff/xlsx-for-ai/read-xlsx.svg)](https://agentmods.dev/rules/senoff/xlsx-for-ai/read-xlsx)
Your own site
<a href="https://agentmods.dev/rules/senoff/xlsx-for-ai/read-xlsx"><img src="https://agentmods.dev/badge/rules/senoff/xlsx-for-ai/read-xlsx.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,062 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01062
Opus 5 $0.00011 $0.00531
Sonnet 5 $0.00004 $0.00212
Haiku 4.5 $0.00002 $0.00106

Measured 7d ago against content hash cc0f5dd62a72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

read-xlsx scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor-rule-template/read-xlsx.mdc · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spreadsheets (.xlsx) — use the xfa MCP tools

The editor's Read tool cannot open binary .xlsx files. When a task involves a spreadsheet — reading, writing, diffing, auditing, or repairing — use the xfa MCP server (xlsx-for-ai). It exposes 50 xlsx_* tools backed by a hosted engine; the agent calls them directly, no shell-out, no temp files.

One-time setup

Install the client globally so the xlsx-for-ai-mcp binary is on your PATH:

npm install -g xlsx-for-ai

Then add the server to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "xfa": {
      "command": "xlsx-for-ai-mcp"
    }
  }
}

No API key, no signup — the first call auto-registers an anonymous client UUID. After Cursor reloads, the xlsx_* tools appear in the MCP tool list. Free.

How to call them

  • Pass the file path AS-IS. Every read tool takes a file_path string (absolute, or ~-prefixed). Do NOT open, read, or base64-encode the file yourself — the server handles all file I/O.
  • xlsx_read returns ALL sheets by default. Don't loop per-sheet. Pass sheet="<name>" only to narrow. format is "md" (default, best for comprehension), "json" (per-cell structured), or "sql" (CREATE + INSERT).
  • The write path is Save-As, never in-placexlsx_write and the cleaners produce a new file and never mutate the user's original cells.

Which tool

Task Tool
Unknown workbook — what's in it, is it healthy? xlsx_doctor (one-call health report — start here)
One-shot orientation (sheets × formulas × names × tables) xlsx_topology
Read the data xlsx_read
Just sheet names / dimensions xlsx_list_sheets
Column types before processing xlsx_schema
Summary stats per numeric column xlsx_describe
Create or update a workbook from a spec xlsx_write
Normalize messy data (trim, coerce, dedupe) xlsx_data_clean
Compare two versions (deterministic) xlsx_diff
Strip PII before sharing xlsx_redact
Convert format (csv/tsv/html/ods/xls…) xlsx_convert
Recompute formulas / eval an expression xlsx_eval
Filter / group-by / sort / value-counts / pivot xlsx_filter, xlsx_aggregate, xlsx_sort, xlsx_value_counts, xlsx_pivot
Inspect named ranges, tables, validations, CF, charts, images, macros, comments, hyperlinks xlsx_named_ranges, xlsx_tables, xlsx_data_validations, xlsx_conditional_formats, xlsx_charts, xlsx_images, xlsx_macros, xlsx_comments, xlsx_hyperlinks
Repair broken external refs / #REF! propagation xlsx_healer_diagnosexlsx_healer_simulatexlsx_healer_cure

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 97 lines · 22 tokens per session scan A cc0f5dd62a72

Subscribe to this mod's changes

read-xlsx is a cursor rule published in the GitHub repository senoff/xlsx-for-ai (6 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 1,062 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.