Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问clear审计通过

document-xlsxdocument XLSX 命令行

Agent Skill

document-xlsx 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,050

周安装

288

GitHub Stars

59

下载量

2,281
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:document-xlsx(document XLSX 命令行)
来源仓库:https://github.com/vasilyu1983/ai-agents-public
仓库路径:skills/document-xlsx
安装命令:
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill document-xlsx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill document-xlsx

简介

程序化操作 Excel 表格数据的专用工具。

  • 遵循软件化思维确保数据完整性可追溯。
  • 支持财务建模与报表自动化生成场景。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 需启用 Accessibility Checker 满足合规要求。
  • document-xlsx 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Document XLSX Skill — Quick Reference

This skill enables creation, editing, and analysis of Excel spreadsheets programmatically. Claude should apply these patterns when users need to generate data reports, financial models, automate Excel workflows, or process spreadsheet data.

Modern Best Practices (Jan 2026):

  • Treat spreadsheets as software: clear inputs/outputs, auditability, and versioning.
  • Protect data integrity: control totals, validation, and traceability to sources.
  • Accessibility: labels, contrast, structure; use Excel's Accessibility Checker; meet procurement/regulatory requirements when distributing externally.
  • If distributing in the EU or regulated contexts, follow applicable accessibility requirements (often aligned with EN 301 549 / WCAG).
  • Ship with a review loop and an owner (avoid "mystery models").
  • Security: treat untrusted input/workbooks as hostile (formula injection, external links, hidden content, macros).

Quick Reference

TaskTool/LibraryLanguageWhen to Use
Create XLSXExcelJSNode.jsReports, data exports
Create XLSXopenpyxlPythonRead/write, modify existing files
Create XLSXXlsxWriterPythonWrite-only, rich formatting, charts
Data analysispandas + openpyxlPythonDataFrame to Excel with formatting
Read XLSXxlsx (SheetJS)Node.jsParse spreadsheets
Chartsopenpyxl/XlsxWriterPythonEmbedded visualizations
StylingExcelJS/openpyxlBothConditional formatting
AutomationxlwingsPythonExcel installed, interactive workflows

Guardrails and Caveats

  • Formula calculation: libraries write formulas; Excel computes results when opened. If you need computed values server-side, calculate in code and write values (or use a dedicated formula engine).
  • Pivot tables: programmatic creation is limited. Prefer pandas summaries (pivot tables as data) or Excel automation (xlwings/Office Scripts/VBA) if you truly need native pivots.
  • Macros: openpyxl can preserve existing VBA (keep_vba=True) but does not author macros; never generate or execute macros from untrusted input.
  • Spreadsheet injection: never put untrusted strings into formula fields; write them as text values and validate/sanitize user-provided data used in exports.

Core Operations

Create Spreadsheet (Node.js - exceljs)

import ExcelJS from 'exceljs';

const workbook = new ExcelJS.Workbook();
const sheet = workbook.addWorksheet('Sales Report');

// Headers with styling
sheet.columns = [
  { header: 'Product', key: 'product', width: 20 },
  { header: 'Quantity', key: 'qty', width: 12 },
  { header: 'Price', key: 'price', width: 12 },
  { header: 'Total', key: 'total', width: 15 },
];

// Style header row
sheet.getRow(1).font = { bold: true };
sheet.getRow(1).fill = {
  type: 'pattern',
  pattern: 'solid',
  fgColor: { argb: 'FF4472C4' }
};

// Add data
const data = [
  { product: 'Widget A', qty: 100, price: 10 },
  { product: 'Widget B', qty: 50, price: 25 },
];

data.forEach((item, index) => {
  sheet.addRow({
    product: item.product,
    qty: item.qty,
    price: item.price,
    total: { formula: `B${index + 2}*C${index + 2}` }
  });
});

// Add totals row
const lastRow = sheet.rowCount + 1;
sheet.addRow({
  product: 'TOTAL',
  total: { formula: `SUM(D2:D${lastRow - 1})` }
});

// Currency formatting
sheet.getColumn('price').numFmt = '$#,##0.00';
sheet.getColumn('total').numFmt = '$#,##0.00';

await workbook.xlsx.writeFile('report.xlsx');

Create Spreadsheet (Python - openpyxl)

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

wb = Workbook()
ws = wb.active
ws.title = 'Sales Report'

# Headers
headers = ['Product', 'Quantity', 'Price', 'Total']
for col, header in enumerate(headers, 1):
    cell = ws.cell(row=1, column=col, value=header)
    cell.font = Font(bold=True, color='FFFFFF')
    cell.fill = PatternFill(start_color='4472C4', end_color='4472C4', fill_type='solid')

# Data
data = [
    ('Widget A', 100, 10),
    ('Widget B', 50, 25),
    ('Widget C', 75, 15),
]

for row_idx, (product, qty, price) in enumerate(data, 2):
    ws.cell(row=row_idx, column=1, value=product)
    ws.cell(row=row_idx, column=2, value=qty)
    ws.cell(row=row_idx, column=3, value=price)
    ws.cell(row=row_idx, column=4, value=f'=B{row_idx}*C{row_idx}')

# Totals row
total_row = len(data) + 2
ws.cell(row=total_row, column=1, value='TOTAL')
ws.cell(row=total_row, column=4, value=f'=SUM(D2:D{total_row-1})')

# Number formatting
for row in range(2, total_row + 1):
    ws.cell(row=row, column=3).number_format = '$#,##0.00'
    ws.cell(row=row, column=4).number_format = '$#,##0.00'

wb.save('report.xlsx')

Read and Analyze (Python - pandas)

import pandas as pd

# Read Excel file
df = pd.read_excel('data.xlsx', sheet_name='Sheet1')

# Analysis
summary = df.groupby('Category').agg({
    'Sales': 'sum',
    'Quantity': 'mean'
}).round(2)

# Write to Excel with formatting
with pd.ExcelWriter('analysis.xlsx', engine='openpyxl') as writer:
    df.to_excel(writer, sheet_name='Raw Data', index=False)
    summary.to_excel(writer, sheet_name='Summary')

    # Auto-adjust column widths
    for sheet in writer.sheets.values():
        for column in sheet.columns:
            max_length = max(len(str(cell.value)) for cell in column)
            sheet.column_dimensions[column[0].column_letter].width = max_length + 2

Add Charts (Python)

from openpyxl.chart import BarChart, Reference

chart = BarChart()
chart.title = 'Sales by Product'
chart.x_axis.title = 'Product'
chart.y_axis.title = 'Sales'

# Data range (assumes column D contains the series and row 1 is headers)
max_row = ws.max_row
data_ref = Reference(ws, min_col=4, min_row=1, max_row=max_row, max_col=4)
categories = Reference(ws, min_col=1, min_row=2, max_row=max_row)

chart.add_data(data_ref, titles_from_data=True)
chart.set_categories(categories)
chart.shape = 4

ws.add_chart(chart, 'F2')

Conditional Formatting

from openpyxl.formatting.rule import ColorScaleRule, FormulaRule
from openpyxl.styles import PatternFill

# Color scale (heatmap)
ws.conditional_formatting.add(
    'D2:D100',
    ColorScaleRule(
        start_type='min', start_color='FF0000',
        end_type='max', end_color='00FF00'
    )
)

# Highlight cells above threshold
red_fill = PatternFill(start_color='FFCCCC', fill_type='solid')
ws.conditional_formatting.add(
    'D2:D100',
    FormulaRule(formula=['D2>1000'], fill=red_fill)
)

Common Formulas Reference

PurposeFormulaExample
Sum=SUM(range)=SUM(A1:A10)
Average=AVERAGE(range)=AVERAGE(B2:B100)
Count=COUNT(range)=COUNT(C:C)
Conditional sum=SUMIF(range,criteria,sum_range)=SUMIF(A:A,"Widget",B:B)
Lookup=VLOOKUP(value,range,col,FALSE)=VLOOKUP(A2,Data!A:C,3,FALSE)
If=IF(condition,true,false)=IF(B2>100,"High","Low")
Percentage=value/total=B2/SUM(B:B)

Decision Tree

Excel Task: [What do you need?]
    ├─ Create new spreadsheet?
    │   ├─ Simple data export → pandas to_excel()
    │   ├─ Formatted report → exceljs or openpyxl
    │   └─ With charts → openpyxl charts module
    │
    ├─ Read/analyze existing?
    │   ├─ Data analysis → pandas read_excel()
    │   ├─ Preserve formatting → openpyxl load_workbook()
    │   └─ Fast parsing → xlsx (SheetJS)
    │
    ├─ Modify existing?
    │   ├─ Add data → openpyxl (preserves formatting)
    │   └─ Update formulas → openpyxl
    │
    └─ Complex features?
        ├─ Pivot tables → pandas summary tables or xlwings (native pivots)
        ├─ Data validation → openpyxl DataValidation
        └─ Macros → preserve only; use xlwings for Excel automation

Do / Avoid (Jan 2026)

Do

  • Separate Inputs / Calculations / Outputs (tabs or clear sections).
  • Keep assumptions explicit (value + unit + source + date).
  • Add control totals and reconciliation checks for imported data.

Avoid

  • Hardcoded constants inside formulas without a documented assumption.
  • Hidden rows/columns that change results without documentation.
  • Sharing sheets with customer PII or secrets.

What Good Looks Like

  • Structure: clear Inputs/Assumptions, Calculations, and Outputs separation (tabs or sections).
  • Integrity: no #REF!, broken named ranges, or hardcoded constants hidden in formulas.
  • Traceability: every key output ties back to labeled inputs (units + source + date).
  • Checks: control totals, reconciliations, and error flags that fail loudly.
  • Review: independent review pass using assets/spreadsheet-model-review-checklist.md.

Optional: AI / Automation

Use only when explicitly requested and policy-compliant.

  • Generate first-pass formulas/charts; humans verify correctness and edge cases.
  • Draft documentation tabs (assumptions, glossary); do not invent source data.

Navigation

Resources

Templates

Related Skills

Fact-Checking

  • Use web search/web fetch to verify current external facts, versions, pricing, deadlines, regulations, or platform behavior before final answers.
  • Prefer primary sources; report source links and dates for volatile information.
  • If web access is unavailable, state the limitation and mark guidance as unverified.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

25.59%
按下载量换算584

Cursor

22.58%
按下载量换算515

Gemini CLI

17.37%
按下载量换算396

Antigravity

12.08%
按下载量换算276

OpenCode

8.15%
按下载量换算186

Codex

2.95%
按下载量换算67

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills