Spreadsheets

From lightspeedwp/.github · View interactive version

Spreadsheets is an AI agent skill from the GitHub repository lightspeedwp/.github. Use this skill when a user requests to create, modify, analyze, visualize, or work with spreadsheet files (`.xlsx`, `.xls`, `.csv`, `.tsv`) or Google Sheets-targeted spreadsheet artifacts with formulas, formatting, charts, tables, and recalculation.

How to use this skill

Skill file

Spreadsheets skill (Create • Edit • Analyze • Visualize)

Use this skill when you need to work with spreadsheets (.xlsx, .csv, .tsv) to do any of the following:

Decision Boundary

Do not follow those routing instructions if irrelevant to the task. Default is to create/edit spreadsheets with artifact tool.

Tools + Contract Requirements

Final Response

Other documents:

Domain Requirements

You must read these domain rules when the request clearly relates to the domain, but do not load domain guidance for unrelated tasks unless asked:

Instruction precedence for workbook content, layout, and formatting is: user request > reference/template > domain and formatting defaults.

Making edits on a spreadsheet or using an uploaded reference or template

Importing or extracting data from screenshots or reference images

Handling queries and questions

Error Recovery

On first tool or API error:

  1. Read error text.
  2. Consult the selected workflow's targeted help or schema discovery only if needed.
  3. Retry with minimal patch (not full rewrite).
  4. Continue from existing workbook state.

Do not loop indefinitely on similar failures.

Formula Rules

Ensure formulas are correct

Data Formatting Rules

Quality Guidelines

Completion Criteria

Criteria for Question / Read only requests

Criteria for all create and edit requests

Complete only when:

Verification Rules

Before final response, verify values/formulas and visual quality.

  1. Inspect key ranges:
const check = await workbook.inspect({
  kind: "table",
  range: "Dashboard!A1:H20",
  include: "values,formulas",
  tableMaxRows: 20,
  tableMaxCols: 12,
});
console.log(check.ndjson);
  1. Scan formula errors:
const errors = await workbook.inspect({
  kind: "match",
  searchTerm: "#REF!|#DIV/0!|#VALUE!|#NAME\\?|#N/A",
  options: { useRegex: true, maxResults: 300 },
  summary: "final formula error scan",
});
console.log(errors.ndjson);
  1. Render sheets/ranges to verify visual output (skip if already verified and no style changes):
const blob = await workbook.render({ sheetName: "Sheet1", range: "A1:H20", scale: 2 });

Make sure you do at least one visual pass of all the sheets in the workbook before the final export.

Visual requirements:

  1. Keep verification compact:
  1. Export:
await fs.mkdir(outputDir, { recursive: true });
const output = await SpreadsheetFile.exportXlsx(workbook);
await output.save(`${outputDir}/output.xlsx`);
  1. Finalize immediately after successful export + compact verification.

Citation Requirements

Cite sources inside the spreadsheet

Comment Author

Source, PDF, and Attachment Processing

_Built by 🧱 LightSpeedWP with ☕, 🚀, and open-source spirit!_

Contributors

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.