payslip

payslip is a command for Claude Code from peerjakobsen/smartspender. It costs 24 tokens per session (3,457 once invoked), scanned A, original, MIT.

A command for uploading Danish payslips and viewing or improving the stored payslip history. A payslip is a document showing pay, tax, pension, and other salary details.

In plain words
What is it for?
Use it to upload a payslip image or PDF, track pension and income over time, and support more informed financial advice.
Why use it?
It keeps income and pension information together with transaction data, reducing the need to review each payslip manually.

Command 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 upload a payslip image or PDF, track pension and income over time, and support more informed financial advice.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/peerjakobsen/smartspender/payslip
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.

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 payslip

README.md
[![agentmods](https://agentmods.dev/badge/commands/peerjakobsen/smartspender/payslip.svg)](https://agentmods.dev/commands/peerjakobsen/smartspender/payslip)
Your own site
<a href="https://agentmods.dev/commands/peerjakobsen/smartspender/payslip"><img src="https://agentmods.dev/badge/commands/peerjakobsen/smartspender/payslip.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,457 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.00024 $0.03457
Opus 5 $0.00012 $0.01729
Sonnet 5 $0.00005 $0.00691
Haiku 4.5 $0.00002 $0.00346

Measured 7d ago against content hash 59d398a133d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

payslip 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 7d 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.

commands/payslip.md · 340 lines

How it starts

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

/smartspender:payslip

Trigger

  • /smartspender:payslip upload
  • /smartspender:payslip history
  • /smartspender:payslip learn
  • "Upload en lønseddel"
  • "Registrer min lønseddel"
  • "Vis lønseddelhistorik"
  • "Show my payslip history"

Arguments

Argument Required Values Default
action yes upload, history, learn -

Action: upload

Prerequisites

  • At least one bank sync completed (transactions.csv exists with data) for matching to work
  • User has a payslip image or PDF ready to share

Workflow

  1. Prompt the user to share their payslip: "Del venligst din lønseddel — du kan indsætte et billede eller trække en PDF ind i chatten."
  2. [USER ACTION]: User attaches a payslip image or PDF
  3. If no file is attached, respond: "Jeg kan ikke se nogen lønseddel. Indsæt venligst et billede eller en PDF."
  4. Load extraction rules: skills/payslip-parsing/SKILL.md
  5. Detect employer from the uploaded file (header, CVR, filename) per the payslip-parsing skill
  6. If employer detected: check for payslip-knowledge/{employer-id}/PARSER.md
    • If parser exists: load employer-specific extraction rules
    • If no parser: continue with general extraction rules
  7. Extract payslip data using Claude Vision:
    • pay_period (YYYY-MM)
    • employer (company name)
    • gross_salary (bruttoløn)
    • am_bidrag (8% labor market contribution)
    • a_skat (income tax)
    • pension_employer (arbejdsgiverpension)
    • pension_employee (egetbidrag)
    • atp (ATP contribution)
    • feriepenge (holiday pay)
    • net_salary (nettoløn / udbetalt)
    • Any additional benefits (sundhedsforsikring, fritvalgskonto, etc.)
  8. Calculate derived fields:
    • pension_total = pension_employer + pension_employee
    • pension_pct = (pension_total / gross_salary) * 100
  9. Validate extraction per skills/payslip-parsing/SKILL.md:
    • AM-bidrag should be ~8% of gross (±5 kr tolerance)
    • Sum check: gross - deductions ≈ net (±2% tolerance)
  10. Present extraction summary to user for confirmation:
    Jeg aflæste følgende fra lønsedlen:
    
    Lønperiode: {pay_period, Danish format}
    Arbejdsgiver: {employer}
    
    INDTÆGTER
    Bruttoløn:              {gross_salary} kr
    
    FRADRAG
    AM-bidrag (8%):         {am_bidrag} kr
    A-skat:                 {a_skat} kr
    ATP:                    {atp} kr
    Pension (egetbidrag):   {pension_employee} kr
    
    ARBEJDSGIVERBIDRAG
    Pension:                {pension_employer} kr
    
    TIL UDBETALING:         {net_salary} kr
    
    Samlet pension: {pension_total} kr ({pension_pct}% af bruttoløn)
    
    Er det korrekt? (Eller ret de felter der er forkerte)
    
  11. [USER ACTION]: User confirms or provides corrections
  12. Apply any corrections from the user
  13. Load schema: skills/data-schemas/SKILL.md
  14. Check for duplicate payslips in payslips.csv (same employer_id + same pay_period). If duplicate found, ask: "Denne lønseddel ligner en der allerede er registreret ({payslip_id} for {pay_period}). Vil du tilføje den alligevel?"
  15. [USER ACTION] (only if duplicate): User confirms or cancels
  16. If user cancels on duplicate, stop and output: "Lønsedlen blev ikke tilføjet."
  17. Load matching rules: skills/transaction-matching/SKILL.md
  18. Search transactions.csv for matching salary transactions:
    • Amount within ±1% of net_salary
    • Date within 5 days after pay_period end (e.g., for January payslip, search Feb 1-5)
    • Transaction type: CRDT (credit/income)
    • Description patterns: "Løn", "Salary", employer name
  19. Score candidates per transaction-matching confidence rules
  20. If exactly 1 match with confidence >= 0.8: auto-link to the transaction
  21. If multiple candidates or confidence < 0.8: present candidates to user:
    Jeg fandt {n} mulige løntransaktioner til denne lønseddel:
    
    1. {date} — {description} — {amount} kr (match: {confidence_pct}%)
    2. {date} — {description} — {amount} kr (match: {confidence_pct}%)
    
    Hvilken transaktion hører lønsedlen til? (Eller "ingen" hvis ingen passer)
    
  22. [USER ACTION] (only if ambiguous): User picks a candidate or says "ingen"
  23. If no candidates found: store as unmatched
  24. Generate payslip_id (ps- + 8 hex chars)
  25. Create the payslips/ directory if it does not exist
  26. Save the uploaded file to payslips/{payslip_id}.{ext} (preserve original extension). Set file_reference to this path.
  27. Serialize benefits to JSON string for benefits_json column
  28. If payslips.csv does not exist, create it with the header row
  29. Append payslip row to payslips.csv
  30. Append event to action-log.csv:
    • action_type: payslip
    • target: {employer}
    • status: completed
    • details: "{pay_period}, pension {pension_pct}%, {match_status}"
  31. Output summary in Danish
  32. If pension_pct < 15, add recommendation: "Bemærk: Din pensionsopsparing er {pension_pct}% — anbefalet minimum er 15% af bruttoløn."
  33. If this was a new employer without a parser and the user made corrections, suggest: "Tip: Kør /smartspender:payslip learn for at gemme udtræksregler for {employer}."

Read the full file on GitHub · 340 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. 7d ago First seen · 340 lines · 24 tokens per session scan A 59d398a133d7

Subscribe to this mod's changes

payslip is a command published in the GitHub repository peerjakobsen/smartspender (5 stars, last pushed 7mo ago), licensed MIT. It adds 24 tokens to every session and 3,457 once invoked, about $0.0001 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-08-31.