agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when creating, reading, or fixing spreadsheets (.xlsx, .csv). Covers formulas, formatting, charts, data cleaning, and handling the messy real-world files that are not actually tabular.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill spreadsheets --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/spreadsheetsContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when creating, reading, or fixing spreadsheets (.xlsx, .csv). Covers formulas, formatting, charts, data cleaning, and handling the messy real-world files that are not actually tabular.
name: spreadsheets description: Use when creating, reading, or fixing spreadsheets (.xlsx, .csv). Covers formulas, formatting, charts, data cleaning, and handling the messy real-world files that are not actually tabular. metadata: category: documents version: 1.0.0 tags: [xlsx, excel, csv, data-cleaning, formulas]
Build and repair spreadsheets, including the ones that arrive with headers on row 7, merged cells, and three tables on one sheet. Most spreadsheet work is cleaning, not computing.
1. **Inspect before parsing** — Read the first thirty rows raw. Real spreadsheets have title rows, blank rows, merged headers, and notes in the margins. Assuming `header=0` is how you end up with a DataFrame whose columns are `Unnamed: 0`. 2. **Find the actual header row** — The first row where every cell is non-empty and the row below it has consistent types. 3. **Coerce the types explicitly** — Excel stores dates as numbers, numbers as text, and empty cells as several different things. Nothing is what it appears. 4. **Clean before computing** — Trim whitespace, unify the null representations, drop the total row that got read as data. 5. **When writing for humans, format** — Column widths, number formats, a frozen header row. An unformatted spreadsheet with a column of `1234567.891` is not usable. 6. **Verify the formulas calculate** — A written formula is a string until a spreadsheet application evaluates it. Open the file and check.
**Reading a real-world messy file:**
import pandas as pd
# Never trust the structure. Look first.
raw = pd.read_excel("sales.xlsx", sheet_name="Q2", header=None, nrows=30)
# Row 0: "ACME Corp — Confidential" <- a title
# Row 1: (blank)
# Row 2: "Q2 2026 Sales by Region" <- a subtitle
# Row 3: (blank)
# Row 4: Region | Rep | Units | Revenue <- the actual header, on row 4
# ...
# Row 47: "TOTAL" | | 8,412 | 1,204,880 <- a total row that must not be data
def find_header_row(raw: pd.DataFrame, max_scan: int = 20) -> int:
for i in range(max_scan):
row = raw.iloc[i]
if row.notna().all() and raw.iloc[i + 1].notna().sum() >= len(row) - 1:
return i
raise ValueError("no header row found in the first 20 rows")
header_row = find_header_row(raw)
df = pd.read_excel("sales.xlsx", sheet_name="Q2", header=header_row)
# Drop the total row — it is the single most common source of a doubled sum.
df = df[~df["Region"].astype(str).str.strip().str.upper().isin({"TOTAL", "SUM", "GRAND TOTAL"})]
# Clean the keys: trailing whitespace silently breaks every join downstream.
df["Region"] = df["Region"].str.strip()
df["Rep"] = df["Rep"].str.strip()
# Excel stores numbers as text more often than anyone expects.
df["Revenue"] = pd.to_numeric(
df["Revenue"].astype(str).str.replace(r"[$,]", "", regex=True),
errors="coerce",
)
assert df["Revenue"].notna().all(), "some revenue values failed to parse"**Writing a workbook a human can read:**
from openpyxl.styles import Font, PatternFill, Alignment
from openpyxl.utils import get_column_letter
with pd.ExcelWriter("output/summary.xlsx", engine="openpyxl") as writer:
summary.to_excel(writer, sheet_name="Summary", index=False, startrow=0)
ws = writer.sheets["Summary"]
header_fill = PatternFill("solid", fgColor="1F2937")
for cell in ws[1]:
cell.font = Font(bold=True, color="FFFFFF")
cell.fill = header_fill
cell.alignment = Alignment(horizontal="center")
ws.freeze_panes = "A2" # header stays visible when scrolling
ws.auto_filter.ref = ws.dimensions
for i, column in enumerate(summary.columns, start=1):
letter = get_column_letter(i)
width = max(summary[column].astype(str).str.len().max(), len(column)) + 3
ws.column_dimensions[letter].width = min(width, 50)
if "revenue" in column.lower() or "cents" in column.lower():
for cell in ws[letter][1:]:
cell.number_format = '#,##0.00' # 1234567.891 is not a readable numberA curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…