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.
git clone --depth 1 https://github.com/senoff/xlsx-for-aiWrote 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.
[](https://agentmods.dev/rules/senoff/xlsx-for-ai/read-xlsx)<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>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.
| Model | Per session | Once 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 |
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.
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_pathstring (absolute, or~-prefixed). Do NOT open, read, or base64-encode the file yourself — the server handles all file I/O. xlsx_readreturns ALL sheets by default. Don't loop per-sheet. Passsheet="<name>"only to narrow.formatis"md"(default, best for comprehension),"json"(per-cell structured), or"sql"(CREATE + INSERT).- The write path is Save-As, never in-place —
xlsx_writeand 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_diagnose → xlsx_healer_simulate → xlsx_healer_cure |
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.
- 7d ago First seen · 97 lines · 22 tokens per session scan A cc0f5dd62a72
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.
Other cursor rules, from other repositories
markdown-style
Markdown is never hard-wrapped - one line per paragraph, list item, and table row; alert markers keep their own line.
agent-ready
Repository instructions for AI coding agents.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.