Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/cxcscmu/skilllearnbench/excel-openpyxl-formulasnpx skills add cxcscmu/SkillLearnBench --skill excel-openpyxl-formulasgit clone --depth 1 https://github.com/cxcscmu/SkillLearnBenchWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cxcscmu/skilllearnbench/excel-openpyxl-formulas)<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/excel-openpyxl-formulas"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/excel-openpyxl-formulas.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.00928 |
| Opus 5 | $0.00015 | $0.00464 |
| Sonnet 5 | $0.00006 | $0.00186 |
| Haiku 4.5 | $0.00003 | $0.00093 |
Grade A, and why
excel-openpyxl-formulas scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
openpyxl: Insert Formulas While Preserving Formatting
Critical Rule: Load Without data_only
from openpyxl import load_workbook
# CORRECT: preserves formulas and formatting
wb = load_workbook('file.xlsx')
# WRONG: replaces formulas with cached values on save
wb = load_workbook('file.xlsx', data_only=True)
Basic Formula Insertion
wb = load_workbook('file.xlsx')
ws = wb['Sheet1']
ws['H12'] = '=INDEX(Data!$H$21:$M$40,MATCH($D12,Data!$B$21:$B$40,0),MATCH(H$10,Data!$H$4:$M$4,0))'
wb.save('file.xlsx')
Iterating Over Cell Ranges
When applying similar formulas to a grid of cells, iterate using row/column indices:
from openpyxl.utils import get_column_letter
# Fill a range (e.g., H12:L17) with formulas
start_row = 12
end_row = 17
start_col = 8 # H = column 8
end_col = 12 # L = column 12
for row in range(start_row, end_row + 1):
for col in range(start_col, end_col + 1):
col_letter = get_column_letter(col)
cell = ws.cell(row=row, column=col)
cell.value = f'=INDEX(Data!$I$21:$M$40,MATCH($D{row},Data!$B$21:$B$40,0),MATCH({col_letter}$10,Data!$I$4:$M$4,0))'
Preserving Cell Formatting
openpyxl preserves existing cell styles when you only change value. Setting a new value does NOT erase fill color, font, borders, etc.:
cell = ws['H12']
cell.value = '=SUM(A1:A10)' # Only changes the value; style is preserved
Row and Column Reference Conversion
from openpyxl.utils import get_column_letter, column_index_from_string
get_column_letter(8) # → 'H'
get_column_letter(12) # → 'L'
column_index_from_string('H') # → 8
column_index_from_string('L') # → 12
Recalculating Formulas After Editing
After saving, run recalc.py to update cached formula values:
python recalc.py file.xlsx
Check output for errors:
{"status": "success", "total_errors": 0, "total_formulas": 42}
If errors found:
{"status": "errors_found", "error_summary": {"#REF!": {"count": 2, "locations": ["Task!H12"]}}}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 115 lines · 30 tokens per session scan A 99b72549969c
excel-openpyxl-formulas is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 928 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
csv-utils
Helpers for reading and writing CSV files in Python.
pywin32-excel-docs
Reference for the Microsoft Excel COM API via pywin32. Use this skill whenever writing or reviewing Python code that interacts with Excel using the Excel COM API via win32com, pywin32, or the PyXLL add-in — including code that calls pyxll.xlapp() or XLCell.torange() — and when working with workbooks, worksheets…
TypeScript 인터페이스 순서 기반 xlsx 엑셀 다운로드 구현
사용자가 정의한 TypeScript 인터페이스의 속성 순서를 기준으로 데이터 배열을 변환하고, xlsx 라이브러리를 사용하여 엑셀 파일로 다운로드하는 함수를 작성합니다.
xlsx-manipulation
Create, edit, and manipulate Excel spreadsheets programmatically using openpyxl.
xlsx
Expert in automating Excel workflows using Node.js (ExcelJS, SheetJS) and Python (pandas, openpyxl).
xberg
Extract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg. Use when writing code that calls Xberg APIs in Python, Node.js/TypeScript, Rust, or CLI. Covers installation, extraction (sync/async), configuration (OCR, chunking, output format)…