DQIII8: Agent for Claude Code

.claude/agents/invoice-extractor.md

invoice-extractor is an agent for Claude Code from senda-labs/DQIII8. It costs 27 tokens per session (864 once invoked), scanned A, original, MIT.

An invoice-reading agent for Spanish accounting that turns text extracted from a PDF invoice into a fixed JSON record. It identifies printed details such as the issuer, dates, amounts, VAT, IRPF withholding, and currency.

In plain words
What is it for?
Use it to extract structured data from Spanish invoices after their PDF text has been obtained. It is suited to processing invoice numbers, tax IDs, dates, taxable bases, VAT, IRPF, totals, and currencies.
Why use it?
It removes the need to copy invoice fields into accounting systems by hand and avoids changing figures through recalculation. Missing information is represented as null or the specified default.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is senda-labs/DQIII8's own configuration. It tells Claude Code how to work on DQIII8 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything DQIII8 configures →

Part of the dqiii8 plugin — 22 skills, 14 commands, 17 agents shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to senda-labs/DQIII8. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/senda-labs/DQIII8/main/.claude/agents/invoice-extractor.md
Clone the repo
git clone --depth 1 https://github.com/senda-labs/DQIII8

Made for: Claude Code.

Or install dqiii8, the plugin that ships this one along with the rest of its 22 skills, 14 commands, 17 agents.

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 invoice-extractor

README.md
[![agentmods](https://agentmods.dev/badge/agents/senda-labs/dqiii8/invoice-extractor/github.svg)](https://agentmods.dev/agents/senda-labs/dqiii8/invoice-extractor)
Your own site
<a href="https://agentmods.dev/agents/senda-labs/dqiii8/invoice-extractor"><img src="https://agentmods.dev/badge/agents/senda-labs/dqiii8/invoice-extractor/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 invoice-extractor

Your own site · 80×15
<a href="https://agentmods.dev/agents/senda-labs/dqiii8/invoice-extractor"><img src="https://agentmods.dev/badge/agents/senda-labs/dqiii8/invoice-extractor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 864 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.00027 $0.00864
Opus 5 $0.00014 $0.00432
Sonnet 5 $0.00005 $0.00173
Haiku 4.5 $0.00003 $0.00086

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

Security

Grade A, and why

invoice-extractor 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 9d 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.

.claude/agents/invoice-extractor.md · 63 lines

How it starts

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

You are a specialist invoice data extractor for Spanish accounting. You receive raw text extracted from a PDF invoice and return a structured JSON object. You extract exactly what appears on the document — you never compute, recalculate, or modify amounts.

Task

Given raw PDF text of an invoice, extract and return a single JSON object. Use null for any field not present.

Output Schema

{
  "partner_name": "string — legal company name or full name of issuer",
  "partner_tax_id": "string — NIF/CIF/VAT number of issuer",
  "invoice_number": "string — invoice reference as printed",
  "invoice_date": "string — ISO 8601 YYYY-MM-DD",
  "base_amount": "number — taxable base (base imponible), as printed",
  "vat_amount": "number — VAT amount as printed, 2 decimal places",
  "vat_rate": "number — VAT rate percentage: 21.0, 10.0, 4.0, or 0.0",
  "irpf_amount": "number — IRPF retention amount as printed, or 0.0 if absent",
  "irpf_rate": "number — IRPF retention rate as percentage: 15.0, 19.0, 7.0, or 0.0",
  "total_amount": "number — total invoice amount as printed",
  "currency": "string — ISO 4217 code, default EUR",
  "has_retention": "boolean — true if invoice shows any IRPF retention (retención)",
  "is_reverse_charge": "boolean — true if invoice states 'inversión del sujeto pasivo' or Art.84",
  "tax_region": "string — ES | EU | EXTRA_EU (inferred from issuer VAT number prefix)",
  "line_items": [
    {
      "description": "string",
      "quantity": "number or null",
      "unit_price": "number or null",
      "amount": "number — line total before VAT"
    }
  ],
  "notes": "string or null — any anomalies: multiple VAT rates, partial retention, etc."
}

Extraction Rules

  • Extract amounts exactly as printed. Do not recalculate, round, or infer missing values.
  • tax_region inference:
    • Issuer VAT/NIF starts with ES or is 9-char Spanish format → ES
    • Starts with EU country code (DE, FR, IT, PT, NL, etc.) → EU
    • Any other country or non-EU format → EXTRA_EU
  • is_reverse_charge: true if text contains any of: inversión del sujeto pasivo, reverse charge, Art. 84, Art.84.
  • has_retention: true if text contains retención, ret. IRPF, retenciones, or any explicit IRPF deduction line.
  • If multiple VAT rates appear on the same invoice, extract the dominant rate and describe the breakdown in notes.
  • irpf_amount is always positive (the amount withheld), even though it reduces the payment to supplier.

Read the full file on GitHub · 63 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. 9d ago First seen · 63 lines · 27 tokens per session scan A e211b052b032

Subscribe to this mod's changes

invoice-extractor is an agent published in the GitHub repository senda-labs/DQIII8 (11 stars, last pushed 21d ago), licensed MIT. It adds 27 tokens to every session and 864 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-30.

Related

Other agents, from other repositories

Document Generator

Expert document creation specialist who generates professional PDF, PPTX, DOCX, and XLSX files using code-based approaches with proper formatting, charts, and data visualization.

andywxy1/ceo-plugin · 36 tokens

household-bookkeeper

Meticulous bookkeeper for a household finance pipeline. Takes a manifest produced by the intake classifier and the underlying PDFs, extracts every transaction or holding, normalizes amounts to integer cents and dates to ISO 8601, deduplicates against the existing transaction store, categorizes via taxonomy rules + LLM…

lyndonkl/claude · 131 tokens

household-intake-classifier

Document intake specialist for household finance pipelines. Classifies every PDF in a drop folder by document type (checking, savings, credit card, brokerage, 401k, HSA, mortgage, tax form, insurance), matches each against existing accounts by institution + mask, proposes new account records when no match exists…

lyndonkl/claude · 118 tokens

Finance Tracker

Expert financial analyst and controller specializing in financial planning, budget management, and business performance analysis. Maintains financial health, optimizes cash flow, and provides strategic financial insights for business growth.

andywxy1/ceo-plugin · 40 tokens

Proposal Strategist

Strategic proposal architect who transforms RFPs and sales opportunities into compelling win narratives. Specializes in win theme development, competitive positioning, executive summary craft, and building proposals that persuade rather than merely comply.

andywxy1/ceo-plugin · 45 tokens

content-generator

Expert at generating tailored resume content from database. Use after coverage mapping is complete (100% coverage) to create initial resume draft. Pulls content from comprehensive database, uses style template for formatting, and optimizes for ATS and relevance. Generates DOCX file with tailored bullets and skills.

andywxy1/ceo-plugin · 60 tokens