spending-analysis

spending-analysis is a skill for Claude Code from peerjakobsen/smartspender. It costs 33 tokens per session (2,196 once invoked), scanned A, original, MIT.

A set of rules for analysing categorised spending, including totals, percentages, month-to-month comparisons, unusual transactions, and savings suggestions.

In plain words
What is it for?
Use it to create monthly summaries, rank spending categories, calculate averages, compare months, investigate unusual purchases, and analyse purchases from one merchant.
Why use it?
It turns individual transactions into a structured picture of spending patterns and changes over time.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the smartspender plugin — 13 skills, 19 commands shipped together

Good fit Use it to create monthly summaries, rank spending categories, calculate averages, compare months, investigate unusual purchases, and analyse purchases from one merchant.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/peerjakobsen/smartspender/spending-analysis
Install

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.

Any agent
npx skills add peerjakobsen/smartspender --skill spending-analysis
Clone the repo
git clone --depth 1 https://github.com/peerjakobsen/smartspender

Made for: Claude Code.

Or install smartspender, the plugin that ships this one along with the rest of its 13 skills, 19 commands.

Wrote 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.

agentmods badge for spending-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/peerjakobsen/smartspender/spending-analysis/github.svg)](https://agentmods.dev/skills/peerjakobsen/smartspender/spending-analysis)
Your own site
<a href="https://agentmods.dev/skills/peerjakobsen/smartspender/spending-analysis"><img src="https://agentmods.dev/badge/skills/peerjakobsen/smartspender/spending-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spending-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/peerjakobsen/smartspender/spending-analysis"><img src="https://agentmods.dev/badge/skills/peerjakobsen/smartspender/spending-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,196 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.02196
Opus 5.5 $0.00013 $0.00878
Sonnet 5.5 $0.00007 $0.00439
Haiku 4.5 $0.00003 $0.00220

Measured 3mo ago against content hash 2e1971e7a55f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spending-analysis 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 3mo 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.

skills/spending-analysis/SKILL.md · 246 lines

How it starts

The opening of the file, as written. The whole thing — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spending Analysis

Purpose

Provides rules for analyzing categorized transaction data — aggregating spending by category, comparing month-over-month, detecting unusual transactions, and generating savings recommendations.

Category Aggregation

For a given month, aggregate all categorized transactions:

  1. Group transactions by category
  2. For each category, compute:
    • total: Sum of all transaction amounts (absolute values for expenses)
    • transaction_count: Number of transactions
    • avg_transaction: total / transaction_count
  3. Calculate each category's percentage of total spending: category_total / total_spending × 100
  4. Sort categories by total (highest first)

Write results to monthly-summary.csv.

Receipt-Level Breakdown

For a given merchant, aggregate spending at the receipt-item level instead of the transaction level. Used when the user asks about spending at a specific merchant (e.g., "Hvad bruger jeg hos Bilka?").

Data Source

  1. Read receipts.csv, filter by merchant (case-insensitive match against normalized merchant name per skills/categorization/SKILL.md)
  2. If month argument is provided, also filter by date column (YYYY-MM prefix match)
  3. Collect all matching receipt_id values and their date values
  4. Determine which monthly files to read: extract unique YYYY-MM values from the receipt dates
  5. For each monthly file receipt-items-{YYYY-MM}.csv: read it if it exists, filter to rows where receipt_id is in the collected set. Skip missing files.
  6. Combine all matching rows

Aggregation Rules

Group matching receipt items by subcategory:

  1. For each subcategory, compute:
    • total: Sum of total_price for all items in that subcategory
    • item_count: Sum of quantity for all items in that subcategory
    • avg_price: total / item_count
  2. Calculate each subcategory's percentage of total merchant spending: subcategory_total / merchant_total × 100
  3. Sort subcategories by total (highest first)

Read the full file on GitHub · 246 lines

Changes

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.

  1. 3mo ago First seen · 246 lines · 33 tokens per session scan A 2e1971e7a55f

Subscribe to this mod's changes

spending-analysis is a skill published in the GitHub repository peerjakobsen/smartspender (5 stars, last pushed 10mo ago), licensed MIT. It adds 33 tokens to every session and 2,196 once invoked, about $0.0001 per session on Opus 5.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-08-31.

Related

spending-analysis compared with skills from other repositories

spending-analysis next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
spending-analysispeerjakobsen/smartspenderSkill510mo agoMITA33Claude Code
cap-table-analysisGlobal-Slice/claude-pluginSkill914d agoMITA79Claude Code
board-presentation-analysisGlobal-Slice/claude-pluginSkill914d agoMITA61Claude Code
workflows-analysisGlobal-Slice/claude-pluginSkill914d agoMITA67Claude Code
equity-compensation-analysisGlobal-Slice/claude-pluginSkill914d agoMITA78Claude Code
funding-rounds-analysisGlobal-Slice/claude-pluginSkill914d agoMITA80Claude Code
waterfall-analysisGlobal-Slice/claude-pluginSkill914d agoMITA58Claude Code