agentleFS
AlpaZZAlpaZZ/office-agent-skills/skills/xlsx/SKILL.md

xlsx

Skill1 starsChanged 38 days agoMITView on GitHub

Comprehensive Excel spreadsheet (.xlsx/.xltx/.xlsm) engine. Covers: (1) On-brand corporate workbook generation & template extraction via the Brand Engine (extract, comprehend, verify, generate from .xlsx/.xltx templates and GridDocuments), (2) Programmatic spreadsheet creation and editing via openpyxl, (3) Mandatory headless formula calculation & zero-error verification via scripts/recalc.py, (4) Bulk data processing via pandas, and (5) Financial modeling conventions. Trigger on any mention of spreadsheets, Excel, workbooks, .xlsx, .xlsm, .xltx, financial models, sheet formulas, or Excel template brand enforcement.

194 other projects use a version of this, 21 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

We split this skill into the rules it gives an agent

10 rules. 0 are common, 1 is distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 188 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this pathway when the user provides or references a company workbook template (.xlsx / .xltx) or asks to "fill this template", "use our …

    line 23
  2. Very specific:

    Run preflight (python scripts/cli.py doctor) before extraction or generation to verify system readiness.

    line 40
  3. Very specific:

    Author role-first, not style-first: Do not put font names, pt sizes, hex colors, or raw style names in a GridDocument.

    line 43
  4. Very specific:

    Zero formula errors: Never ship while recalc.py reports errors_found.

    line 51
  5. Very specific:

    Use formulas, never hardcoded results: Write sheet['B10'] = '=SUM(B2:B9)', not the Python-computed total.

    line 52
  6. Distinctive:

    Editing an existing file: match its conventions exactly: Leave every existing formula untouched.

    line 56
  7. Very specific:

    Merged cells: Write the top-left anchor only.

    line 87
  8. Very specific:

    .xlsm macros: Always pass keep_vba=True to load_workbook.

    line 88
  9. Very specific:

    Sheet names with spaces: Must be quoted in formulas: ='Assumptions Inputs'!$B$5.

    line 89
  10. Very specific:

    Structure: Every assumption in its own labeled cell (=B5*(1+$B$6)).

    line 97

“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

Unified XLSX Creation, Editing, Brand & Analysis Suite

Choose your approach based on task requirements:

Task / DomainEngine / ApproachWhen to Choose
On-Brand Corporate Workbookscripts/brandkit/ (scripts/cli.py)Extracting reusable Brand Profiles from company .xlsx/.xltx templates and generating on-brand workbooks fail-closed from GridDocuments.
Create or Edit Modelsopenpyxl + scripts/recalc.pyBuilding dynamic financial models, budgets, and automated workbooks with live Excel formulas and formatting.
Formula Recalculationscripts/recalc.py output.xlsxMandatory verification computing formula caches via headless LibreOffice and ensuring zero #NAME? or #VALUE! errors.
Bulk Data In / Outpandas (read_excel, to_excel)Importing/exporting large datasets or performing tabular transformations.
Quick Sheet Inspectionmarkitdown file.xlsxMarkdown inspection of sheet tabs and high-level contents.

1. On-Brand Corporate Workbook Governance (Brand Engine)

Use this pathway when the user provides or references a company workbook template (.xlsx / .xltx) or asks to "fill this template", "use our workbook brand kit", or generate an on-brand spreadsheet from structured data.

The Seven Verbs

The engine implements three deterministic core verbs plus four model-assisted learning verbs:

VerbInputOutputCLI Command
extractA company .xlsx or .xltx templateA reusable Brand Profile (brand-kit/<name>/)python scripts/cli.py extract --name <brand> --template <template.xlsx>
comprehend (optional)Saved profile + model-authored comprehension.jsonProfile with validated, cached comprehension blockpython scripts/cli.py comprehend --name <brand> --input comprehension.json
verifySaved Brand ProfileQA findings + deterministic verdictpython scripts/cli.py verify --name <brand>
generateData (GridDocument) + profileNew on-brand .xlsxpython scripts/cli.py generate --name <brand> --input grid.json -o out.xlsx
learnProfile's cross-run historyRecurring findings distilled to shell-frozen overridespython scripts/cli.py learn --name <brand> --accept
propose-overridesResidual issues + proposalShell-backed corrections fail-closedpython scripts/cli.py propose-overrides --name <brand> --input overrides.json --accept
refineUser feedback deltaComprehension overlaid for future generationspython scripts/cli.py refine --name <brand> --input refinement.json --accept

Hard Rules for Brand Workbooks

  1. scripts/cli.py (or scripts/brand_cli.py) is the launcher. It automatically resolves the engine root.
  2. Run preflight (python scripts/cli.py doctor) before extraction or generation to verify system readiness.
  3. Extract opens the template read-only and saves brand-kit/<name>/template/shell.xlsx byte-for-byte.
  4. Generate opens the saved shell and resolves every named cell/region through profile.json.
  5. Author role-first, not style-first: Do not put font names, pt sizes, hex colors, or raw style names in a GridDocument.
  6. See references/comprehension.md and references/visual-audit.md for full details.

2. Requirements for Every Output Workbook

  • Professional font (Arial, Times New Roman, Calibri) throughout, unless specified otherwise.
  • Zero formula errors. Never ship while recalc.py reports errors_found.
  • Use formulas, never hardcoded results. Write sheet['B10'] = '=SUM(B2:B9)', not the Python-computed total.
  • Follow the user's spec literally. Exact tab names, exact column headers, and the formula they spelled out.
  • Document every assumption and hardcoded number in a cell comment or adjacent cell.
  • A workbook created for someone to fill in needs a short legend naming which cells to edit, and one example row.
  • Editing an existing file: match its conventions exactly. Leave every existing formula untouched.

3. Mandatory Recalculation (recalc.py)

openpyxl writes formulas as strings with no cached values. Until you recalculate, every formula cell reads back as None to external readers.

python scripts/recalc.py output.xlsx [timeout_seconds]   # default 30

LibreOffice computes every formula, the file is rewritten in place, and you get JSON: status (success | errors_found), total_formulas, total_errors, and an error_summary. Fix what it names and run again.


4. Choosing Formulas That Survive Verification

LibreOffice implements fewer functions than Excel. Functions it cannot evaluate become literal #NAME?:

  • Prefer Excel-2007-era functions: SUMIFS, INDEX, MATCH, IFERROR, SUMPRODUCT (require no prefix).
  • Post-2007 functions require _xlfn. prefix: _xlfn.TEXTJOIN, _xlfn.CONCAT, _xlfn.IFS, _xlfn.SWITCH, _xlfn.MAXIFS, _xlfn.MINIFS. Written bare, each yields #NAME?.
  • Never use XLOOKUP, XMATCH, SORT, FILTER, UNIQUE, or SEQUENCE: The headless LibreOffice runtime cannot evaluate them properly. Use INDEX/MATCH instead.

5. openpyxl Gotchas

  • Reading a model takes two loads: data_only=True yields cached values (formulas stripped); default yields formula strings with no values.
  • data_only=True is destructive on save: Saving after data_only=True permanently replaces formulas with static numbers.
  • Merged cells: Write the top-left anchor only. Sibling cells are read-only MergedCell.
  • .xlsm macros: Always pass keep_vba=True to load_workbook.
  • Sheet names with spaces: Must be quoted in formulas: ='Assumptions Inputs'!$B$5.

6. Financial Model Conventions

  • Colors: Blue text (0,0,255) for inputs · black for formulas · green (0,128,0) for cross-sheet links · red (255,0,0) for external file links · yellow fill (255,255,0) for user inputs.
  • Numbers: Currency $#,##0, unit named in header (Revenue ($mm)) · zeros as - ($#,##0;($#,##0);-) · negatives in parentheses · percentages 0.0% stored as fractions (0.15 renders 15.0%).
  • Structure: Every assumption in its own labeled cell (=B5*(1+$B$6)). Guard denominators against division by zero (IF(B6=0, 0, B5/B6)).

Dependencies

openpyxl · pandas · markitdown · lxml · Pillow · LibreOffice (soffice, auto-configured via scripts/office/soffice.py)

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.