agentleFS
ImmortalqxImmortalqx/my_codex_skills/xlsx/SKILL.md

xlsx

Skill54 starsChanged 5 months agoMITView on GitHub

Spreadsheet workflow for `.xlsx`, `.xlsm`, `.csv`, and `.tsv` files. Use when Codex needs to create, inspect, repair, clean, reformat, or extend a spreadsheet; preserve workbook structure while editing an existing file; add formulas, charts, or sheets; or convert messy tabular data into a deliverable spreadsheet file.

194 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use Video Generation, VLM and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • huang-x-hSkill

    Video Generation

    Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.

    Also in 6 projects that use this

  • huang-x-hSkill

    VLM

    Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.

    Also in 6 projects that use this

  • dav-niu474Skill

    gift-evaluator

    The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.

    Also in 5 projects that use this

  • dav-niu474Skill

    Podcast Generate

    Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

    Also in 5 projects that use this

  • Liang-MHSkill

    stock_analysis

    获取 A 股、基金和港股的实时行情和技术分析数据

    Also in 5 projects that use this

  • SeifBenayedSkill

    file-reading

    Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.

    Also in 5 projects that use this

  • +1 more from huang-x-h
  • +5 more from dav-niu474

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 188 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use formulas in the workbook instead of calculating values in Python and hardcoding the result.

    line 14
  2. Distinctive:

    Keep formatting readable: sensible column widths, aligned headers, and explicit number formats.

    line 17
  3. Distinctive:

    If editing a financial model, keep assumptions visually distinct from formulas and outputs.

    line 18
  4. Very specific:

    Use openpyxl when the file already exists and you must preserve:

    line 24
  5. Distinctive:

    After editing any workbook with formulas, run:

    line 151
  6. Distinctive:

    Do not hand off the workbook until recalculation is clean or the user explicitly accepts the remaining issues.

    line 189
  7. Distinctive:

    When the workbook behaves like a model rather than a data dump:

    line 193
  8. Distinctive:

    keep assumptions in dedicated cells or sheets,

    line 195
  9. Distinctive:

    add comments for non-obvious hardcoded assumptions.

    line 199
  10. Distinctive:

    No accidental hardcoded replacements were introduced.

    line 207
  11. Very specific:

    Use openpyxl for workbook fidelity.

    line 212
  12. Very specific:

    Use pandas for tabular transformation.

    line 213
  13. Very specific:

    Use local scripts in scripts/ instead of rebuilding recalculation helpers ad hoc.

    line 214

“Common” is measured: kept by at least 6 in 10 of the 188 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 Files

Overview

Use this skill whenever the primary deliverable is a spreadsheet file or the user explicitly wants work done on spreadsheet data in place. Prefer openpyxl when workbook structure, formulas, styling, or multiple sheets must be preserved. Use pandas for analysis and reshaping, then write the final workbook carefully instead of treating the spreadsheet as a disposable export.

Non-Negotiable Rules

  • Use formulas in the workbook instead of calculating values in Python and hardcoding the result.
  • Preserve existing workbook structure unless the user asked for destructive cleanup.
  • Recalculate and verify formulas after edits with scripts/recalc.py.
  • Keep formatting readable: sensible column widths, aligned headers, and explicit number formats.
  • If editing a financial model, keep assumptions visually distinct from formulas and outputs.

Choose the Workflow

Existing workbook

Use openpyxl when the file already exists and you must preserve:

  • formulas,
  • formatting,
  • named sheets,
  • comments,
  • workbook-level structure.

New workbook or pure analysis

Use pandas for:

  • data cleaning,
  • joins,
  • aggregation,
  • reshaping.

Then write the final spreadsheet with either:

  • pandas if a simple flat export is enough, or
  • openpyxl if formulas, formatting, or multiple sheets matter.

Core Workflow

  1. Inspect the workbook or source data.
  2. Decide whether the task is analysis-only, structure-preserving edit, or workbook creation.
  3. Make the edits.
  4. Recalculate formulas with python scripts/recalc.py <excel_file>.
  5. Fix any reported workbook errors before handoff.

Reading and Analyzing Data

Pandas quick read

import pandas as pd

df = pd.read_excel("file.xlsx")
all_sheets = pd.read_excel("file.xlsx", sheet_name=None)

print(df.head())
print(df.info())
print(df.describe(include="all"))

Openpyxl structure-preserving read

from openpyxl import load_workbook

wb = load_workbook("existing.xlsx")
print(wb.sheetnames)

ws = wb["Sheet1"]
print(ws["A1"].value)

Use Formulas, Not Hardcoded Values

Wrong

total = df["Sales"].sum()
sheet["B10"] = total

Correct

sheet["B10"] = "=SUM(B2:B9)"
sheet["C5"] = "=(C4-C2)/C2"
sheet["D20"] = "=AVERAGE(D2:D19)"

This rule applies to totals, percentages, growth rates, averages, ratios, and derived metrics in general.

Creating a New Workbook

from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment

wb = Workbook()
ws = wb.active
ws.title = "Summary"

ws["A1"] = "Metric"
ws["B1"] = "Value"
ws["A2"] = "Revenue"
ws["B2"] = 125000
ws["A3"] = "Cost"
ws["B3"] = 83000
ws["A4"] = "Profit"
ws["B4"] = "=B2-B3"

header_fill = PatternFill("solid", start_color="D9EAF7")
for cell in ws[1]:
    cell.font = Font(bold=True)
    cell.fill = header_fill
    cell.alignment = Alignment(horizontal="center")

ws.column_dimensions["A"].width = 18
ws.column_dimensions["B"].width = 14

wb.save("output.xlsx")

Editing an Existing Workbook

from openpyxl import load_workbook

wb = load_workbook("existing.xlsx")
ws = wb["Sheet1"]

ws["A1"] = "New Value"
ws.insert_rows(2)
ws.delete_cols(3)

new_sheet = wb.create_sheet("NewSheet")
new_sheet["A1"] = "Data"

wb.save("modified.xlsx")

Recalculate and Verify

After editing any workbook with formulas, run:

python scripts/recalc.py output.xlsx

Optional timeout override:

python scripts/recalc.py output.xlsx 30

The script:

  • sets up LibreOffice automation when needed,
  • recalculates formulas,
  • scans all sheets for Excel errors,
  • returns JSON with counts and cell locations.

Example output

{
  "status": "success",
  "total_errors": 0,
  "total_formulas": 42
}

If errors are reported

Typical fixes:

  • #REF!: invalid references after row or column edits.
  • #DIV/0!: denominator can be zero.
  • #VALUE!: wrong data type in a formula input.
  • #NAME?: misspelled function or unsupported name.

Do not hand off the workbook until recalculation is clean or the user explicitly accepts the remaining issues.

Financial Model Conventions

When the workbook behaves like a model rather than a data dump:

  • keep assumptions in dedicated cells or sheets,
  • label units and time periods explicitly,
  • apply consistent number formats,
  • visually separate inputs, formulas, and outputs,
  • add comments for non-obvious hardcoded assumptions.

Verification Checklist

  • Workbook opens successfully.
  • Expected sheets are present.
  • Key formulas still point at the right ranges.
  • Number formats and percentages are readable.
  • No accidental hardcoded replacements were introduced.
  • scripts/recalc.py reports success or the remaining issues are documented.

Notes

  • Use openpyxl for workbook fidelity.
  • Use pandas for tabular transformation.
  • Use local scripts in scripts/ instead of rebuilding recalculation helpers ad hoc.

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.