Xlsx toolkit

From borghei/Claude-Skills · View interactive version

Xlsx toolkit is an AI agent skill from the GitHub repository borghei/Claude-Skills. Audit Microsoft Excel (.xlsx) workbooks for formula density, external references, named ranges, hidden sheets, and data validation. Use when reviewing a financial model, sharing a workbook externally, or checking for data leakage.

How to use this skill

Skill file

Xlsx Toolkit

Audit .xlsx files using the standard library only — no openpyxl required. Reads OOXML directly via zipfile + xml.etree.


Table of Contents


Keywords

xlsx, Excel, spreadsheet, workbook, financial model, formula audit, hidden sheets, external references, named ranges, data validation


Clarify First

Before running the audit, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Quick Start

python scripts/xlsx_auditor.py model.xlsx

Outputs: sheet count and names, hidden-sheet count, cell count per sheet, formula count per sheet, external link count, named range count, data validation rule count.


Core Workflows

Workflow 1: Pre-Send Workbook Audit

Goal: Catch the issues that embarrass the sender — leftover hidden sheets, broken external links, unused named ranges, formulas referencing local file paths.

Steps:

  1. Run audit
  2. Hidden sheets > 0 → confirm intentional or delete
  3. External links > 0 → verify links point to public / shared sources, not your local drive
  4. Named-range count anomalies (very high) → likely cruft from prior model versions; clean up
  5. Re-run until clean

Time Estimate: 5-10 minutes per workbook.

Workflow 2: Financial Model Review

Goal: Quantify the rough complexity of a financial model before reading cell-by-cell.

Steps:

  1. Run audit; capture per-sheet cell counts and formula counts
  2. Sheets with formula density > 70% are calculation sheets; should be well-structured
  3. Sheets with formula density 0-10% are inputs; should be obviously labeled
  4. Sheets with formula density 10-70% are mixed — easiest place for errors to hide
  5. Cross-reference with references/financial_model_audit_guide.md

Time Estimate: 30-60 minutes per model audit (audit + targeted reading).

Workflow 3: Workbook Handoff Check

Goal: Ensure a workbook handed off to another team or partner won't break on their machine.

Steps:

  1. Run audit
  2. External links → re-link to shared paths (OneDrive, SharePoint, S3) or hard-code values
  3. Custom named ranges → document if recipient is expected to extend; remove if internal
  4. Macros (xlsm) → audit shows non-.xlsx extension expected; convert if recipient cannot run macros
  5. File size > 10 MB → consider splitting or removing image / chart blobs

Time Estimate: 10-20 minutes per workbook.


Tools

xlsx_auditor.py

Reads a .xlsx file as a ZIP archive and parses OOXML directly.

python scripts/xlsx_auditor.py model.xlsx
python scripts/xlsx_auditor.py model.xlsx --json

Reports:

Limits:


Reference Guides


Templates


Best Practices


Scope & Limitations

In Scope:

Out of Scope:

Important Caveats:


Integration Points

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.