agentleFS
choupiyangchoupiyang/ZAI_SKILLS/xlsx/SKILL.md

xlsx

Skill13 starsChanged 7 months agoMITView on GitHub

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file; create a new spreadsheet from scratch or from other data sources; analyze data and output results as an Excel file with charts; convert between tabular file formats (CSV/JSON/PDF → XLSX or vice versa); clean, merge, pivot, or transform tabular data. Trigger especially when the user references a spreadsheet file by name or path, says 'make a table/report/model', mentions Excel/CSV/数据分析/报表/汇总, or wants data visualization inside a spreadsheet.

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

Adopted by

Most recently taken up by

Used with

Projects with it also use context7-efficient, file-reading and 5 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.
  • hfzarslanSkill

    context7-efficient

    Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

    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 6 projects that use this

  • SeifBenayedSkill

    pdf-reading

    Use this skill when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk. Covers content inventory, text extraction, page rasterization for visual inspection, embedded image/attachment/table/form-field extraction, and choosing the right reading strategy for different document types (text-heavy, scanned, slide-decks, forms, data-heavy). Do NOT use this skill for PDF creation, form filling, merging, splitting, watermarking, or encryption — use the pdf skill instead.

    Also in 6 projects that use this

  • unicorn-pluginsSkill

    product-self-knowledge

    Anthropic 제품 지식 — Claude Code, Claude API, Claude.ai 관련 정확한 정보 제공

    Also in 7 projects that use this

  • AnthropicSkill

    pptx

    Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

    Also in 155 projects that use this

  • JetBrainsSkill

    doc-coauthoring

    Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

    Also in 71 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 189 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before touching any code, confirm the user actually needs a spreadsheet:

    line 19
  2. Distinctive:

    If confirmed xlsx → proceed to Scene Router below.

    line 27
  3. Distinctive:

    When multiple intents detected, load all matching files and execute in logical order: data preparation → analysis → visualization → styling …

    line 50
  4. Distinctive:

    Every derived value SHOULD be an Excel formula so the spreadsheet stays dynamic.

    line 127
  5. Very specific:

    No dynamic array functions (FILTER, UNIQUE, XLOOKUP, SORT, SORTBY, XMATCH, SEQUENCE, LET, LAMBDA, RANDARRAY).

    line 135
  6. Very specific:

    When editing existing files: study and exactly match format, style, conventions.

    line 138
  7. Distinctive:

    When user instructions conflict with the actual data patterns in the existing file:

    line 144
  8. Distinctive:

    Second priority: follow user instructions literally

    line 146
  9. Distinctive:

    Always flag the conflict to the user

    line 147
  10. Distinctive:

    All CLI tools live relative to this skill's directory.

    line 157
  11. Distinctive:

    Every deliverable must pass the full integrity pipeline before delivery.

    line 199

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

XLSX — Scene-Driven Spreadsheet Workbench

Quick Setup

bash "$XLSX_SKILL_DIR/setup.sh"    # Interactive environment check + install

Pre-Flight: Intent Gate

Before touching any code, confirm the user actually needs a spreadsheet:

  • Report / analysis summary (述职, 调研报告) → docx skill
  • Presentation (汇报, 演示, pitch deck) → pptx skill
  • Formal print document (合同, 证书, "PDF") → pdf skill
  • Charts only, no data table needed → charts skill
  • User explicitly says a format → respect it

If confirmed xlsx → proceed to Scene Router below.

Request Decomposition (do this every time):

  • Explicit needs: sheets, columns, formulas, metrics the user stated
  • Implicit needs: business context, downstream use (filter? sort? input?)
  • Multi-part requests: generate ALL parts — never silently drop a component

Multi-Intent Detection — some requests combine multiple scenes:

"Create a financial model with charts and export a PDF summary"
 → scenes/finance.md + engines/chart.md + (hand off PDF to pdf skill)

"Analyze this CSV, build a dashboard, and make it look professional"
 → scenes/analyze.md + engines/chart.md + engines/design.md

"Edit this budget file, add a new quarter column, and create a pivot"
 → scenes/edit.md + quality/pipeline.md (pivot command)

"Convert these 5 CSVs into one xlsx with a summary sheet"
 → scenes/convert.md + scenes/create.md (for summary)

When multiple intents detected, load all matching files and execute in logical order: data preparation → analysis → visualization → styling → QA.


Complexity Gate (evaluate BEFORE Scene Router)

Determine task complexity to control file loading depth:

User Request
│
├─ LITE (single aggregation, simple chart, direct conversion, QA-only)
│  → Load: SKILL.md + ONE scene file (lean version)
│  → Skip: engine files (use built-in knowledge for basic styles)
│  → QA: audit + validate only
│  → Target: ≤ 400 lines total context
│
└─ FULL (multi-dimensional analysis, financial model, dashboard, KANO, etc.)
   → Load: SKILL.md + scene + engines (chart.md / design.md) as needed
   → For code patterns: load recipes/templates files ON DEMAND (not upfront)
   → QA: full pipeline (recalc → audit → scan → chart-verify → validate)
   → Target: load recipes/templates only when stuck on implementation

LITE triggers: single groupby, one chart, format conversion, inspect/audit/validate, simple pivot FULL triggers: correlation matrix, multi-sheet dashboard, statistical analysis, financial model, KANO/funnel/cohort


Scene Router

User Request
│
├─ Involves an existing file?
│  ├─ Yes → Modify content or structure?
│  │         ├─ Yes ──────────────────── → scenes/edit.md
│  │         └─ No (read/analyze only) ─ → scenes/analyze.md
│  │
│  └─ Format conversion (CSV↔XLSX, JSON, PDF tables)?
│     └─ Yes ────────────────────────── → scenes/convert.md
│
├─ Create from scratch?
│  ├─ Financial / budget / forecast / cost tracking?
│  │  ├─ Complex (DCF / LBO / three-statement linkage (三表联动) / sensitivity / IB model)?
│  │  │  └─ Yes ─────────────────────── → scenes/finance.md
│  │  └─ Simple (budget table (预算表) / expense report (费用报表) / revenue vs cost (收支对比) / project cost (项目成本) / personal finance (个人记账))?
│  │     └─ Yes ─────────────────────── → scenes/finance_lite.md
│  └─ General table / report / template
│     └─ ──────────────────────────── → scenes/create.md
│
├─ Batch processing / large files / protection / validation?
│  └─ Yes ───────────────────────────── → scenes/advanced.md
│
├─ VBA / macros / automation inside Excel?
│  └─ Yes ───────────────────────────── → scenes/vba.md + engines/vba-templates.md
│
├─ Needs charts or data visualization?
│  └─ Yes ───────────── append ────────→ engines/chart.md
│
└─ Needs styling / design system?
   └─ Yes ───────────── append ────────→ engines/design.md

Mixed requests: load all matching files. Engine files always append to a scene.

Finance detection:

  • finance.md (complex): DCF, LBO, P&L, 利润表, 资产负债, valuation, 估值, IRR, 三表联动, sensitivity, scenario
  • finance_lite.md (simple): 预算, budget, 费用, expense, 收支, 记账, 项目成本, cost tracking, 报销, ROI

VBA detection: 宏, macro, VBA, 自动化, automation, .xlsm, 按钮, button, auto-run, 批量处理脚本


Design Principles

1. Live Formula Guarantee

Every derived value SHOULD be an Excel formula so the spreadsheet stays dynamic.

Exception — Programmatic Verification: When the output file will be verified by Python (not opened in Excel), TOTAL/SUM rows should write computed values instead of formulas, because openpyxl cannot evaluate formulas and data_only=True returns None for newly-written formulas. Optionally add the formula as a cell comment for reference.

2. Zero Error Tolerance

Deliverables must have zero formula errors. All divisions wrapped with IFERROR or IF(denom=0,...). Absolute references ($C$42) for shared denominators.

3. Compatibility First

No dynamic array functions (FILTER, UNIQUE, XLOOKUP, SORT, SORTBY, XMATCH, SEQUENCE, LET, LAMBDA, RANDARRAY). No implicit array formulas — use SUMPRODUCT alternatives.

4. Preserve & Match

When editing existing files: study and exactly match format, style, conventions. Existing patterns always override defaults. Text starting with = must be prefixed with '.

5. Language Mirror

Output language (sheet names, headers, labels) matches user's input language.

6. Data Consistency Over Instructions

When user instructions conflict with the actual data patterns in the existing file:

  • First priority: match the existing data pattern (e.g., if existing data uses 0 for empty, don't switch to -)
  • Second priority: follow user instructions literally
  • Always flag the conflict to the user

Example: User says "show hyphen for zero" but existing data and answer key use numeric 0 → Use 0 and notify user of the discrepancy.


Toolchain

Script Path Setup (MANDATORY before any script call)

All CLI tools live relative to this skill's directory. Before calling any script, resolve the absolute path once:

XLSX_SKILL_DIR="<skill_directory>"   # ← parent directory of this SKILL.md

# Then all commands use absolute paths:
python3 "$XLSX_SKILL_DIR/xlsx.py" inspect data.xlsx --pretty
python3 "$XLSX_SKILL_DIR/xlsx.py" pivot data.xlsx output.xlsx --rows Region --values Revenue
python3 "$XLSX_SKILL_DIR/xlsx.py" validate output.xlsx

For Python imports (when generation code needs to import skill modules):

import sys, os
XLSX_SKILL_DIR = "<skill_directory>"
for sub in [XLSX_SKILL_DIR, os.path.join(XLSX_SKILL_DIR, "templates")]:
    if sub not in sys.path:
        sys.path.insert(0, sub)

⚠️ NEVER use bare python3 xlsx.py ... — it only works if cwd happens to be the skill directory. Always use the absolute path.

Tool Reference

ToolUse
openpyxlFormulas, formatting, charts, cell-level control
pandasData analysis, bulk operations, CSV/TSV
load_workbook(read_only=True)Large file reads
Workbook(write_only=True)Large file writes
templates/base.pyDesign tokens, font resolution, style factories, utilities (single source of truth)
xlsx.pyQA commands (see quality/pipeline.md)

Workbook metadata: wb.properties.creator = "Z.ai"

All code must import from templates/base.py for colors, fonts, and style helpers. Never hardcode hex values or font names.


Quality Gate

Every deliverable must pass the full integrity pipeline before delivery.

→ Load quality/pipeline.md for the role-based integrity workflow.

Quick reference:

Blueprint → Build & Self-check (per-sheet) → Inspect → Pivot (if needed) → Release

Capability Matrix

CapabilitySupportedScene/Engine
Create from scratch✅scenes/create
Edit existing file✅scenes/edit
Data analysis & EDA✅scenes/analyze
Format conversion✅scenes/convert
Financial models (DCF/LBO/P&L)✅scenes/finance
Simple budgets & expenses✅scenes/finance_lite
VBA macros & automation✅scenes/vba + engines/vba-templates
Batch processing✅scenes/advanced
Embedded charts✅engines/chart
Smart chart recommendation✅engines/chart
Design system & styling✅engines/design
PivotTable creation✅quality/pipeline (pivot cmd)
Formula validation✅quality/pipeline
Structural validation✅quality/pipeline
Data provenance tracking✅scenes/analyze
Large file handling✅scenes/advanced
Data protection & locking✅scenes/advanced

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.