Skip to content

ericrisco/rsc-harness / skills/spreadsheet-ops

spreadsheet-ops

Verified

Use when working a spreadsheet programmatically — writing or repairing a formula, generating an .xlsx with Python including charts and conditional formats, driving Google Sheets from a script, building a read-transform-write pipeline, or writing an in-sheet macro or trigger. Covers formula errors, Sheets API quota, service-account permissions, and formulas that read back blank. NOT pure dedupe or normalisation with no sheet output (that is `data-cleaning`), NOT scraping a web table into rows (that is `data-scraper`), NOT multi-app event wiring (that is `automation-flows`).

FileKindSize
SKILL.mdskill md11.5 KB
evals/README.mdmarkdown2.1 KB
evals/cases.yamlconfig3.6 KB
references/formula-cookbook.mdmarkdown2.7 KB
references/python-excel.mdmarkdown3.8 KB
references/sheets-api-appsscript.mdmarkdown4.2 KB
scripts/verify.shexecutablescript5.0 KB

references/formula-cookbook.md

View on GitHub
# Formula cookbook

Rule one, repeated because it causes the most broken formulas: **arguments are comma-separated, never
semicolons** — the file format is comma-only regardless of your locale's display separator.

## Lookups

```text
# Exact match, no column-index counting, works leftward:
=XLOOKUP(A2, Sheet2!$A:$A, Sheet2!$B:$B, "not found")

# Multi-criteria with FILTER (dynamic array):
=FILTER(Orders!B:B, (Orders!A:A=A2)*(Orders!C:C="PAID"))

# Avoid: VLOOKUP with a hardcoded index and approximate-match default
# Bad:  =VLOOKUP(A2, Sheet2!A:B, 2)        ' 4th arg defaults to TRUE → wrong row
# Good: =VLOOKUP(A2, Sheet2!$A:$B, 2, FALSE)  ' or just use XLOOKUP
```

## Conditional sums

```text
# Sum amount where region=EU AND status=OPEN:
=SUMIFS(amount, region, "EU", status, "OPEN")

# Common #VALUE! cause: the sum range and a criteria range are different sizes.
# Bad:  =SUMIFS(B2:B100, C2:C50, "EU")     ' mismatched lengths → #VALUE!
# Good: =SUMIFS(B2:B100, C2:C100, "EU")    ' all ranges identical shape
```

## Readability: LET and helper columns

```text
# Name a sub-expression once instead of recomputing it:
=LET(rate, VLOOKUP(A2, Rates!$A:$B, 2, FALSE),
     net,  B2 * (1 - rate),
     ROUND(net, 2))

# Replace a deep IF chain (Bad) with a lookup table + XLOOKUP (Good):
# Bad:  =IF(A1>90,"A",IF(A1>80,"B",IF(A1>70,"C","D")))
# Good: =XLOOKUP(A1, Bands!$A:$A, Bands!$B:$B, "F", -1)  ' -1 = exact-or-next-smaller
```

## Dynamic arrays

```text
=SORT(UNIQUE(FILTER(A2:A100, B2:B100<>"")))   ' spills automatically
```
A spill blocked by data in its target range raises `#SPILL!` — clear the cells below; do not
Ctrl+Shift+Enter.

## Error decoder

| Error | Means | Usual fix |
| --- | --- | --- |
| `#VALUE!` | A wrong argument type, or mismatched range sizes in SUMIFS/array math | Make all ranges the same shape; coerce text-numbers with `VALUE()` |
| `#REF!` | A reference no longer exists (deleted row/column/sheet) | Repoint the reference; check after structural edits |
| `#N/A` | Lookup found nothing | Add the 4th arg / `if_not_found`: `XLOOKUP(...,"")` |
| `#SPILL!` | A dynamic array cannot spill — something blocks the range | Clear the blocking cells below/right |
| `#NAME?` | Unknown function or name — often a typo or a locale/semicolon artifact | Fix the name; switch semicolons to commas |
| `#DIV/0!` | Division by zero/empty | Guard: `=IFERROR(a/b, 0)` or `=IF(b=0,0,a/b)` |
| `#NUM!` | Invalid numeric argument (e.g. negative sqrt) | Validate the input range |

## Cross-sheet helpers (long-standing — Excel since 2013, also in Google Sheets)

```text
=SHEET()          ' index of the current sheet
=SHEET("Q2")      ' index of a named sheet
=SHEETS()         ' count of sheets in the workbook
```
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse 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, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall