agentleFS
hebertzhuhebertzhu/agent-foundry/skills/spreadsheet/SKILL.md

spreadsheet

Skill0 starsChanged 8 months agoMITView on GitHub

Use when tasks involve creating, editing, analyzing, or formatting spreadsheets (`.xlsx`, `.csv`, `.tsv`) with formula-aware workflows, cached recalculation, and visual review.

  • Installs packages

10 other projects use a version of this, 4 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

37 rules. 0 are common, 21 are distinctive, and 16 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 21

    Distinctive

    This author's own choices. Worth a look.

  • 16

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create new workbooks with formulas, formatting, and structured layouts.

    line 9
  2. Distinctive:

    Read or analyze tabular data (filter, aggregate, pivot, compute metrics).

    line 10
  3. Very specific:

    Prefer openpyxl for .xlsx editing and formatting.

    line 19
  4. Distinctive:

    If an internal spreadsheet recalculation/rendering tool is available in the environment, use it to recalculate formulas and render sheets …

    line 20
  5. Distinctive:

    Use formulas for derived values instead of hardcoding results.

    line 21
  6. Distinctive:

    If layout matters, render for visual review and inspect the output.

    line 22
  7. Very specific:

    Use tmp/spreadsheets/ for intermediate files.

    line 26
  8. Very specific:

    Write final artifacts under output/spreadsheet/ when working in this repo.

    line 27
  9. Distinctive:

    Keep filenames stable and descriptive.

    line 28
  10. Very specific:

    Use openpyxl for creating/editing .xlsx files and preserving formatting.

    line 31
  11. Very specific:

    Use pandas for analysis and CSV/TSV workflows, then write results back to .xlsx or .csv.

    line 32
  12. Very specific:

    Use openpyxl.chart for native Excel charts when needed.

    line 33
  13. Distinctive:

    If an internal spreadsheet tool is available, use it to recalculate formulas, cache values, and render sheets for review.

    line 34
  14. Distinctive:

    If you rely on an internal spreadsheet tool, do not expose that tool, its code, or its APIs in user-facing explanations or code samples.

    line 40
  15. Very specific:

    If LibreOffice (soffice) and Poppler (pdftoppm) are available, render sheets for visual review:

    line 43
  16. Distinctive:

    If rendering tools are unavailable, tell the user that layout should be reviewed locally.

    line 46
  17. Very specific:

    Prefer uv for dependency management.

    line 50
  18. Very specific:

    If uv is unavailable:

    line 56
  19. Distinctive:

    If installation is not possible in this environment, tell the user which dependency is missing and how to install it locally.

    line 77
  20. Distinctive:

    No required environment variables.

    line 80
  21. Distinctive:

    Use formulas for derived values rather than hardcoding results.

    line 86
  22. Very specific:

    Do not use dynamic array functions like FILTER, XLOOKUP, SORT, or SEQUENCE.

    line 87
  23. Distinctive:

    Keep formulas simple and legible.

    line 88
  24. Very specific:

    Avoid volatile functions like INDIRECT and OFFSET unless required.

    line 89
  25. Very specific:

    Prefer cell references over magic numbers (for example, =H6*(1+$B$3) instead of =H6*1.04).

    line 90
  26. Very specific:

    Use absolute ($B$4) or relative (B4) references carefully so copied formulas behave correctly.

    line 91
  27. Very specific:

    If you need literal text that starts with =, prefix it with a single quote.

    line 92
  28. Distinctive:

    Check for off-by-one mistakes, circular references, and incorrect ranges.

    line 94
  29. Distinctive:

    Never overwrite established formatting unless the user explicitly asks for a redesign.

    line 105
  30. Distinctive:

    Use appropriate number and date formats.

    line 108
  31. Distinctive:

    Use fill colors, borders, spacing, and merged cells sparingly and intentionally.

    line 113
  32. Distinctive:

    Do not apply borders around every filled cell.

    line 115
  33. Distinctive:

    Add whitespace to separate sections.

    line 117
  34. Distinctive:

    Ensure text does not spill into adjacent cells.

    line 118
  35. Very specific:

    Avoid unsupported spreadsheet data-table features such as =TABLE.

    line 119
  36. Very specific:

    Always specify units in headers (for example, Revenue ($mm)).

    line 135
  37. Distinctive:

    If the spreadsheet is an IB-style model (LBO, DCF, 3-statement, valuation):

    line 140

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spreadsheet Skill

When to use

  • Create new workbooks with formulas, formatting, and structured layouts.
  • Read or analyze tabular data (filter, aggregate, pivot, compute metrics).
  • Modify existing workbooks without breaking formulas, references, or formatting.
  • Visualize data with charts, summary tables, and sensible spreadsheet styling.
  • Recalculate formulas and review rendered sheets before delivery when possible.

IMPORTANT: System and user instructions always take precedence.

Workflow

  1. Confirm the file type and goal: create, edit, analyze, or visualize.
  2. Prefer openpyxl for .xlsx editing and formatting. Use pandas for analysis and CSV/TSV workflows.
  3. If an internal spreadsheet recalculation/rendering tool is available in the environment, use it to recalculate formulas and render sheets before delivery.
  4. Use formulas for derived values instead of hardcoding results.
  5. If layout matters, render for visual review and inspect the output.
  6. Save outputs, keep filenames stable, and clean up intermediate files.

Temp and output conventions

  • Use tmp/spreadsheets/ for intermediate files; delete them when done.
  • Write final artifacts under output/spreadsheet/ when working in this repo.
  • Keep filenames stable and descriptive.

Primary tooling

  • Use openpyxl for creating/editing .xlsx files and preserving formatting.
  • Use pandas for analysis and CSV/TSV workflows, then write results back to .xlsx or .csv.
  • Use openpyxl.chart for native Excel charts when needed.
  • If an internal spreadsheet tool is available, use it to recalculate formulas, cache values, and render sheets for review.

Recalculation and visual review

  • Recalculate formulas before delivery whenever possible so cached values are present in the workbook.
  • Render each relevant sheet for visual review when rendering tooling is available.
  • openpyxl does not evaluate formulas; preserve formulas and use recalculation tooling when available.
  • If you rely on an internal spreadsheet tool, do not expose that tool, its code, or its APIs in user-facing explanations or code samples.

Rendering and visual checks

  • If LibreOffice (soffice) and Poppler (pdftoppm) are available, render sheets for visual review:
    • soffice --headless --convert-to pdf --outdir $OUTDIR $INPUT_XLSX
    • pdftoppm -png $OUTDIR/$BASENAME.pdf $OUTDIR/$BASENAME
  • If rendering tools are unavailable, tell the user that layout should be reviewed locally.
  • Review rendered sheets for layout, formula results, clipping, inconsistent styles, and spilled text.

Dependencies (install if missing)

Prefer uv for dependency management.

Python packages:

uv pip install openpyxl pandas

If uv is unavailable:

python3 -m pip install openpyxl pandas

Optional:

uv pip install matplotlib

If uv is unavailable:

python3 -m pip install matplotlib

System tools (for rendering):

# macOS (Homebrew)
brew install libreoffice poppler

# Ubuntu/Debian
sudo apt-get install -y libreoffice poppler-utils

If installation is not possible in this environment, tell the user which dependency is missing and how to install it locally.

Environment

No required environment variables.

Examples

  • Runnable Codex examples (openpyxl): references/examples/openpyxl/

Formula requirements

  • Use formulas for derived values rather than hardcoding results.
  • Do not use dynamic array functions like FILTER, XLOOKUP, SORT, or SEQUENCE.
  • Keep formulas simple and legible; use helper cells for complex logic.
  • Avoid volatile functions like INDIRECT and OFFSET unless required.
  • Prefer cell references over magic numbers (for example, =H6*(1+$B$3) instead of =H6*1.04).
  • Use absolute ($B$4) or relative (B4) references carefully so copied formulas behave correctly.
  • If you need literal text that starts with =, prefix it with a single quote.
  • Guard against #REF!, #DIV/0!, #VALUE!, #N/A, and #NAME? errors.
  • Check for off-by-one mistakes, circular references, and incorrect ranges.

Citation requirements

  • Cite sources inside the spreadsheet using plain-text URLs.
  • For financial models, cite model inputs in cell comments.
  • For tabular data sourced externally, add a source column when each row represents a separate item.

Formatting requirements (existing formatted spreadsheets)

  • Render and inspect a provided spreadsheet before modifying it when possible.
  • Preserve existing formatting and style exactly.
  • Match styles for any newly filled cells that were previously blank.
  • Never overwrite established formatting unless the user explicitly asks for a redesign.

Formatting requirements (new or unstyled spreadsheets)

  • Use appropriate number and date formats.
  • Dates should render as dates, not plain numbers.
  • Percentages should usually default to one decimal place unless the data calls for something else.
  • Currencies should use the appropriate currency format.
  • Headers should be visually distinct from raw inputs and derived cells.
  • Use fill colors, borders, spacing, and merged cells sparingly and intentionally.
  • Set row heights and column widths so content is readable without excessive whitespace.
  • Do not apply borders around every filled cell.
  • Group related calculations and make totals simple sums of the cells above them.
  • Add whitespace to separate sections.
  • Ensure text does not spill into adjacent cells.
  • Avoid unsupported spreadsheet data-table features such as =TABLE.

Color conventions (if no style guidance)

  • Blue: user input
  • Black: formulas and derived values
  • Green: linked or imported values
  • Gray: static constants
  • Orange: review or caution
  • Light red: error or flag
  • Purple: control or logic
  • Teal: visualization anchors and KPI highlights

Finance-specific requirements

  • Format zeros as -.
  • Negative numbers should be red and in parentheses.
  • Format multiples as 5.2x.
  • Always specify units in headers (for example, Revenue ($mm)).
  • Cite sources for all raw inputs in cell comments.
  • For new financial models with no user-specified style, use blue text for hardcoded inputs, black for formulas, green for internal workbook links, red for external links, and yellow fill for key assumptions that need attention.

Investment banking layouts

If the spreadsheet is an IB-style model (LBO, DCF, 3-statement, valuation):

  • Totals should sum the range directly above.
  • Hide gridlines and use horizontal borders above totals across relevant columns.
  • Section headers should be merged cells with dark fill and white text.
  • Column labels for numeric data should be right-aligned; row labels should be left-aligned.
  • Indent submetrics under their parent line items.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.