Agent Skills › win4r/MuseAI-Skills › artifact_spreadsheet

artifact_spreadsheet

GitHub

处理电子表格文件的创建、读取、编辑和清理,支持xlsx/csv等格式。通过openpyxl生成文件,使用LibreOffice验证公式,确保数据准确及结构规范。

opt/hatch/skills/artifacts/spreadsheet/SKILL.md win4r/MuseAI-Skills

Trigger Scenarios

需要创建或修改Excel/CSV文件 整理或清洗杂乱表格数据 生成包含公式的电子表格

Install

npx skills add win4r/MuseAI-Skills --skill artifact_spreadsheet -g -y
More Options

Non-standard path

npx skills add https://github.com/win4r/MuseAI-Skills/tree/main/opt/hatch/skills/artifacts/spreadsheet -g -y

Use without installing

npx skills use win4r/MuseAI-Skills@artifact_spreadsheet

指定 Agent (Claude Code)

npx skills add win4r/MuseAI-Skills --skill artifact_spreadsheet -a claude-code -g -y

安装 repo 全部 skill

npx skills add win4r/MuseAI-Skills --all -g -y

预览 repo 内 skill

npx skills add win4r/MuseAI-Skills --list

SKILL.md

Frontmatter
{
    "name": "artifact_spreadsheet",
    "metadata": {
        "includeInPrompt": false
    },
    "description": "Create, read, edit, fix, or clean spreadsheet files (.xlsx, .xlsm, .csv, .tsv). Use whenever a build task's artifact kind is spreadsheet, or the task names a spreadsheet file and wants something done to it or produced from it, including restructuring messy tabular data into a proper workbook. Covers openpyxl generation, formulas and recalculation, editing existing workbooks, and the validation gates. Not for tasks whose deliverable is a document, report, or web page that merely contains a table."
}

Spreadsheet artifacts

An xlsx is generated with the preinstalled openpyxl library from a generator script. Keep the generator under .src/: it is the editable source for future revisions, and the binary is always regenerated from it.

Task Path
Create, or edit with formulas and formatting openpyxl
Quick look at an existing sheet muse.read (converted to markdown, paged); it carries no cell coordinates, so never plan edits from it
Read a workbook's model (formulas AND their values) two load_workbook passes; see /opt/hatch/skills/artifacts/spreadsheet/references/formulas.md
Bulk or messy tabular data in or out Python csv from the standard library; pip install --break-system-packages pandas when a task genuinely needs it
Design, structure, number formats, model conventions /opt/hatch/skills/artifacts/spreadsheet/references/visual.md
Formulas, recalculation, editing existing workbooks /opt/hatch/skills/artifacts/spreadsheet/references/formulas.md

Requirements on every delivered workbook:

  • Set a non-empty workbook.properties.title and a human-readable filename. Data enters the workbook from the build's gathered content only; a value you do not have is a blank cell or a question, never an invented number.
  • Write formulas, never precomputed results: sheet["B10"] = "=SUM(B2:B9)", not the Python-computed total. The sheet must recalculate when its inputs change.
  • Follow the user's spec literally: their exact tab names, exact column headers, and the formula they spelled out. A redesign that computes something else fails, however elegant.
  • Zero formula errors at delivery: run the recalculation gate below and fix what it names.
  • Document assumptions and hardcoded numbers where the reader will see them (a cell comment or an adjacent labeled cell), citing the real source when one exists and saying plainly when the number came from the user.
  • A workbook created for someone to fill in gets a short legend naming the cells to edit and one example row of realistic values; never add an example row to a file you were asked to edit.

Scripts

Script What it does
/opt/hatch/skills/artifacts/scripts/recalc_xlsx.py Recalculates the workbook in place through headless LibreOffice and reports every formula-error cell as JSON; mandatory whenever the file contains formulas. errors_found exits 0: read the JSON, not the exit code
/opt/hatch/skills/artifacts/scripts/validate_xlsx.py Opens the workbook read-back: zip integrity, sheet parts, populated-cell counts; do not deliver a link while it fails. A csv output gets no reader check

Verification

Run recalc_xlsx.py (when formulas exist), then validate_xlsx.py, then follow /opt/hatch/skills/artifacts/testing/SKILL.md. A clean recalculation proves the formulas evaluate, not that they are right: spot-check two or three formulas pull the values you expect before building out a grid.

Version History

  • 38bbb45 Current 2026-10-18 15:46

Same Skill Collection

opt/hatch/skills/apple-healthkit/SKILL.md
opt/hatch/skills/artifacts/markdown/SKILL.md
opt/hatch/skills/artifacts/pdf/SKILL.md
opt/hatch/skills/artifacts/presentation/SKILL.md
opt/hatch/skills/artifacts/testing/SKILL.md
opt/hatch/skills/booking/SKILL.md
opt/hatch/skills/calendly/SKILL.md
opt/hatch/skills/device-data/SKILL.md
opt/hatch/skills/duffel/SKILL.md
opt/hatch/skills/facebook-cli/SKILL.md
opt/hatch/skills/facebook/SKILL.md
opt/hatch/skills/flightaware/SKILL.md
opt/hatch/skills/forget/SKILL.md
opt/hatch/skills/function-health/SKILL.md
opt/hatch/skills/generate_podcast/SKILL.md
opt/hatch/skills/gmail/SKILL.md
opt/hatch/skills/goals/SKILL.md
opt/hatch/skills/google-calendar/SKILL.md
opt/hatch/skills/google-contacts/SKILL.md
opt/hatch/skills/google-drive/SKILL.md
opt/hatch/skills/google-forms/SKILL.md
opt/hatch/skills/google-health-connect/SKILL.md
opt/hatch/skills/google-slides/SKILL.md
opt/hatch/skills/google-tasks/SKILL.md
opt/hatch/skills/granola/SKILL.md
opt/hatch/skills/healthex/SKILL.md
opt/hatch/skills/image-search/SKILL.md
opt/hatch/skills/instagram-messages/SKILL.md
opt/hatch/skills/instagram/SKILL.md
opt/hatch/skills/media-library/SKILL.md
opt/hatch/skills/messenger/SKILL.md
opt/hatch/skills/meta-threads/SKILL.md
opt/hatch/skills/muse_db/SKILL.md
opt/hatch/skills/muse-early-access/SKILL.md
opt/hatch/skills/muse-feedback/SKILL.md
opt/hatch/skills/muse-mail/SKILL.md
opt/hatch/skills/notion/SKILL.md
opt/hatch/skills/opentable/SKILL.md
opt/hatch/skills/outlook-calendar/SKILL.md
opt/hatch/skills/outlook-contacts/SKILL.md
opt/hatch/skills/outlook-mail/SKILL.md
opt/hatch/skills/peloton/SKILL.md
opt/hatch/skills/philips-hue/SKILL.md
opt/hatch/skills/places-search/SKILL.md
opt/hatch/skills/plaid/SKILL.md
opt/hatch/skills/podcast/SKILL.md
opt/hatch/skills/printify/SKILL.md
opt/hatch/skills/self-awareness/SKILL.md
opt/hatch/skills/share-ideas/SKILL.md

Metadata

Files
0
Version
38bbb45
Hash
0f782a0f
Indexed
2026-10-18 15:46

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 00:03
浙ICP备14020137号-1