Agent skill

XLSX Skill

by OpenLoaf in OpenLoaf/OpenLoaf

Excel / CSV(.xlsx / .xlsm / .csv / .tsv)读/写/统计/重算/图表一体化。触发场景:阅读单元格、汇总分组、谁最高谁最低、总收入、改单元格或公式、加行列、加合计行、插入图表(bar/line/pie)、冻结首行、加筛选、条件格式、CSV ↔ XLSX 互转、新建花名册/销售表/财务模型、排查 REF!/DIV/0!

AGPL-3.0Auto-check passedDocuments & Office

Install XLSX Skill

skills CLI
$ npx skills add OpenLoaf/OpenLoaf --skill xlsx-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenLoaf/OpenLoaf xlsx-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenLoaf/OpenLoaf.git skills-src && mkdir -p .claude/skills && cp -r skills-src/apps/server/src/ai/builtin-skills/xlsx .claude/skills/xlsx-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
xlsx-skill
GitHub stars
108
Token cost
~1.5k tokens
SKILL.md length
175 words
Files
1
Skills in repo
33
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Excel / CSV(.xlsx / .xlsm / .csv / .tsv)读/写/统计/重算/图表一体化。触发场景:阅读单元格、汇总分组、谁最高谁最低、总收入、改单元格或公式、加行列、加合计行、插入图表(bar/line/pie)、冻结首行、加筛选、条件格式、CSV ↔ XLSX 互转、新建花名册/销售表/财务模型、排查 REF!/DIV/0!

  • Works in 4 steps: 读:ExcelInspect(summary) 先行 → 写:JsSandbox + exceljs → 格式互转 → …
  • Tasks that involve Excel spreadsheets
  • SKILL.md covers 工具清单, 1. 读:ExcelInspect(summary) 先行, 2. 写:JsSandbox + exceljs and 3. 格式互转, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

XLSX Skill is an agent skill from OpenLoaf/OpenLoaf. Excel / CSV(.xlsx / .xlsm / .csv / .tsv)读/写/统计/重算/图表一体化。触发场景:阅读单元格、汇总分组、谁最高谁最低、总收入、改单元格或公式、加行列、加合计行、插入图表(bar/line/pie)、冻结首行、加筛选、条件格式、CSV ↔ XLSX 互转、新建花名册/销售表/财务模型、排查 REF!/DIV/0! 公式错误、触发重算。典型说法:"这表里谁销量最高"、"Q1 总收入"、"把 B2 改成 500"、"加一行合计"、"新建花名册"、"csv 转 xlsx"、"冻结首行"、"A 列负数标红"。用户提到 .xlsx / .csv 文件或最终产出是表格都加载本技能。

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Excel spreadsheets and CSV and tabular files. It works with Microsoft Excel. The repository describes itself as: 🍞Open-source, local-first AI workspace with Agents, multi-model chat (GPT/Claude/Gemini/DeepSeek), Notion-like docs, AI image & video generation, email, calendar & terminal…. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Excel spreadsheets
  • Tasks that involve CSV and tabular files

Example prompts

  • “这表里谁销量最高”
  • “Q1 总收入”
  • “把 B2 改成 500”
  • “/xlsx-skill”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 读:ExcelInspect(summary) 先行
  2. 写:JsSandbox + exceljs
  3. 格式互转
  4. 常见陷阱

What it can do on your machine

Read from SKILL.md and the folder at commit f7eccf6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

XLSX Skill loads about 1.5k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 175 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenLoaf/OpenLoaf at commit f7eccf6, republished under its AGPL-3.0 licence (© OpenLoaf). 175 words, ~1,524 tokens.

Download SKILL.mdSave it as .claude/skills/xlsx-skill/SKILL.md (or your agent's skills folder).
name
xlsx-skill
description
Excel / CSV(.xlsx / .xlsm / .csv / .tsv)读/写/统计/重算/图表一体化。触发场景:阅读单元格、汇总分组、谁最高谁最低、总收入、改单元格或公式、加行列、加合计行、插入图表(bar/line/pie)、冻结首行、加筛选、条件格式、CSV ↔ XLSX 互转、新建花名册/销售表/财务模型、排查 #REF!/#DIV/0! 公式错误、触发重算。典型说法:"这表里谁销量最高"、"Q1 总收入"、"把 B2 改成 500"、"加一行合计"、"新建花名册"、"csv 转 xlsx"、"冻结首行"、"A 列负数标红"。用户提到 .xlsx / .csv 文件或最终产出是表格都加载本技能。

XLSX 技能

读用 ExcelInspect;写 / 改 / 创建用 JsSandbox(库首选 exceljs,比 xlsx/SheetJS 多支持样式 / 图表 / 图像);格式互转(csv ↔ xlsx 也可 DocConvert)。

工具清单

工具做什么只读
ExcelInspect读:summary / values / formulas / style / range / chart-list / defined-names是
JsSandbox所有写:create / update / insert / formula / chart / image / structure / recalc …… 用 exceljs 代码实现否
DocConvertcsv ↔ xlsx ↔ html / md否

加载(两步):

  1. LoadSkill xlsx-skill
  2. ToolSearch(query: "select:ExcelInspect,JsSandbox,DocConvert")

Read 对 .xlsx 只会出轻量摘要;分析 / 统计 / 改 / 建表一律走 ExcelInspect + JsSandbox。


1. 读:ExcelInspect(summary) 先行

ExcelInspect { action: "summary", filePath: "…" }

返回 sheets[{name, rows, cols, hasFormula, hasChart}],再按需:

  • 读数据 → ExcelInspect(action="values", sheetName, range)
  • 读公式 → action="formulas"
  • 读样式 → action="style", range
  • 查错 → action="errors" 列 #REF! / #DIV/0! / #NAME? 等

大表传 range(如 "A1:D100"),避免全表 preview 截断。


2. 写:JsSandbox + exceljs

exceljs 支持样式 / 合并 / 公式 / 图表 / 图片 / 数据验证。处理规模到几万行没问题。

2.1 Demo:创建中文销售数据表(含公式合计行 + 冻结首行 + 数字格式)
js
import ExcelJS from 'exceljs'
const wb = new ExcelJS.Workbook()
const ws = wb.addWorksheet('Q1 销售')

// 表头
ws.columns = [
  { header: '产品名称', key: 'name',  width: 20 },
  { header: '区域',     key: 'area',  width: 10 },
  { header: '销量',     key: 'qty',   width: 10 },
  { header: '单价(元)', key: 'price', width: 14, style: { numFmt: '¥#,##0.00' } },
  { header: '收入(元)', key: 'total', width: 14, style: { numFmt: '¥#,##0.00' } },
]
const rows = [
  { name: '智能音箱',  area: '华东', qty: 1240, price: 300 },
  { name: '扫地机器人', area: '华南', qty: 410,  price: 3000 },
  { name: '无线耳机',   area: '华北', qty: 860,  price: 150 },
]
rows.forEach((r, i) => {
  const excelRow = ws.addRow({ ...r, total: null })
  // F 列公式:total = qty * price
  const rowNum = excelRow.number
  ws.getCell(`E${rowNum}`).value = { formula: `C${rowNum}*D${rowNum}` }
})

// 合计行
const totalRow = ws.addRow({
  name: '合计', area: '',
  qty: { formula: `SUM(C2:C${rows.length + 1})` },
  price: null,
  total: { formula: `SUM(E2:E${rows.length + 1})` },
})
totalRow.font = { bold: true }

// 冻结首行 + 表头加粗 + 筛选
ws.views = [{ state: 'frozen', ySplit: 1 }]
ws.getRow(1).font = { bold: true }
ws.autoFilter = { from: 'A1', to: `E${rows.length + 1}` }

await wb.xlsx.writeFile('sales_q1.xlsx')
console.log('sales_q1.xlsx written')
2.2 Demo:加一列 YoY 增长率 + 条件格式(负值标红)
js
import ExcelJS from 'exceljs'
const wb = new ExcelJS.Workbook()
await wb.xlsx.readFile('sales_q1.xlsx')
const ws = wb.getWorksheet('Q1 销售')

const last = ws.rowCount
ws.getCell(`F1`).value = 'YoY 增长率'
for (let r = 2; r < last; r++) {
  ws.getCell(`F${r}`).value = { formula: `(E${r}-E${r}*0.8)/(E${r}*0.8)` }
  ws.getCell(`F${r}`).numFmt = '0.0%'
}

// 条件格式:F 列 < 0 标红(exceljs 条件格式语法)
ws.addConditionalFormatting({
  ref: `F2:F${last - 1}`,
  rules: [{
    type: 'cellIs',
    operator: 'lessThan',
    formulae: ['0'],
    style: { font: { color: { argb: 'FFFF0000' } } },
    priority: 1,
  }],
})

await wb.xlsx.writeFile('sales_q1.xlsx')
console.log('YoY + conditional format added')
2.3 Demo:嵌一张柱状图
js
import ExcelJS from 'exceljs'
const wb = new ExcelJS.Workbook()
await wb.xlsx.readFile('sales_q1.xlsx')
const ws = wb.getWorksheet('Q1 销售')

// exceljs 原生不支持 addChart —— 通常用扩展包 office-chart;
// 若需求只是"让人看个图",更实用的办法:用 sharp/chartjs-node 画 PNG 再 addImage。
// 下面演示 addImage 方案:
import fs from 'node:fs/promises'

// 假设你已经用 chartjs-node-canvas 生成了 bar.png
const imgId = wb.addImage({ buffer: await fs.readFile('bar.png'), extension: 'png' })
ws.addImage(imgId, { tl: { col: 6, row: 1 }, ext: { width: 480, height: 280 } })
await wb.xlsx.writeFile('sales_q1.xlsx')
console.log('chart image embedded')

要原生 OOXML chart 可引入 officegen 或手贴 chart XML,但复杂度高。优先用"图表渲染成 PNG → addImage",对大多数用户场景足够。

2.4 Demo:CSV → XLSX 并格式化
js
import fs from 'node:fs/promises'
import ExcelJS from 'exceljs'

const csv = await fs.readFile(process.argv[2] ?? 'in.csv', 'utf-8')
const [headerLine, ...dataLines] = csv.trim().split(/\r?\n/)
const headers = headerLine.split(',')

const wb = new ExcelJS.Workbook()
const ws = wb.addWorksheet('Sheet1')
ws.addRow(headers).font = { bold: true }
for (const line of dataLines) {
  ws.addRow(line.split(',').map(v => (isNaN(+v) || v === '' ? v : Number(v))))
}
ws.columns.forEach(c => { c.width = 18 })
ws.views = [{ state: 'frozen', ySplit: 1 }]

await wb.xlsx.writeFile('out.xlsx')
console.log('csv → xlsx done')

简单 csv/xlsx 互转也能走 DocConvert(from="csv", to="xlsx"),不用写代码。

2.5 Demo:排查公式错误
js
import ExcelJS from 'exceljs'
const wb = new ExcelJS.Workbook()
await wb.xlsx.readFile('in.xlsx')
const errs = []
for (const ws of wb.worksheets) {
  ws.eachRow((row, rn) => {
    row.eachCell((cell, cn) => {
      // exceljs 读出 cell.value 若为 { error: '#REF!' } 形式
      if (cell.value && typeof cell.value === 'object' && cell.value.error) {
        errs.push({ sheet: ws.name, cell: cell.address, error: cell.value.error, formula: cell.formula })
      }
    })
  })
}
console.log(JSON.stringify(errs, null, 2))

3. 格式互转

DocConvert(from="csv",  to="xlsx", sourcePath="…")
DocConvert(from="xlsx", to="csv",  sourcePath="…")
DocConvert(from="xlsx", to="html", sourcePath="…")

4. 常见陷阱

症状原因处理
公式保存后变字符串误用 cell.value = '=A1+B1'用 { formula: 'A1+B1' }
中文字符宽度不对默认 width 以英文字符算手动设 column.width = 20
xlsx 打开后数字变科学计数超过 11 位cell.numFmt = '0' 或 '@'(文本)
打开提示"文件损坏"公式语法错 / 循环引用先 ExcelInspect(errors) 查;或先写静态值再替公式

修脚本:JsSandbox(action="edit-and-run", scriptPath=…, edits=[…]) 只传改动点。

© OpenLoaf, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in apps/server/src/ai/builtin-skills/xlsx of OpenLoaf/OpenLoaf.

Open the folder on GitHubat commit f7eccf6

Compare with similar skills

XLSX Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

XLSX Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
XLSX Skill this skillOpenLoaf/OpenLoaf108—~1.5kAutomated safety check: PassAGPL-3.0
Data Table Managern8n-io/n8n207k—~2.3kAutomated safety check: PassCustom licence
Instrument Data To Allotropeaws-samples/amazon-bedrock-agents-healthcare-lifesciences2742 repos~2.7kAutomated safety check: PassApache-2.0
Markitshift-labs-ai/markit1.3k—~299Automated safety check: PassMIT
Convert Fileduckdb/duckdb-skills6001 repos~720Automated safety check: NotesMIT
Research Integrity Auditxuzhougeng/wisp-science1k—~2.6kAutomated safety check: PassAGPL-3.0

Similar skills

  • Official

    Load before calling data-tables or parse-file. An agent skill from n8n-io/n8n.

    207k GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Instrument Data To Allotrope

    aws-samples/amazon-bedrock-agents-healthcare-lifesciences

    Official

    Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.

    274 GitHub starsUsed in 2 repos~2.7k tokens
    Documents & OfficeAuto-check passed
  • Markit

    shift-labs-ai/markit

    Convert files and URLs to Markdown. An agent skill from shift-labs-ai/markit.

    1.3k GitHub stars~299 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Convert File

    duckdb/duckdb-skills

    Official

    Convert any data file to another format: CSV, Parquet, JSON, Excel, GeoJSON, and more.

    600 GitHub starsUsed in 1 repo~720 tokens
    Documents & OfficeAuto-check: notes
  • Research Integrity Audit

    xuzhougeng/wisp-science

    学术审查 / research-integrity screening of a manuscript's figures and reported numbers.

    1k GitHub stars~2.6k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Jmh Benchmark Compare

    eclipse-rdf4j/rdf4j

    Parse JMH result text by finding the first header line that starts with Benchmark and contains Mode and Score, build a structured table for all columns/rows, compare overlapping benchmarks across 2+…

    420 GitHub stars~804 tokensUpdated yesterday
    Documents & OfficeAuto-check passed

More from OpenLoaf/OpenLoaf

All 33 skills in this repo
  • Agent Orchestration Skill

    OpenLoaf/OpenLoaf

    Triggers when the master Agent faces a multi-step complex task and is deciding whether / how to outsource sub-tasks to built-in subagents (browser / doc-editor / data-analyst / extractor /…

    108 GitHub stars~1.9k tokensUpdated 4 mo ago
    Auto-check passed
  • Browser Ops Skill

    OpenLoaf/OpenLoaf

    Triggered when the user asks for page-level interaction with a specific webpage: login, form filling, button clicks, pagination scraping, screenshots, downloading page images, handling CAPTCHAs or…

    108 GitHub stars~1.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Canvas Ops Skill

    OpenLoaf/OpenLoaf

    Triggered when the user wants lifecycle management of OpenLoaf canvases / whiteboards: create, open, filter, duplicate, delete, rename, or change ownership.

    108 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Reads, edits, converts and reviews Word documents through three dedicated tools, covering tracked changes, comments, tables, images and format conversion.

    108 GitHub stars~1.9k tokensUpdated 4 mo ago
    Auto-check passed
  • Email Operations

    OpenLoaf/OpenLoaf

    Handles a real email account through query and mutate tools: check the inbox, read, search, reply, forward, compose and organize, with sending always confirmed first.

    108 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed
  • macOS Desktop Control

    OpenLoaf/OpenLoaf

    Guides an agent to operate native macOS apps by surveying an app first, acting through intents, menus or keystrokes, and verifying each step, in OpenLoaf Desktop only.

    108 GitHub stars~2.4k tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about XLSX Skill

What does XLSX Skill do?

Excel / CSV(.xlsx / .xlsm / .csv / .tsv)读/写/统计/重算/图表一体化。触发场景:阅读单元格、汇总分组、谁最高谁最低、总收入、改单元格或公式、加行列、加合计行、插入图表(bar/line/pie)、冻结首行、加筛选、条件格式、CSV ↔ XLSX 互转、新建花名册/销售表/财务模型、排查 REF!/DIV/0! XLSX Skill is an agent skill from OpenLoaf/OpenLoaf./DIV/0!

When should I use XLSX Skill?

XLSX Skill fits situations like: tasks that involve Excel spreadsheets; tasks that involve CSV and tabular files.

How do I install XLSX Skill in Claude Code?

Run `npx skills add OpenLoaf/OpenLoaf --skill xlsx-skill -a claude-code`. Or copy the skill folder (apps/server/src/ai/builtin-skills/xlsx in OpenLoaf/OpenLoaf) into .claude/skills/xlsx-skill in your project. Claude Code loads it when a task matches its description.

How do I install XLSX Skill in Codex?

Run `npx skills add OpenLoaf/OpenLoaf --skill xlsx-skill -a codex`. Or copy the skill folder (apps/server/src/ai/builtin-skills/xlsx in OpenLoaf/OpenLoaf) into .agents/skills/xlsx-skill in your project. Codex loads it when a task matches its description.

Can I use XLSX Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenLoaf/OpenLoaf --skill xlsx-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xlsx-skill, .gemini/skills/xlsx-skill, .github/skills/xlsx-skill and .opencode/skills/xlsx-skill in your project.

What does XLSX Skill need to run?

SKILL.md names no scripts, command-line tools or credentials: XLSX Skill is instructions for the agent only.

Does XLSX Skill access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is XLSX Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does XLSX Skill use?

XLSX Skill is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does XLSX Skill use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to XLSX Skill?

Skills that share tags, products or a category with XLSX Skill: Data Table Manager (n8n-io/n8n, 207k stars), Instrument Data To Allotrope (aws-samples/amazon-bedrock-agents-healthcare-lifesciences, 274 stars), Markit (shift-labs-ai/markit, 1.3k stars) and Convert File (duckdb/duckdb-skills, 600 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains XLSX Skill?

OpenLoaf (a GitHub organization) maintains it in OpenLoaf/OpenLoaf, which has 108 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on May 14, 2026.

Source: OpenLoaf/OpenLoaf on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.