numbers
Skill0 starsChanged 12 days agoMITView on GitHub
Read, analyze, and manipulate Apple Numbers spreadsheets (.numbers files). Use when the user mentions a .numbers file, wants to inspect/edit/export Numbers data, modify cells, write formulas, read table values, or work with any Apple Numbers document — even if they just provide a path ending in .numbers.
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- jablonkai/skillstheir own version, first seen Oct 1, 2026
- zhichao1208/numberstheir own version, first seen Jun 29, 2026
- Panchangam18/background-computer-usetheir own version, first seen Apr 18, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Panchangam18/background-computer-use★ 4same name
- jablonkai/skills★ 2same name
- zhichao1208/numbers★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Every task follows the same three-phase sequence: inspect → modify → save.
- Very specific: line 28
Run inspect.py before reading or modifying anything.
- Very specific: line 67
Use name fields (not indexes) in all subsequent operations — names are stable.
- Distinctive: line 78
Prefer the bundled scripts — they handle document reuse, saving, escaping, and Numbers quirks.
- Very specific: line 90
All write scripts take input output paths, save to the new path, and never overwrite the original.
- Very specific: line 95
If the user has not specified an output path, append _modified to the file name before the extension (/path/to/file.numbers → …
- Distinctive: line 98
Always tell the user the exact path of the saved file.
- Very specific: line 168
Write scripts close the saved document by default.
- Very specific: line 170
Read scripts leave the document open by default.
- Distinctive: line 171
No script ever closes a window the user already had open.
- Very specific: line 273
After saving a file with formulas, run inspect.py (with --preview-rows) on the output file to read the computed values — Numbers …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Apple Numbers Skill
This skill reads, analyzes, and modifies Apple Numbers spreadsheets entirely through Numbers.app via AppleScript and JXA (JavaScript for Automation). No third-party packages are required — only macOS with Numbers.app installed and Python 3 (stdlib).
Numbers.app will open and be briefly visible during every operation. This is expected behavior.
Requirements
- macOS with Numbers.app installed
- Python 3 (stdlib only — no pip installs)
Core Workflow
Every task follows the same three-phase sequence: inspect → modify → save.
Phase 1: Inspect First, Always
Run inspect.py before reading or modifying anything. It opens the file in Numbers,
reads the structure, and returns JSON describing all sheets, tables, headers, and a
data preview.
python3 "${CLAUDE_SKILL_DIR}/scripts/inspect.py" /path/to/file.numbersSample output:
{
"path": "/path/to/file.numbers",
"sheet_count": 2,
"sheets": [
{
"index": 0,
"name": "Sheet 1",
"tables": [
{
"index": 0,
"name": "Table 1",
"num_rows": 10,
"num_cols": 5,
"header_rows": 1,
"footer_rows": 0,
"has_header_row": true,
"headers": ["Name", "Q1", "Q2", "Q3", "Q4"],
"preview": [
["Alice", 100, 200, 150, 300],
["Bob", 80, 120, 90, 210]
]
}
]
}
]
}Use name fields (not indexes) in all subsequent operations — names are stable;
indexes shift if sheets or tables are added or removed.
--preview-rows Nshows more data rows (default: 3). Footer rows are excluded.--show-formulasscans every cell and adds aformulaslist per table, e.g.[{"cell": "B10", "formula": "=SUM(B2:B9)"}]. Use it to audit or explain existing formulas;previewalways shows computed values, not formula text.--closecloses the document afterwards (only if this script opened it).
Phase 2: Modify with the Bundled Scripts
Prefer the bundled scripts — they handle document reuse, saving, escaping, and Numbers quirks. Reach for handwritten AppleScript only when no script covers the operation (see "Custom AppleScript" below).
| Task | Script |
| Write literal values to cells | set_value.py |
| Write formulas to cells | set_formula.py |
| Append rows of data | add_rows.py |
| Export a table to CSV | export_csv.py |
| Export whole document to xlsx/PDF | export.py |
All write scripts take input output paths, save to the new path, and never
overwrite the original.
Phase 3: Derive Output Path
If the user has not specified an output path, append _modified to the file name
before the extension (/path/to/file.numbers → /path/to/file_modified.numbers).
Always tell the user the exact path of the saved file.
Script Reference
set_value.py — literal values
python3 "${CLAUDE_SKILL_DIR}/scripts/set_value.py" \
input.numbers output.numbers \
--sheet "Sheet 1" --table "Table 1" \
--value B2 42.5 \
--value C2 "Updated" \
--value D2 true--valueauto-types: integers and decimals become numbers,true/falsebecome booleans, everything else is text. Repeat for multiple cells.--text CELL VALUEforces text (use for values like007or literaltrue).- Values starting with
=are rejected — useset_formula.pyfor formulas.
set_formula.py — formulas
python3 "${CLAUDE_SKILL_DIR}/scripts/set_formula.py" \
input.numbers output.numbers \
--sheet "Sheet 1" --table "Table 1" \
--formula B10 "=SUM(B2:B9)" \
--formula C10 "=AVERAGE(C2:C9)"--formulacan be repeated. Cell addresses use A1 notation.- For cross-sheet references use
::, e.g.=SUM(Sheet2::Table1::B:B).
add_rows.py — append data rows
python3 "${CLAUDE_SKILL_DIR}/scripts/add_rows.py" \
input.numbers output.numbers \
--sheet "Sheet 1" --table "Table 1" \
--row '["Eve", "North", 50]' \
--row '["Frank", "South", 75]'- Each
--rowis a JSON array: strings, numbers, booleans, ornull(leaves the cell empty). The table grows to fit; columns are added if a row is wider.
export_csv.py — table(s) to CSV
python3 "${CLAUDE_SKILL_DIR}/scripts/export_csv.py" \
/path/to/file.numbers --sheet "Sheet 1" --table "Table 1" --output out.csv--sheet/--tabledefault to the first sheet/table.--all-tablesexports every table (one CSV each);--outputis then a directory.--outputdefaults to a filename derived from the file, sheet, and table names.
export.py — whole document to Excel or PDF
python3 "${CLAUDE_SKILL_DIR}/scripts/export.py" /path/to/file.numbers --format xlsx
python3 "${CLAUDE_SKILL_DIR}/scripts/export.py" /path/to/file.numbers --format pdf --output out.pdfUses Numbers' native export — a single operation regardless of table size, so
prefer it over export_csv.py for very large documents or when the user wants
Excel/PDF. All sheets are included. --force overwrites an existing output.
Common flags
- Write scripts close the saved document by default; pass
--no-closeto keep it open in Numbers. - Read scripts leave the document open by default; pass
--closeto close it. - No script ever closes a window the user already had open.
Custom AppleScript for Everything Else
For operations the scripts don't cover (renaming sheets/tables, deleting rows,
creating tables), write targeted AppleScript via osascript. Follow these rules —
each one guards against a real failure mode:
- Target Numbers by bundle id —
tell application id "com.apple.Numbers". The app's display name can differ from "Numbers" (renamed bundle), which breaks name-based targeting. - Never use
first document whose path is ...— thewhosefilter errors if any open document is unsaved. Loop overdocumentswith atryblock instead. Also notename of documentmay omit the file extension. - Never overwrite the original — save to a new path with
save in POSIX file. - AppleScript strings are double-quoted only — escape
"as\"and\as\\. Single quotes are not string delimiters in AppleScript.
Writing literal values:
osascript << 'EOF'
tell application id "com.apple.Numbers"
open POSIX file "/path/to/file.numbers"
tell front document
tell sheet "Sheet 1"
tell table "Table 1"
set value of cell "B2" to 42.5
set value of cell "C2" to "Updated"
set value of cell "D2" to true
end tell
end tell
save in POSIX file "/path/to/output.numbers"
end tell
end tell
EOFCreating sheets and tables:
osascript << 'EOF'
tell application id "com.apple.Numbers"
open POSIX file "/path/to/file.numbers"
tell front document
make new sheet with properties {name:"Summary"}
tell sheet "Summary"
-- new sheets come with a default "Table 1"; add more if needed:
make new table with properties {name:"Totals", row count:5, column count:3, header row count:1}
end tell
save in POSIX file "/path/to/output.numbers"
end tell
end tell
EOFFor generated scripts (many cells, conditional logic), build the AppleScript
in Python and render every value with a helper — never repr(), which produces
single-quoted strings that AppleScript cannot parse:
import subprocess
def as_applescript(value):
"""Render a Python value as an AppleScript literal."""
if isinstance(value, bool):
return "true" if value else "false"
if isinstance(value, (int, float)):
return str(value)
s = str(value).replace("\\", "\\\\").replace('"', '\\"')
return f'"{s}"'
cells = [("B2", 42), ("C2", "Updated"), ("D2", True)]
cell_lines = "\n".join(
f' set value of cell "{addr}" to {as_applescript(val)}'
for addr, val in cells
)
script = f"""
tell application id "com.apple.Numbers"
open POSIX file "/path/to/file.numbers"
tell front document
tell sheet "Sheet 1"
tell table "Table 1"
{cell_lines}
end tell
end tell
save in POSIX file "/path/to/output.numbers"
end tell
end tell
"""
result = subprocess.run(["osascript", "-e", script], capture_output=True, text=True)
if result.returncode != 0:
print(f"ERROR: {result.stderr}")
else:
print("Saved to: /path/to/output.numbers")Reading Formula Results
After saving a file with formulas, run inspect.py (with --preview-rows) on the
output file to read the computed values — Numbers recalculates on save, and the
preview values reflect the evaluated result. To see the formula text itself,
add --show-formulas.
Closing Documents
Scripts only close documents they themselves opened, so a window the user already had open is never touched. To close every document that has no unsaved changes:
osascript << 'EOF'
tell application id "com.apple.Numbers"
set keptOpen to {}
repeat with d in (get every document)
if modified of d then
set end of keptOpen to name of d
else
close d saving no
end if
end repeat
return keptOpen
end tell
EOFIt returns the names of documents left open because they have unsaved changes. Tell the user which ones; saving or discarding those edits is their call.
Known Limitations
- Numbers.app is always required. There is no headless path — Numbers opens visually for every read and write operation.
- Encrypted files cannot be opened. The scripts fail with a clear error after retrying; tell the user to open the file in Numbers, remove the password (File > Password > Remove Password), save, then retry.
- Slow for large tables. Cell reads go row-by-row; for very large documents
prefer
export.py(native export, one operation). - Formula strings must begin with
=. Numbers identifies formulas by the leading equals sign; a string without it stores literal text — and conversely, any string value starting with=becomes a formula. - Footer rows.
add_rows.pyappends after footer rows if the table has any.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

