expense-report
БесплатноБез исполняемых скриптовНе проверенOrganize, categorize, and summarize business expenses for reimbursement and tax preparation. Use when a user asks to create an expense report, organize…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Expense Report
Overview
Organize, categorize, and summarize business expenses into professional reports. This skill processes expense data from receipts, CSV files, or manual entries, categorizes them by type, calculates totals, and generates formatted reports suitable for reimbursement submissions or tax preparation.
Instructions
When a user asks to create an expense report or organize their expenses, follow these steps:
Step 1: Collect expense data
Gather expenses from the available sources:
From a CSV or spreadsheet:
import pandas as pd
def load_expenses_csv(file_path):
df = pd.read_csv(file_path)
df.columns = [col.strip().lower() for col in df.columns] # date, description, amount, ...
df["date"] = pd.to_datetime(df["date"]) # needed for the monthly grouping below
df["amount"] = pd.to_numeric(df["amount"].astype(str).str.replace(r"[$,]", "", regex=True))
if "category" not in df.columns:
df["category"] = df["description"].map(categorize_expense)
return df
From manual entries: Prompt the user for each expense or accept a list:
- Date
- Description / Vendor
- Amount
- Category (assign automatically if not provided)
- Payment method (credit card, cash, reimbursable)
From receipt images or PDFs: Extract data using OCR or text extraction, then structure into the same format. Treat OCR output as a draft: confirm amounts and dates with the user.
Step 2: Categorize expenses
Assign each expense to a standard category from the vendor name and description. Match whole words: plain substring tests misfile "Attorney fees" under Communication (att) and "Las Vegas" under Transportation (gas).
import re
CATEGORY_RULES = {
"Travel": ["airline", "airlines", "hotel", "uber", "lyft", "taxi", "flight", "airbnb", "rental car"],
"Meals": ["restaurant", "cafe", "coffee", "lunch", "dinner", "doordash", "grubhub"],
"Office Supplies": ["staples", "office depot", "supplies"],
"Software & Subscriptions": ["github", "aws", "google cloud", "slack", "zoom", "adobe"],
"Transportation": ["gas", "parking", "toll", "metro", "transit"],
"Professional Services": ["consulting", "legal", "accounting", "freelance"],
"Communication": ["phone", "internet", "verizon", "at&t", "t-mobile"],
"Training & Education": ["course", "conference", "workshop", "udemy", "training"],
}
PATTERNS = {cat: re.compile(r"\b(?:" + "|".join(re.escape(k) for k in kws) + r")\b", re.I)
for cat, kws in CATEGORY_RULES.items()}
def categorize_expense(description):
for category, pattern in PATTERNS.items():
if pattern.search(description):
return category
return "Other"
Ambiguous vendors (Amazon, Costco, Walmart) cannot be categorized from the name alone: leave them as "Other" and ask the user.
Step 3: Calculate totals and summaries
def summarize_expenses(df):
return {
"total": df["amount"].sum(),
"by_category": df.groupby("category")["amount"].sum().to_dict(),
"by_month": {str(p): v for p, v in df.groupby(df["date"].dt.to_period("M"))["amount"].sum().items()},
"count": len(df),
"date_range": f"{df['date'].min():%Y-%m-%d} to {df['date'].max():%Y-%m-%d}",
"avg_per_expense": df["amount"].mean(),
"largest_expense": df.loc[df["amount"].idxmax()].to_dict(),
}
def find_duplicates(df):
return df[df.duplicated(["description", "amount", "date"], keep=False)]
Step 4: Generate the report
Excel report with multiple sheets (keep amounts numeric and apply a number format, so the user can still sum and filter in Excel):
def generate_excel_report(df, summary, output_path="expense_report.xlsx"):
with pd.ExcelWriter(output_path, engine="openpyxl") as writer:
pd.DataFrame([
{"Metric": "Total expenses", "Value": summary["total"]},
{"Metric": "Number of expenses", "Value": summary["count"]},
{"Metric": "Date range", "Value": summary["date_range"]},
{"Metric": "Average per expense", "Value": summary["avg_per_expense"]},
]).to_excel(writer, sheet_name="Summary", index=False)
by_cat = sorted(summary["by_category"].items(), key=lambda kv: -kv[1])
pd.DataFrame(by_cat, columns=["Category", "Total"]).to_excel(writer, sheet_name="By Category", index=False)
for cell in writer.sheets["By Category"]["B"][1:]:
cell.number_format = "$#,##0.00"
df.to_excel(writer, sheet_name="All Expenses", index=False)
return output_path
Markdown summary for quick review:
def generate_markdown_summary(summary):
lines = [
"# Expense Report Summary",
f"**Period:** {summary['date_range']}",
f"**Total Expenses:** ${summary['total']:,.2f}",
f"**Number of Items:** {summary['count']}",
"",
"## By Category",
]
for cat, amt in sorted(summary["by_category"]
Установить expense-report в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл expense-report?
Organize, categorize, and summarize business expenses for reimbursement and tax preparation. Use when a user asks to create an expense report, organize receipts, categorize expenses, summarize spending, prepare expenses for reimbursement, or compile business expenses for tax filing. Handles receipts, CSV data, and manual entries.
Как установить скилл expense-report?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл expense-report запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use 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…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic