agent-xlsx
A command-line tool for AI agents to read and write xlsx files.
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: agent-xlsx. It is used for: A command-line tool for AI agents to read and write xlsx files. Full Skill content: https://321skill.com/skills/agent-xlsx-chrisarderne/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the inefficiency and high token consumption when AI agents read and edit Excel files. In practical development, AI agents often need to process reports or data in .xlsx format. However, directly using Python libraries (e.g., openpyxl) requires memorizing complex APIs, and the output format is not conducive to AI parsing, leading to token waste and increased error rates.
Usage is simple: you just need to install the pre-compiled binary via a single curl command. Afterwards, use natural language instructions to have the AI agent execute operations like agent-xlsx create, agent-xlsx read, and agent-xlsx edit. All input and output are in JSON format. Cell addresses uniformly use A1 range notation, and error messages are also output to stderr as structured JSON, facilitating easy parsing and handling by the AI agent.
It is ideal for developers and teams needing AI agents to automate Excel data processing, especially in scenarios involving frequent spreadsheet operations within CI/CD pipelines, data analysis workflows, or agent workflows. Data analysts, agent developers, and operations engineers can use it to reduce the burden of manual coding.
It is recommended to uniformly integrate this tool into AI agent automation workflows for tasks like batch report generation, modifying spreadsheet data, and extracting key information. Note that it is primarily focused on data read/write operations and does not support complex formatting (such as merged cells, charts, conditional formatting), making it suitable for structured tabular data scenarios.
Key Features
Compared to directly using the Python openpyxl library, agent-xlsx provides a unified CLI interface with JSON input/output, significantly reducing AI agent token consumption and offering structured error messages. Unlike tools like xlsxwriter that are write-only, it supports both reading, writing, and editing, specifically designed for AI agent interaction patterns.
Limitations
Currently, only pre-compiled binaries are provided for Apple Silicon macOS, x86_64 Linux, and x86_64 Windows. Platforms like ARM Linux are not supported. It depends on Rust for compilation, but pre-compiled packages are provided, eliminating the need for a local Rust installation.
FAQ
How do I install agent-xlsx?
Run `curl -fsSL https://raw.githubusercontent.com/carderne/agent-xlsx/main/install.sh | bash -s -- ~/.local/bin` to install the binary to the specified directory (which must be in your PATH).
What cell ranges are supported for reading?
It supports A1 range notation, e.g., A1:C3, Sheet1!A1:B2, etc. All operations output data in JSON format.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/agent-xlsx-chrisarderne/raw/index.md to read the original Skill definition (Markdown format) for agent-xlsx, and install it according to the instructions.
Raw Markdown URL for AI: /skills/agent-xlsx-chrisarderne/raw/index.md